Re: how to change this query, so that it will not use the correlation?
From: Daniel Roy <danielroy10junk_at_hotmail.com>
Date: 24 Sep 2003 07:03:28 -0700
Message-ID: <3722db.0309240603.66ebfa5_at_posting.google.com>
Date: 24 Sep 2003 07:03:28 -0700
Message-ID: <3722db.0309240603.66ebfa5_at_posting.google.com>
Try replacing the "in" by an "exists", as it can perform much better,
especially if the list of possible values is large. I can't think of
any way to remove the "or", but I've never seen an "or" slow down a
select statement considerably. Note also that if the query returns 500
rows, it doesn't mean necessarily that it should run fast. What
determines the speed is the number of rows it has to go through, and
not the number of rows returned. It would be much easier for us to
help if we had the execution plan. Also make sure that your stats are
up-to-date.
Daniel