Michael,
> SELECT Data
> FROM Table A
> WHERE NOT EXISTS (
> SELECT * FROM Table_B, Table_C
> WHERE Table_B.GroupID = TableC.GroupID
> AND TableC.AccountID = 11
> )
>
> I think that the not exists is a bit quicker than the NOT IN. Give it
> a whirl.
A *lot* faster. Like, 7x as fast. I'd forgotten about EXISTS, since I
so seldom have a use for it ... but this is shy it was created, I guess.
Thanks so much for your help!
-Josh Berkus
--
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology [EMAIL PROTECTED]
and data management solutions (415) 436-9166
for law firms, small businesses fax 436-0137
and non-profit organizations. pager 338-4078
San Francisco
- [SQL] Query Problem Josh Berkus
- Re: [SQL] Query Problem Tomas Berndtsson
- Re: [SQL] Query Problem Stephan Szabo
- Re: [SQL] Query Problem Tom Lane
- [SQL] HELP! ... pg_locale ??? Sandis Jerics
- Re: [SQL] HELP! ... pg_locale ??? Tom Lane
- Re: [SQL] HELP! ... pg_locale ??? Tom Lane
- [SQL] query problem Josh Berkus
- [SQL] query problem Marco Muratori
- Re: [SQL] query problem Josh Berkus
- Re: [SQL] query problem Jean-Luc Lachance
- Re: [SQL] query problem Jean-Luc Lachance
- [SQL] query problem ron_tabada
- [SQL] Query Problem Abdul Wahab Dahalan
- Re: [SQL] Query Problem Joe Conway
