BRIN indexes for MAX, MIN, ORDER BY?

Поиск
Список
Период
Сортировка
От Gavin Wahl
Тема BRIN indexes for MAX, MIN, ORDER BY?
Дата
Msg-id CACPudh1TdV92jXRKVLEHF8svRSYjitBFdaCPAzXvNagX4+-uGQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: BRIN indexes for MAX, MIN, ORDER BY?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: BRIN indexes for MAX, MIN, ORDER BY?  (Thomas Munro <thomas.munro@enterprisedb.com>)
Re: BRIN indexes for MAX, MIN, ORDER BY?  (Marti Raudsepp <marti@juffo.org>)
Re: BRIN indexes for MAX, MIN, ORDER BY?  (Jeremy Harris <jgh@wizmail.org>)
Список pgsql-hackers
It seems trivial to accelerate a MAX or MIN query with a BRIN index. You just find the page range with the largest/smallest value, and then only scan that one. Would that be hard to implement? I'm interested in working on it if someone can give me some pointers.

Somewhat harder but still possible would be using BRIN indexes to accelerate ORDER BY. This would require a sorting algorithm that can take advantage of mostly-sorted inputs. You would sort the page ranges by their minimum or maximum value, then feed the sorting algorithm in that order.

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Rework the way multixact truncations work
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BRIN indexes for MAX, MIN, ORDER BY?