From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | ow <oneway_111(at)yahoo(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: pg 7.4.rc1, Range query performance |
Date: | 2003-11-09 02:37:45 |
Message-ID: | 20031108183630.I51201@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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 ;) ).
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2003-11-09 20:36:38 | Re: transaction management in plpgsql functions |
Previous Message | Bruce Momjian | 2003-11-09 02:17:10 | Re: pg 7.4.rc1, Range query performance |