Re: Performance Killer 'IN' ?

Поиск
Список
Период
Сортировка
От Kai Hessing
Тема Re: Performance Killer 'IN' ?
Дата
Msg-id 49erl5Fo6ijlU1@individual.net
обсуждение исходный текст
Ответ на Re: Performance Killer 'IN' ?  (Kai Hessing <kai.hessing@hobsons.de>)
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: How can i import .backup file into the database
Следующее
От: "hubert depesz lubaczewski"
Дата:
Сообщение: Re: database design questions