pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre-Frédéric Caillaud <lists@boutiquenumerique.com>
To: pgsql-performance@postgresql.org
Subject: Re: Why does a simple query not use an obvious index?
Date: Mon, 30 Aug 2004 21:21:26 +0200
Message-ID: <opsdj710chcq72hf@musicbox> (raw)
In-Reply-To: <87fz65k5sq.fsf@stark.xeocode.com>
References: <ENEIKKAEJOFHOIHMMOIDIEBMJCAA.jack.kerkhof@guest-tek.com>
	<1093804128.5493.22.camel@localhost.localdomain>
	<87fz65k5sq.fsf@stark.xeocode.com>

>> 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:


	By the way, in an ideal world, count(*) should only read the index on the  
timetamp column, not the rows. I guess this is not the case. Would this be  
an useful optimization ?



view thread (28+ messages)  latest in thread

Message-ID: <opsdj710chcq72hf@musicbox>
Permalink:  ../opsdj710chcq72hf@musicbox/
Also on:    postgresql.org/message-id/opsdj710chcq72hf@musicbox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: lists@boutiquenumerique.com
  Subject: Re: Why does a simple query not use an obvious index?
  In-Reply-To: <opsdj710chcq72hf@musicbox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox