pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Neil Conway <neilc@samurai.com>
To: Patrick Hatcher <PHatcher@macys.com>
Cc: scrappy@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: *very* slow query to summarize data for a month ...
Date: Mon, 10 Nov 2003 17:51:10 -0500
Message-ID: <87u15bx2g1.fsf@mailbox.samurai.com> (raw)
In-Reply-To: <OF43AE737E.7548A814-ON88256DDA.00707536-88256DDA.00715E91@fds.com>
References: <OF43AE737E.7548A814-ON88256DDA.00707536-88256DDA.00715E91@fds.com>

"Patrick Hatcher" <PHatcher@macys.com> writes:
> Do you have an index on ts.bytes?  Josh had suggested this and after I put
> it on my summed fields, I saw a speed increase.

What's the reasoning behind this? ISTM that sum() should never use an
index, nor would it benefit from using one.

-Neil




view thread (19+ messages)  latest in thread

Message-ID: <87u15bx2g1.fsf@mailbox.samurai.com>
Permalink:  ../87u15bx2g1.fsf@mailbox.samurai.com/
Also on:    postgresql.org/message-id/87u15bx2g1.fsf@mailbox.samurai.com

 · 

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: neilc@samurai.com, PHatcher@macys.com, scrappy@postgresql.org
  Subject: Re: *very* slow query to summarize data for a month ...
  In-Reply-To: <87u15bx2g1.fsf@mailbox.samurai.com>

* 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