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

Re: Why does a simple query not use an obvious index?

From: "Scott Marlowe" <smarlowe(at)qwest(dot)net>
To: "Greg Stark" <gsstark(at)mit(dot)edu>
Cc: "Jack Kerkhof" <jack(dot)kerkhof(at)guest-tek(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Why does a simple query not use an obvious index?
Date: 2004-08-29 21:44:15
Message-ID: 1093815855.5493.33.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-performance
On Sun, 2004-08-29 at 15:38, Scott Marlowe wrote:
> On Sun, 2004-08-29 at 15:12, Greg Stark wrote:
> > "Scott Marlowe" <smarlowe(at)qwest(dot)net> writes:
> > 
> > > Also, count(*) is likely to always generate a seq scan due to the way
> > > aggregates are implemented currently in pgsql.  you might want to try:
> > 
> > Huh? I'm curious to know what you're talking about here.
> 
> This has been discussed ad infinitum on the lists in the past.  And
> explained by better minds than mine, but I'll give it a go.
> 
> PostgreSQL has a "generic" aggregate method.  Imagine instead doing a
> select count(id1+id2-id3) from table where ... 

that should be avg(id1+id2-id3)... doh


In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2004-08-29 22:03:43
Subject: Re: Why does a simple query not use an obvious index?
Previous:From: Scott MarloweDate: 2004-08-29 21:38:00
Subject: Re: Why does a simple query not use an obvious index?

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