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-04 09:13:08
Message-ID: 49erl5Fo6ijlU1@individual.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kai Hessing wrote:
>>> 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?

unbelievable... I found the problem: Doing a simple ANALYZE after
resetting the test-db to a previous state is my friend. The results now are:

---------
Index Scan using phon_phon_idx, phon_phon_idx, phon_phon_idx, .....
(cost=0.00..56793.09 rows=4068 width=53) (actual time=0.155..363.810
rows=2534 loops=1)

Index Cond: (((phon)::text = 'xyz'::text) OR .....

Filter: (status > -1)

Total runtime: 11140.480 ms
---------

Thank you very much, this was the right hint!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2006-04-04 09:15:57 Re: database design questions
Previous Message Peter Eisentraut 2006-04-04 09:07:05 Re: How can i import .backup file into the database