pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Xiaoran Wang <fanfuxiaoran@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Andrew Kane <andrew@ankane.org>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Subject: Re: Avoid computing ORDER BY junk columns unnecessarily
Date: Fri, 22 Dec 2023 12:31:52 -0500
Message-ID: <1067708.1703266312@sss.pgh.pa.us> (raw)
In-Reply-To: <02c142a8-051d-4252-a3a5-9d87be1c6e6b@iki.fi>
References: <2ca5865b-4693-40e5-8f78-f3b45d5378fb@iki.fi>
	<CAGjhLkPyROkuJYpKfQxax3fBEB_0vLN_CuQEPcfB5A8+GD85dg@mail.gmail.com>
	<dd7eed69-4e99-4da2-87a8-2a94b35309fa@iki.fi>
	<1052850.1703258655@sss.pgh.pa.us>
	<02c142a8-051d-4252-a3a5-9d87be1c6e6b@iki.fi>

Heikki Linnakangas <hlinnaka@iki.fi> writes:
> On 22/12/2023 17:24, Tom Lane wrote:
>> How much of your patchset still makes sense if we assume that we
>> can always extract the ORDER BY column values from the index?

> That would make it much less interesting. But I don't think that's a 
> good assumption. Especially in the kNN case, the ORDER BY value would 
> not be stored in the index. Most likely the index needs to calculate it 
> in some form, but it might take shortcuts like avoiding the sqrt().

Yeah, fair point.  I'll try to take a look at your patchset after
the holidays.

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <1067708.1703266312@sss.pgh.pa.us>
Permalink:  ../1067708.1703266312@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1067708.1703266312@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, hlinnaka@iki.fi, fanfuxiaoran@gmail.com, andrew@ankane.org, boekewurm+postgres@gmail.com
  Subject: Re: Avoid computing ORDER BY junk columns unnecessarily
  In-Reply-To: <1067708.1703266312@sss.pgh.pa.us>

* 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