Re: [GENERAL] partial unique index and the planner

2009-02-16 Thread Alban Hertroys
On Feb 16, 2009, at 7:18 PM, Michal Politowski wrote: On Sun, 15 Feb 2009 13:41:05 -0500, Tom Lane wrote: Michal Politowski writes: Is it normal that plans using a scan on a partial unique index estimate that much more than one row is returned? There isn't currently any special logic to

Re: [GENERAL] partial unique index and the planner

2009-02-16 Thread Michal Politowski
On Sun, 15 Feb 2009 13:41:05 -0500, Tom Lane wrote: > Michal Politowski writes: > > Is it normal that plans using a scan on a partial unique index > > estimate that much more than one row is returned? > > There isn't currently any special logic to recognize that case; > the estimate is just w

Re: [GENERAL] partial unique index and the planner

2009-02-15 Thread Tom Lane
Michal Politowski writes: > Is it normal that plans using a scan on a partial unique index > estimate that much more than one row is returned? There isn't currently any special logic to recognize that case; the estimate is just whatever is going to come out of the normal statistics-based estimati

Re: [GENERAL] partial unique index and the planner

2009-02-15 Thread Scott Marlowe
2009/2/15 Michal Politowski : > I'm using PostgreSQL 8.3. > Is it normal that plans using a scan on a partial unique index > estimate that much more than one row is returned? > > Eg. I see: > -> Bitmap Index Scan on tmp_idx_oss_archive_object_id_current > (cost=0.00..3.12 rows=4189 width=0) > wh

[GENERAL] partial unique index and the planner

2009-02-15 Thread Michal Politowski
I'm using PostgreSQL 8.3. Is it normal that plans using a scan on a partial unique index estimate that much more than one row is returned? Eg. I see: -> Bitmap Index Scan on tmp_idx_oss_archive_object_id_current (cost=0.00..3.12 rows=4189 width=0) where the tmp_idx_oss_archive_object_id_current