Re: [PERFORM] Two fast searches turn slow when used with OR clause

2010-08-17 Thread Robert Haas
On Thu, Aug 5, 2010 at 2:34 PM, Craig James wrote: > => explain analyze select p.price, p.amount, p.units, s.catalogue_id, > vn.version_id > -> from plus p join sample s > ->  on (p.compound_id = s.compound_id and p.supplier_id = s.supplier_id) > -> join version vn on (s.version_id = vn.version_id

[PERFORM] Two fast searches turn slow when used with OR clause

2010-08-05 Thread Craig James
I can query either my PARENT table joined to PRICES, or my VERSION table joined to PRICES, and get an answer in 30-40 msec. But put the two together, it jumps to 4 seconds. What am I missing here? I figured this query would be nearly instantaneous. The VERSION.ISOSMILES and PARENT.ISOSMILES