Re: [SQL] Yet Another (Simple) Case of Index not used - Mailing list pgsql-performance

From Tom Lane
Subject Re: [SQL] Yet Another (Simple) Case of Index not used
Date
Msg-id 21712.1050890000@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] Yet Another (Simple) Case of Index not used  (Kevin Brown <kevin@sysexperts.com>)
List pgsql-performance
Kevin Brown <kevin@sysexperts.com> writes:
> Personally, I'd rather see such development effort go towards more
> beneficial improvements, such as replication, 2PC, SQL/MED, etc. (or
> even improving the efficiency of MVCC, since it was mentioned here as
> a problem! :-).  I consider COUNT(*) without a WHERE clause to be a
> corner case, despite the frequency of questions about it.

Exactly.

> But I don't
> think we should reject a patch to implement fast COUNT(*) just because
> it represents a performance tradeoff, at least if it's GUC-controlled.

Well, this is moot since I see no one offering to provide such a patch.
But performance tradeoffs are only one of the costs involved.  I suspect
any such mechanism would be invasive enough to represent a nontrivial
ongoing maintenance cost, whether anyone uses it or not.  The extent
to which it munges core functionality would have to be a factor in
deciding whether to accept it.  It'd take lots more thought than we've
expended in this thread to get an accurate handle on just what would
be involved...

(BTW, if anyone actually is thinking about this, please make it a
per-table option not a global GUC option.)

            regards, tom lane


pgsql-performance by date:

Previous
From: Kevin Brown
Date:
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
Next
From: Josh Berkus
Date:
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used