Re: So, is COUNT(*) fast now?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: So, is COUNT(*) fast now?
Date: 2011-10-24 20:07:41
Message-ID: 4EA57F3D02000025000424FC@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> wrote:

> On 10/24/11 12:35 PM, Tom Lane wrote:
>> Your point about people trying to create wider indexes to exploit
>> index-only scans is an interesting one, but I think it's
>> premature to optimize on the basis of hypotheses about what
>> people might do in future.
>
> I don't think that this is hypothetical at all. I know *I'll* be
> doing it, and we can expect users who are familiar with MySQL and
> Oracle to do it as well.

And Sybase, and MS SQL Server. And others, most likely. We've
never gotten around to narrowing the indexes to which we added extra
columns to overcome performance problems through "covering index"
techniques when we were using Sybase, so they're already here. :-)

> One case which is going to be critical to test is the "join"
> table, i.e. the table which supports many-to-many joins and
> consists only of keys from the respective two other tables.

Yeah, that is an important use of covering indexes for us.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-10-24 20:23:27 Re: So, is COUNT(*) fast now?
Previous Message Robert Haas 2011-10-24 20:01:23 Re: So, is COUNT(*) fast now?