From: Tomasz Myrta <jasiek@klaster.net>
To: Andreas Pflug <Andreas.Pflug@web.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow query performance on large table
Date: Tue, 04 Mar 2003 18:20:57 +0100
Message-ID: <3E64E079.8050807@klaster.net> (raw)
References: <000001c2e25c$ad506170$0c64a8c0@paulspc>
<23081.1046790781@sss.pgh.pa.us>
<3E64D694.9050309@web.de>
Andreas Pflug wrote:
> Tom,
>
> does this mean that a primary key alone might not be enough? As far as I
> understood Paul, the PK looks quite as the newly created index does, so
> "create index ind_meas on measurement (assessment,time)" should perform
> the same as "... primary key(assessment,time)".
> Do possibly non-optimal indices (only assessment, only time as Paul
> described earlier) screw up the optimizer, igoring the better option
> usiing the PK? Obviously, the index used should be combined of
> (assessment,time) but IMHO a PK should be enough.
>
> regards,
>
> Andreas
You are right - primary key should be ok, but Paul lost it. psql \d
shows primary key indexes, but in this case there was no such primary key.
Regards,
Tomasz Myrta
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: jasiek@klaster.net, Andreas.Pflug@web.de
Subject: Re: Slow query performance on large table
In-Reply-To: <3E64E079.8050807@klaster.net>
References: <000001c2e25c$ad506170$0c64a8c0@paulspc> <23081.1046790781@sss.pgh.pa.us> <3E64D694.9050309@web.de> <3E64E079.8050807@klaster.net>
* 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