Re: Query runs 38 seconds for small database!

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query runs 38 seconds for small database!
Дата
Msg-id 26838.1147099614@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Query runs 38 seconds for small database!  ("Andrus" <eetasoft@online.ee>)
Список pgsql-performance
"Andrus" <eetasoft@online.ee> writes:
> I have small database. However the following query takes 38 (!) seconds to
> run.
> How to speed it up (preferably not changing table structures but possibly
> creating indexes) ?

ANALYZE would probably help.

> "                    ->  Seq Scan on konto dbkonto  (cost=0.00..23.30 rows=1
> width=44) (actual time=0.017..1.390 rows=219 loops=1)"
> "                          Filter: (iseloom = 'A'::bpchar)"

Anytime you see a row estimate that far off about a simple single-column
condition, it means your statistics are out-of-date.

            regards, tom lane

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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Query runs 38 seconds for small database!
Следующее
От: Vivek Khera
Дата:
Сообщение: Re: Memory and/or cache issues?