Re: Performance Killer 'IN' ? - Mailing list pgsql-general

From Kai Hessing
Subject Re: Performance Killer 'IN' ?
Date
Msg-id 49erl5Fo6ijlU1@individual.net
Whole thread Raw
In response to Re: Performance Killer 'IN' ?  (Kai Hessing <kai.hessing@hobsons.de>)
List 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!

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: How can i import .backup file into the database
Next
From: "hubert depesz lubaczewski"
Date:
Subject: Re: database design questions