On Wed, Jan 17, 2018 at 9:34 PM, Jacek Kołodziej
wrote:
> Hi Tom,
>
> On Wed, Jan 17, 2018 at 7:56 PM, Tom Lane wrote:
>
>> =?UTF-8?Q?Jacek_Ko=C5=82odziej?= writes:
>> > Here's what happening to me: the "A" query occasionally (in my case: on
>> the
>> > order of tenths per day) returns an ID _h
Hi Tom,
On Wed, Jan 17, 2018 at 7:56 PM, Tom Lane wrote:
> =?UTF-8?Q?Jacek_Ko=C5=82odziej?= writes:
> > Here's what happening to me: the "A" query occasionally (in my case: on
> the
> > order of tenths per day) returns an ID _higher_ than any ID present in
> > second query's result (other condi
[mailto:t...@sss.pgh.pa.us]
Sent: Wednesday, January 17, 2018 11:56 AM
To: Jacek Kołodziej
Cc: pgsql-general@lists.postgresql.org
Subject: Re: READ COMMITTED vs. index-only scans
=?UTF-8?Q?Jacek_Ko=C5=82odziej?= writes:
> Here's what happening to me: the "A" query occasionally (in
=?UTF-8?Q?Jacek_Ko=C5=82odziej?= writes:
> Here's what happening to me: the "A" query occasionally (in my case: on the
> order of tenths per day) returns an ID _higher_ than any ID present in
> second query's result (other conditions I haven't specified do _not_ filter
> any more rows than "id <=
On Wed, Jan 17, 2018 at 10:45 AM, Jacek Kołodziej
wrote:
>
>
> 17.01.2018 3:30 PM "Melvin Davidson" napisał(a):
>
>
>
> On Wed, Jan 17, 2018 at 8:08 AM, Jacek Kołodziej
> wrote:
>
>> Hello everyone,
>>
>> this is my first post here and I'm starting with asking a question about
>> data consisten
17.01.2018 3:30 PM "Melvin Davidson" napisał(a):
On Wed, Jan 17, 2018 at 8:08 AM, Jacek Kołodziej
wrote:
> Hello everyone,
>
> this is my first post here and I'm starting with asking a question about
> data consistency between two consecutive SELECTs using PostgreSQL 9.6.
>
> I'm sorry if tha
On Wed, Jan 17, 2018 at 3:30 PM, Melvin Davidson wrote:
> Just a suggestion. The first query is not really needed.
> You can simply do:
> second query (B):
>
> SELECT id
> , ...
> FROM events
> WHERE id > MIN(ID)
>AND id <= MAX(ID)
>AND ...
>
> See https://www.postgresql.org/docs/9
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
On Wed, Jan 17, 2018 at 8:08 AM, Jacek Kołodziej
wrote:
> Hello everyone,
>
> this is my first post here and I'm starting with asking a question about
> data consistency between two consecutive SELECTs using PostgreSQL 9.6.
>
> I'm sorry if that's something that was already discussed - I couldn't