Re: optimizer tuning/forcing correct index use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: optimizer tuning/forcing correct index use
Дата
Msg-id 29145.1016551722@sss.pgh.pa.us
обсуждение исходный текст
Ответ на optimizer tuning/forcing correct index use  (Kelly Burkhart <kelly@tradebotsystems.com>)
Список pgsql-sql
Kelly Burkhart <kelly@tradebotsystems.com> writes:
> The critical part is driving the fill table query from a sequential scan
> rather than a scan of fill_ak2.

Have you done an ANALYZE or VACUUM ANALYZE lately?  If so, what do you
get from

select * from pg_stats where tablename = 'fill';
select * from pg_class where relname = 'fill';

Offhand I am guessing that the table is fairly well ordered by fill_ts
and the planner is underestimating the effects of this.  There is a
provision in there to try to account for data ordering, but it's new
code in 7.2 and doubtless still needs refinement.
        regards, tom lane


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

Предыдущее
От: "Andrew G. Hammond"
Дата:
Сообщение: Re: How to create crude report with psql and/or plpgsql
Следующее
От: Kelly Burkhart
Дата:
Сообщение: Re: optimizer tuning/forcing correct index use