Skip site navigation (1) Skip section navigation (2)

Re: docs update for count(*) and index-only scans

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: docs update for count(*) and index-only scans
Date: 2011-12-06 03:14:38
Message-ID: CAK3UJRHEx6jGeAfqcA_WmOzotnu1eeKsF7Zc9zYRXqJ2OOQWOw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-docs
On Fri, Nov 4, 2011 at 4:10 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Nov 1, 2011 at 8:07 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> It's the "lobotomized engines" that are the problem, IMO --- people
>> coming from databases like mysql tend to think count(*) just means
>> reading a table size counter that the engine has anyway.
>
> This is probably a much less common misconception than formerly, due
> to the rise of InnoDB and the falling-out-of-favor experienced by
> MyISAM.
>
> I think some pessimism removal is probably warranted.  Yeah, somebody
> else might be faster than us on this test, but that's probably true of
> many tests.  And on others we will be faster than them.

So, if Tom still wants to keep that paragraph and its warning, how
about we just fix the now-incorrect bit at the end? Maybe just tweak
"will be executed" to "will often be executed", or change "using a
sequential scan of the entire table." to "using a sequential scan of
the table, or an index-only scan of one of its indexes".

Josh

In response to

Responses

pgsql-docs by date

Next:From: Euler Taveira de OliveiraDate: 2011-12-06 03:33:56
Subject: pg_stat_get_wal_senders documented
Previous:From: Dmitriy IgrishinDate: 2011-12-05 11:53:22
Subject: Clarification suggestion for 46.4 chapter.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group