Re: select count(*) status these days

From: Chris <dmagick(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: select count(*) status these days
Date: 2010-10-19 02:54:31
Message-ID: 4CBD0867.9050303@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 19/10/10 11:15, Dennis Gearon wrote:
> I'm about to launch an in house 'Aplpha' stage project. One of the marketing driven outputs on the page is filled by a:
>
> SELECT
> COUNT(*)
> WHERE
> date_field IS NOT NULL AND
> date_field> :todays_date;
>
> Last I heard, this kind of query is kind of slow on Postgres in particular, (Love postgres otherwise). Is this still true?

That depends on the selectivity of your where clause, nothing else. If
date_field is indexed and pretty selective, it'll be quick.

--
Postgresql & php tutorials
http://www.designmagick.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Turner, John J 2010-10-19 03:58:12 Re: installing from source in Windows
Previous Message Craig Ringer 2010-10-19 00:20:29 Re: installing from source in Windows