Re: [PERFORM] Why it is using/not using index scan?

2011-04-09 Thread Tomas Vondra
Dne 31.3.2011 19:26, Laszlo Nagy napsal(a): > For this query: > > select pp.id,pp.product_id,pp.selling_site_id,pp.asin > from product_price pp > where > (pp.asin is not null and pp.asin<>'') > and (pp.upload_status_id<>1) > and pp.selling_site_id in (8,7,35,6,9) > and (pp.last_od < 'now'::timesta

Re: [PERFORM] Why it is using/not using index scan?

2011-04-08 Thread Merlin Moncure
On Thu, Mar 31, 2011 at 12:26 PM, Laszlo Nagy wrote: > For this query: > > select pp.id,pp.product_id,pp.selling_site_id,pp.asin > from product_price pp > where > (pp.asin is not null and pp.asin<>'') > and (pp.upload_status_id<>1) > and pp.selling_site_id in (8,7,35,6,9) > and (pp.last_od < 'now'

[PERFORM] Why it is using/not using index scan?

2011-03-31 Thread Laszlo Nagy
For this query: select pp.id,pp.product_id,pp.selling_site_id,pp.asin from product_price pp where (pp.asin is not null and pp.asin<>'') and (pp.upload_status_id<>1) and pp.selling_site_id in (8,7,35,6,9) and (pp.last_od < 'now'::timestamp - '1 week'::interval ) limit 5000 Query plan is: "Limit