rewrite in to exists?
От
LN Cisneros
Тема
rewrite in to exists?
Дата
Msg-id
20399973.1063861169740.JavaMail.root@rowlf.psp.pas.earthlink.net
Список
Дерево обсуждения
Re: rewrite in to exists? LN Cisneros <lnsea@earthlink.net>
Re: rewrite in to exists? Josh Berkus <josh@agliodbs.com>
Find one record Joseph Bove <jbove@vetstar.com>
Re: Find one record Josh Berkus <josh@agliodbs.com>
I'm on 7.3.4 and this query gets horrible performance. Is there a way to rewrite it with an exists or some way to get better performance?
select code, id, name, date_of_service
from tbl
where date_of_service in
(select date_of_service
from tbl
where xxx >= '29800'
and xxx <= '29909'
and code = 'XX')
and client_code = 'XX'
order by id, date_of_service;
Thanks!
В списке pgsql-performance по дате отправления
От: Christopher Browne
Дата: