Re: A performance issue in ROW_NUMBER() OVER(ORDER BY NULL) [27 times slow than OVER()] V14.5

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kirk Wolak <wolakk(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: A performance issue in ROW_NUMBER() OVER(ORDER BY NULL) [27 times slow than OVER()] V14.5
Date: 2023-02-20 04:54:01
Message-ID: CAFj8pRAyyMLKDxOp=_0ZOD9P-adeVhZENM9-fBrh8XQX-QWk8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

po 20. 2. 2023 v 0:26 odesílatel David Rowley <dgrowleyml(at)gmail(dot)com> napsal:

> On Mon, 20 Feb 2023 at 10:18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > I don't see it at all. Comparing your two test queries on released
> > branches, I see maybe 2x penalty for the ORDER BY NULL, not 30x.
> > (In HEAD there's only about 13% penalty.) I wonder what PG version
> > you are testing.
>
> I suspect ed1a88dda would be what made this faster in master. We'll
> check for peer rows to check "NULL IS NOT DISTINCT FROM NULL" prior to
> that change with the ORDER BY NULL query.
>

yes, I tested it on master, and the query is little bit slower still, but
not too much (27 sec x 24 sec)

Regards

Pavel

>
> David
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mikhail Balayan 2023-02-20 05:29:16 Re: Automatic aggressive vacuum on almost frozen table takes too long
Previous Message Amit Kapila 2023-02-20 04:14:48 Re: Support logical replication of DDLs