pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Phillip Smith <phillips@weatherbeeta.com.au>
To: pgsql-sql@postgresql.org
Subject: Re: SELECT Aggregate
Date: Thu, 29 Jun 2006 21:48:15 -0700 (PDT)
Message-ID: <20060630044815.60284.qmail@web31805.mail.mud.yahoo.com> (raw)
In-Reply-To: <006a01c69bf0$97a028f0$9b0014ac@ITPhil>

> Well whatdyaknow?? Being a Postgres newbie I hadn't even played with indexes
> yet. They're awesome!!
> Using Richard's suggestion of the Sub-Select in the COLUMN list, combined
> with adding some indexes, I can now return this in under 5 seconds!

Also, another way to improve preformance will be to analyze the affected tables.  Analyze will
ensure that the query planner has accurate statics by which it will use in picking fastest
possible query.

If you ever plan on updating or deleting records.  You will also need to vacuum the table.  And an
additional measure of maintance would be to re-index the database.

All of this is listing in the postgresql manual.  If you really want to ensure the best possible
speeds, it will be an important step to take.

Regards,

Richard Broersma Jr.



view thread (9+ messages)

Message-ID: <20060630044815.60284.qmail@web31805.mail.mud.yahoo.com>
Permalink:  ../20060630044815.60284.qmail@web31805.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20060630044815.60284.qmail@web31805.mail.mud.yahoo.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-sql@postgresql.org
  Cc: rabroersma@yahoo.com, phillips@weatherbeeta.com.au
  Subject: Re: SELECT Aggregate
  In-Reply-To: <20060630044815.60284.qmail@web31805.mail.mud.yahoo.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