Re: Nested loop in simple query taking long time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Nested loop in simple query taking long time
Дата
Msg-id 21487.1196868306@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Nested loop in simple query taking long time  (Henrik Zagerholm <henke@mac.se>)
Ответы Re: Nested loop in simple query taking long time  (Henrik Zagerholm <henke@mac.se>)
Список pgsql-general
Henrik Zagerholm <henke@mac.se> writes:
> Usually I can see what is wrong with queries but I can't figure out
> why this query is slow.

Seems the main problem is here:

>                      ->  Bitmap Index Scan on tbl_archive_idx1
> (cost=0.00..1150.47 rows=8 width=0) (actual time=1505.456..1505.456
> rows=86053 loops=16)
>                            Index Cond: (tbl_share.pk_share_id =
> tbl_archive.fk_share_id)

Why is this scan finding so many more rows than the planner expects?
Perhaps increasing the stats targets on these columns would help it
make a better estimate.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Moving pgstat.stat and pgstat.tmp
Следующее
От: marcelo Cortez
Дата:
Сообщение: 8.3 beta FATAL: invalid value for parameter "timezone_abbreviations": "Default"