From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | charles <czl(at)iname(dot)com> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: performance problem with 3-column indexes |
Date: | 2001-11-07 17:26:00 |
Message-ID: | 20011107092420.V49204-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Can you give an example query and explain output for both cases?
Have you run vacuum analyze?
Since I haven't seen the query, one thing that might bite you would
be if you aren't casting your constants to smallint, although I
don't know why that would change on the index definition.
On 6 Nov 2001, charles wrote:
> the table has about 30k records.
> simple select statement, by primary key, requires plenty of cpu
> time when the primary key has three columns
> when the primary key has two columns several times less cpu is
> required (even though the contents of the table is the same.
>
> so:
> PRIMARY KEY(C_ID, C_D_ID, C_W_ID) -> PRIMARY KEY (C_ID, C_D_ID)
> select cpu: 600 -> select cpu 60
>
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-11-07 17:28:24 | Re: Beta going well |
Previous Message | Stephan Szabo | 2001-11-07 17:23:27 | Re: LIKE predicate and '\' character |