Re: [PATCH] Incremental sort (was: PoC: Partial sort) - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Date
Msg-id CANP8+j+HOE8d7KknKE60iFKRZDsqoCMRi4uwm1RTSu3gLSgcnw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Incremental sort (was: PoC: Partial sort)  (Rafia Sabih <rafia.pghackers@gmail.com>)
List pgsql-hackers
On Wed, 5 Jun 2019 at 17:14, Rafia Sabih <rafia.pghackers@gmail.com> wrote:
 
Regarding this, I came across this,
/*
  * Incremental sort can't be used with either EXEC_FLAG_REWIND,
  * EXEC_FLAG_BACKWARD or EXEC_FLAG_MARK, because we hold only current
  * bucket in tuplesortstate.
  */
I think that is quite understandable. How are you planning to support
backwards scan for this? In other words, when will incremental sort be
useful for backward scan.

We stopped materializing the sort by default about 15 years ago because it wasn't a common use case and it was very expensive for large sorts.

It's no real problem if incremental sorts don't support backwards scans - we just won't use incremental in that case.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Solutions for the Enterprise

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: benchmarking Flex practices
Next
From: Simon Riggs
Date:
Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)