Re: Should changing offset in LIMIT change query plan (at all/so early)?

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Should changing offset in LIMIT change query plan (at all/so early)?
Дата
Msg-id 4CE8E9F70200002500037C8D@gw.wicourts.gov
обсуждение исходный текст
Список pgsql-performance
goran  wrote:

> Trying to understand why query planer changes the plan from
> effective one to ineffective one when I change the offset in the
> LIMIT. Also, thankfully accepting RTFM pointers to the actual FMs.

The query planner will consider offset and limit clauses when
estimating the cost of each plan.  The optimal plan will shift as
more tuples need to be read.  If the plan is not shifting at the
right point, it probably means that you need to tune the costing
factors used by the planner.

You didn't report enough information for me to suggest any particular
change; if you follow up, please review the suggested information to
post:

http://wiki.postgresql.org/wiki/SlowQueryQuestions

In particular, information about the hardware and your
postgresql.conf settings would help.

You might also want to review this page and see if you can tune
things.

http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server

In particular, effective_cache_size, random_page_cost, and
seq_page_cost would be likely to need adjustment based on what you've
told us; however, it might pay to review the whole configuration.

-Kevin

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

Предыдущее
От: tv@fuzzy.cz
Дата:
Сообщение: Re: Query Performance SQL Server vs. Postgresql
Следующее
От: tv@fuzzy.cz
Дата:
Сообщение: Re: Query Performance SQL Server vs. Postgresql