select count(*) status these days

Поиск
Список
Период
Сортировка
От Dennis Gearon
Тема select count(*) status these days
Дата
Msg-id 123082.49872.qm@web82103.mail.mud.yahoo.com
обсуждение исходный текст
Ответы Re: select count(*) status these days
Re: select count(*) status these days
Список pgsql-general
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? 

Is there any architectural way to speed it up? I'd actually like to run it every 2-60 seconds to update a counter on a
pagefor the marketing guy, (which for once, is me :-) 

Dennis Gearon

Signature Warning
----------------
It is always a good idea to learn from your own mistakes. It is usually a better idea to learn from others’ mistakes,
soyou do not have to make them yourself. from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036' 

EARTH has a Right To Life,
  otherwise we all die.

В списке pgsql-general по дате отправления:

Предыдущее
От: "Turner, John J"
Дата:
Сообщение: Re: installing from source in Windows
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: installing from source in Windows