Re: Multiple tests against the same subquery.
From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 04/13/04
- Previous message: oj: "Re: Data Load"
- In reply to: Eric: "Re: Multiple tests against the same subquery."
- Next in thread: Eric: "Re: Multiple tests against the same subquery."
- Reply: Eric: "Re: Multiple tests against the same subquery."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 13 Apr 2004 22:20:04 +0200
On Tue, 13 Apr 2004 08:23:37 -0700, Eric wrote:
>I'm only selecting the ID column because this whole query is actually a
>subquery in yet another query. It works perfectly, I am extremely grateful
>for your expertise!
Eric,
Glad I could be of assistance.
Regarding the quote above - if it is a subquery with (NOT) IN, you
don't need the DISTINCT. My guess is that removing distinct might
improve performance (but with performance, the truth is alway in the
testing); if it is a subquery with (NOT) EXISTS, you could also use
SELECT * instead of SELECT <somecolumn>. I don't think it changes
performance on this one, but it often does, so it's a good habit to
always use SELECT * with (NOT) EXISTS.
Best, Hugo
-- (Remove _NO_ and _SPAM_ to get my e-mail address)
- Previous message: oj: "Re: Data Load"
- In reply to: Eric: "Re: Multiple tests against the same subquery."
- Next in thread: Eric: "Re: Multiple tests against the same subquery."
- Reply: Eric: "Re: Multiple tests against the same subquery."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|