pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
One of the example queries that 'could' is identical to one that 'could not'.
2+ messages / 2 participants
[nested] [flat]

* One of the example queries that 'could' is identical to one that 'could not'.
@ 2021-12-19 12:22  PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2021-12-19 12:22 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: seakintruth@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/indexes-index-only-scans.html
Description:

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. I believe this is
what was meant:
"""""""""""""""""""
but these queries could not:

SELECT x, z FROM tab WHERE x = 'key';
SELECT x FROM tab WHERE x = 'key' AND z < 42;
"""""""""""""""""""

should read:
"""""""""""""""""""
but these queries could not:

SELECT x, z FROM tab WHERE x = 'key';
SELECT z FROM tab WHERE x = 'key' AND z < 42;
"""""""""""""""""""


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: One of the example queries that 'could' is identical to one that 'could not'.
@ 2021-12-19 16:15  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Doc comments form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2021-12-19 16:15 UTC (permalink / raw)
  To: seakintruth@gmail.com; +Cc: pgsql-docs@lists.postgresql.org

PG Doc comments form <noreply@postgresql.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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-12-19 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-12-19 12:22 One of the example queries that 'could' is identical to one that 'could not'. PG Doc comments form <noreply@postgresql.org>
2021-12-19 16:15 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox