Re: One of the example queries that 'could' is identical to one that 'could not'.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: seakintruth(at)gmail(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: One of the example queries that 'could' is identical to one that 'could not'.
Date: 2021-12-19 16:15:03
Message-ID: 1881495.1639930503@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

PG Doc comments form <noreply(at)postgresql(dot)org> writes:
> 11.9.2 lists ```SELECT x FROM tab WHERE x = 'key' AND z < 42;``` as both
> examples of 'could' and 'could not' use index-only scans.

No, look again: one of the queries uses the indexed column y,
and the other uses the non-indexed column z.

regards, tom lane

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2021-12-19 21:08:09 The pg_stop_backup will return one row with three values.
Previous Message PG Doc comments form 2021-12-19 12:22:34 One of the example queries that 'could' is identical to one that 'could not'.