Re: [HACKERS] Slow - grindingly slow - query
От | Theo Kramer |
---|---|
Тема | Re: [HACKERS] Slow - grindingly slow - query |
Дата | |
Msg-id | 382BA0FB.82D96E3C@flame.co.za обсуждение исходный текст |
Ответ на | Re: [HACKERS] Slow - grindingly slow - query (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] Slow - grindingly slow - query
replication |
Список | pgsql-hackers |
Tom Lane wrote: > > Theo Kramer <theo@flame.co.za> writes: > > The query is > > > select accountdetail.domain from accountdetail where > > accountdetail.domain not in > > (select accountmaster.domain from accountmaster); This takes more than 5 hours and 30 minutes. > Try something like > > select accountdetail.domain from accountdetail where > not exists (select accountmaster.domain from accountmaster where > accountmaster.domain = accountdetail.domain); This takes 5 seconds - wow! > I believe this is in the FAQ... Will check out the FAQs. Many thanks. -------- Regards Theo
В списке pgsql-hackers по дате отправления: