Re: BRIN indexes for MAX, MIN, ORDER BY?

From: Jeremy Harris <jgh(at)wizmail(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: BRIN indexes for MAX, MIN, ORDER BY?
Date: 2015-09-29 18:20:38
Message-ID: 560AD676.6000401@wizmail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27/09/15 21:58, Gavin Wahl wrote:
> 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.

An internal merge sort does well with partially-sorted input.
--
Cheers,
Jeremy

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2015-09-29 18:34:12 Re: On-demand running query plans using auto_explain and signals
Previous Message Alvaro Herrera 2015-09-29 18:06:19 Re: track_commit_timestamp and COMMIT PREPARED