Re: R: Query plan on identical tables differs . Why ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: R: Query plan on identical tables differs . Why ?
Дата
Msg-id 8904.1084460460@sss.pgh.pa.us
обсуждение исходный текст
Ответ на R: Query plan on identical tables differs . Why ?  ("Fabio Panizzutti" <panizzutti@interlogica.net>)
Ответы R: R: Query plan on identical tables differs . Why ?  ("Fabio Panizzutti" <panizzutti@interlogica.net>)
Список pgsql-performance
"Fabio Panizzutti" <panizzutti@interlogica.net> writes:
> I don't understand why the planner chose a different query plan on
> identical tables with same indexes .

Different data statistics; not to mention different table sizes
(the cost equations are not linear).

Have you ANALYZEd (or VACUUM ANALYZEd) both tables recently?

If the stats are up to date but still not doing the right thing,
you might try increasing the statistics target for the larger
table's tag_id column.  See ALTER TABLE SET STATISTICS.

            regards, tom lane

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

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: Clarification on some settings
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: R: Query plan on identical tables differs . Why ?