pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: ow <oneway_111@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: pg 7.4.rc1, Range query performance
Date: Sat, 8 Nov 2003 18:37:45 -0800 (PST)
Message-ID: <20031108183630.I51201@megazone.bigpanda.com> (raw)
In-Reply-To: <20031109021012.65828.qmail@web21401.mail.yahoo.com>
References: <20031109021012.65828.qmail@web21401.mail.yahoo.com>

On Sat, 8 Nov 2003, ow wrote:

> Postgresql 7.4.rc1 on i686 pc linux compiled by gcc 2.06.
> All configuration settings are default.
>
>
> Hi,
>
> Trying to find a way to improve range query performance.
>
> The table Test has about 30 million records.
>
> -- DLong, Dtimestamp, Dint, etc are domains of the respective types.
> create table Test (
> id              DLong               not null,
> a               Dtimestamp              null,
> b               Dint                not null,
> c               Dint                not null,
> d               Dstring                 null,
> constraint PK_id primary key (id),
> constraint AK_abc unique (a, b, c)
> );

I'm not sure that AK_abc is the best index for check a range on a and
single values on b and c.  I'd think that something like an index
on (b,c,a) would probably be better for this purpose (without doing any
testing ;) ).



view thread (12+ messages)  latest in thread

Message-ID: <20031108183630.I51201@megazone.bigpanda.com>
Permalink:  ../20031108183630.I51201@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20031108183630.I51201@megazone.bigpanda.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: sszabo@megazone.bigpanda.com, oneway_111@yahoo.com
  Subject: Re: pg 7.4.rc1, Range query performance
  In-Reply-To: <20031108183630.I51201@megazone.bigpanda.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