Re: Help with a seq scan on multi-million row table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Help with a seq scan on multi-million row table
Дата
Msg-id 26129.1147312429@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Help with a seq scan on multi-million row table  (<ogjunk-pgjedan@yahoo.com>)
Ответы Re: Help with a seq scan on multi-million row table  (<ogjunk-pgjedan@yahoo.com>)
ORDER BY question  ("Christian Paul Cosinas" <cpc@cybees.com>)
Список pgsql-sql
<ogjunk-pgjedan@yahoo.com> writes:
> Aha!  set hashjoin=off did the trick.

>                ->  Index Scan using ix_user_url_tag_user_url_id on user_url_tag userurltag0_  (cost=0.00..157.34
rows=103width=14) (actual time=1.223..1.281 rows=5 loops=1666)
 
>                      Index Cond: (userurltag0_.user_url_id = "outer".id)

This seems to be the problem right here: the estimate of matching rows
is off by a factor of 20, and that inflates the overall cost estimate
for this plan about the same, causing the planner to think the other way
is cheaper.

What does the pg_stats row for user_url_tag.user_url_id contain?
Have you analyzed that table recently?
        regards, tom lane


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

Предыдущее
От:
Дата:
Сообщение: Re: Help with a seq scan on multi-million row table
Следующее
От:
Дата:
Сообщение: Re: Help with a seq scan on multi-million row table