Re: Query planner suggestion, for indexes with similar but not exact ordering.

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: Query planner suggestion, for indexes with similar but not exact ordering.
Дата
Msg-id
CA+Tgmob8zSgSe5Od4s17i4dSbnOcuL5otchEUAVH-OM=rciJ-A@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Query planner suggestion, for indexes with similar but not exact ordering. Andrew Barnham <andrew.barnham@gmail.com>
Re: Query planner suggestion, for indexes with similar but not exact ordering. Robert Haas <robertmhaas@gmail.com>
On Mon, Nov 14, 2011 at 5:22 PM, Andrew Barnham
 wrote:
> I wonder, if it is possible and worthwhile, to setup the query planner to
> recognize that because of the stats I indicate above, that a sort by partnum
> is almost exactly the same as a sort by partnum+franchise.  And doing a
> Index scan on partnum index, and sorting results in memory will be
> dramatically faster.  The sort buffer only needs to be very small, will only
> grow to 8 records only at most in my above example.  The buffer will scan
> partnum index, and as long as partnum is the same, it will sort that small
> segment, as soon as the partnum increments when walking the index, the
> buffer zeros out again for next sort group.

This has come up before and seems worthwhile, but nobody's implemented it yet.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
В списке pgsql-performance по дате отправления
От: Leonardo Francalanci
Дата:
От: Robert Haas
Дата:
Сообщение: Re: Problems with FTS
FAQ