Re: Query Optimization

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Query Optimization
Дата
Msg-id 20100408140329.GD29013@a-kretschmer.de
обсуждение исходный текст
Ответ на Query Optimization  (Kaloyan Iliev Iliev <kaloyan@digsys.bg>)
Список pgsql-performance
In response to Kaloyan Iliev Iliev :
> Hi,
> Can anyone suggest why this query so slow.


>                        ->  Index Scan using
> ms_commands_history_ms_device_id_idx on ms_commands_history ch
> (cost=0.00..4.33 rows=1 width=8) (actual time=0.163..25254.004 rows=9807
> loops=1)

Estimated rows: 1, actual rows: 9807, that's a BIG difference and,
maybe, your problem.

Btw.: your explain is hard to read (line-wrapping). It's better to
attach the explain as an own file...


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

В списке pgsql-performance по дате отправления:

Предыдущее
От: Alan Hodgson
Дата:
Сообщение: Re: Occasional giant spikes in CPU load
Следующее
От: Andy Colson
Дата:
Сообщение: Re: How check execution plan of a function