Re: READ COMMITTED vs. index-only scans

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>, Jacek Kołodziej <kolodziejj(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: READ COMMITTED vs. index-only scans
Date: 2018-01-17 15:17:06
Message-ID: 1516202226.2799.37.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Melvin Davidson wrote:
> You can simply do:
> second query (B):
>
> SELECT id
> , ...
> FROM events
> WHERE id > MIN(ID)
> AND id <= MAX(ID)
> AND ...

You probably meant to use a window function there:

max(id) OVER ()
min(id) OVER ()

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Olarte 2018-01-17 15:21:53 Re: READ COMMITTED vs. index-only scans
Previous Message Melvin Davidson 2018-01-17 14:30:05 Re: READ COMMITTED vs. index-only scans