Re: Performance Killer 'IN' ?

From: Kai Hessing <kai(dot)hessing(at)hobsons(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance Killer 'IN' ?
Date: 2006-04-03 17:54:25
Message-ID: 49d5qgFnuic1U1@individual.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Well, here's our problem it would seem: the planner is estimating the IN
> clause to match 317227 rows, rather than the actual 2522. That's
> naturally going to bias it against choosing an indexscan. You need to
> get that estimate closer before there's going to be much chance of
> choosing the right plan.
>
>> What do you mean with larger statistics target?
>
> See ALTER TABLE SET STATISTICS, or just change default_statistics_target
> and re-ANALYZE.

Thanks, that definitly looks like a starting point. I will test it and
post my results. Btw. what happens if the estimation would be to low?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Emi Lu 2006-04-03 18:01:33 Which error constant to use for "permission deny error when updating a table that user is not allowd to "
Previous Message Christopher Condit 2006-04-03 17:24:17 Re: pgsql and streams