Re: [PERFORM] Index scan plan estimates way off.

2009-03-05 Thread Robert Haas
On Thu, Mar 5, 2009 at 1:30 PM, Tom Lane wrote: > Jonathan Hseu writes: >>  Sort  (cost=11684028.44..11761274.94 rows=30898601 width=40) >>    Sort Key: "time" >>    ->  Bitmap Heap Scan on ticks  (cost=715657.57..6995196.08 rows=30898601 >> width=40) >>          Recheck Cond: (contract_id = 1) >

Re: [PERFORM] Index scan plan estimates way off.

2009-03-05 Thread Jonathan Hseu
Oops, forgot to CC my reply to the list. Sorry if this gets messed up. On Thu, Mar 5, 2009 at 12:30 PM, Tom Lane wrote: > Jonathan Hseu writes: > > Sort (cost=11684028.44..11761274.94 rows=30898601 width=40) > >Sort Key: "time" > >-> Bitmap Heap Scan on ticks (cost=715657.57..69951

Re: [PERFORM] Index scan plan estimates way off.

2009-03-05 Thread Tom Lane
Jonathan Hseu writes: > Sort (cost=11684028.44..11761274.94 rows=30898601 width=40) >Sort Key: "time" >-> Bitmap Heap Scan on ticks (cost=715657.57..6995196.08 rows=30898601 > width=40) > Recheck Cond: (contract_id = 1) > -> Bitmap Index Scan on contract_id_time_idx

[PERFORM] Index scan plan estimates way off.

2009-03-05 Thread Jonathan Hseu
I have a relatively simple query with a single index on (contract_id, time): vjtrade=> EXPLAIN SELECT * FROM ticks WHERE contract_id=1 ORDER BY time; QUERY PLAN