pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: James Coleman <jtc331@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org, Alexander Korotkov <a.korotkov@postgrespro.ru>
Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Date: Thu, 6 Sep 2018 22:34:33 +0200
Message-ID: <cab5f03f-42b4-ee56-d295-0d4903579986@2ndquadrant.com> (raw)
In-Reply-To: <CAAaqYe_tFxFN-+ESfvw5iMEc9GhX1FuMHhr0xZ2tUNFxkvJ46w@mail.gmail.com>
References: <CAPpHfds1waRZ=NOmueYq0sx1ZSCnt+5QJvizT8ndT2=etZEeAQ@mail.gmail.com>
	<CAPpHfdsjv1+eRvoHqn1NwCEcBAVcOr0c67BFuzg50zZdHTANRg@mail.gmail.com>
	<153625271389.4078.18405235923135713189.pgcf@coridan.postgresql.org>
	<16617.1536255587@sss.pgh.pa.us>
	<CAAaqYe_tFxFN-+ESfvw5iMEc9GhX1FuMHhr0xZ2tUNFxkvJ46w@mail.gmail.com>

On 09/06/2018 08:04 PM, James Coleman wrote:
> I disagree because it's not ideal to basically have to append pk to
> every index in the system just to get the ability to tie-break when
> there's actually very low likelihood of ties anyway.
> 
> A similar use case is trying to batch through a result set, in which
> case you need a stable sort as well.
> 
> The benefit is retaining the generality of indexes (and saving space in
> them etc.) while still allowing using them for more specific sorts. Any
> time you paginate or batch this way you benefit from this, which in many
> applications applies to a very high percentage of indexes.
> 

I 100% with this.

I see incremental sort as a way to run queries with fewer indexes that
are less query-specific, while still benefiting from them. Which means
lower overhead when writing data, lower disk space usage, and so on.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (262+ messages)  latest in thread

Message-ID: <cab5f03f-42b4-ee56-d295-0d4903579986@2ndquadrant.com>
Permalink:  ../cab5f03f-42b4-ee56-d295-0d4903579986@2ndquadrant.com/
Also on:    postgresql.org/message-id/cab5f03f-42b4-ee56-d295-0d4903579986@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, jtc331@gmail.com, tgl@sss.pgh.pa.us, a.korotkov@postgrespro.ru
  Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)
  In-Reply-To: <cab5f03f-42b4-ee56-d295-0d4903579986@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox