Re: Different plan for very similar queries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Different plan for very similar queries
Дата
Msg-id 633.1433089352@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Different plan for very similar queries  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: Different plan for very similar queries  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-performance
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> On 05/31/15 13:00, Peter J. Holzer wrote:
>> (There was no analyze on facttable_stat_fta4 (automatic or manual) on
>> facttable_stat_fta4 between those two tests, so the statistics on
>> facttable_stat_fta4 shouldn't have changed - only those for term.)

> So maybe there was autoanalyze, because otherwise it really should be
> the same in both plans ...

No, because that's the inside of a nestloop with significantly different
outer-side rowcount estimates.  The first case gets a benefit from the
expectation that it will be re-executed many times (see the impact of
loop_count on cost_index).

            regards, tom lane


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Different plan for very similar queries
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Different plan for very similar queries