Re: Using quicksort for every external sort run

From: Greg Stark <stark(at)mit(dot)edu>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using quicksort for every external sort run
Date: 2016-04-03 23:08:28
Message-ID: CAM-w4HMXLUzL76Sy4r6MY7MyA32OcJ73wC1-A69aFRfZ3pFRBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Apr 3, 2016 at 12:50 AM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> 1459308434.753 2016-03-30 05:27:14 CEST STATEMENT: SELECT * FROM
> (SELECT a FROM int_test UNION SELECT a FROM int_test_padding OFFSET
> 1e10) ff;
>
> I think that this is invalid, because the query was intended as this:
>
> SELECT * FROM (SELECT * FROM (SELECT a FROM int_test UNION SELECT a
> FROM int_test_padding) gg OFFSET 1e10) ff;

ISTM OFFSET binds more loosely than UNION so these should be equivalent.

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-04-03 23:12:06 Re: psql metaqueries with \gexec
Previous Message Tom Lane 2016-04-03 23:06:49 Re: More stable query plans via more predictable column statistics