Re: 8.4.7, incorrect estimate

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Wayne Conrad" <wayne(at)databill(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: 8.4.7, incorrect estimate
Date: 2011-04-29 19:12:44
Message-ID: 4DBAC75C020000250003D06B@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Wayne Conrad <wayne(at)databill(dot)com> wrote:

> select page_number, ps_id, ps_page_id from ps_page where
> ps_page_id in (select ps_page_id from documents_ps_page where
> document_id in (select document_id from temp_doc_ids)) order by
> ps_page_id;

> [estimated rows=34398932; actual rows=5]

> We tried increasing (from 100 to 1,000 and 10,000) the statistics
> targets for each of the indexed columns, one at a time, and
> analyzing the table/column with each change. This had no effect

Ouch.

Out of curiosity, what do you get with?:

explain analyze
select
page_number,
ps_id,
ps_page_id
from ps_page p
where exists
(
select * from documents_ps_page d
where d.ps_page_id = p.ps_page_id
and exists
(select * from temp_document_ids t
where t.document_id = d.document_id)
)
order by ps_page_id
;

-Kevin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Joachim Worringen 2011-04-29 19:15:33 Re: FUSION-IO io cards
Previous Message Greg Smith 2011-04-29 19:03:18 Re: FUSION-IO io cards