rewrite in to exists? - Mailing list pgsql-performance

From LN Cisneros
Subject rewrite in to exists?
Date
Msg-id 20399973.1063861169740.JavaMail.root@rowlf.psp.pas.earthlink.net
Whole thread Raw
List pgsql-performance
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
betterperformance? 

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 by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Is there a reason _not_ to vacuum continuously?
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: rewrite in to exists?