From: Bruno Wolff III <bruno@wolff.to>
To: Derek Hamilton <derek@capweb.com>
Cc: Marc Mitchell <marcm@eisolution.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Performance Expectations
Date: Fri, 18 Apr 2003 15:05:51 -0500
Message-ID: <20030418200551.GA17645@wolff.to> (raw)
In-Reply-To: <000401c305e4$7aaa2840$1b01a8c0@jcaves.net>
References: <000501c305d7$b001a070$1b01a8c0@jcaves.net>
<006c01c305db$28050460$6701050a@eisolution.com>
<000401c305e4$7aaa2840$1b01a8c0@jcaves.net>
On Fri, Apr 18, 2003 at 12:55:35 -0700,
Derek Hamilton <derek@capweb.com> wrote:
> Hey Marc,
>
> I've run the EXPLAIN statement on the query and it does use the index.
>
> I also use an "order by" on the table that does not include the indexed
> field. Would adding an index for the fields I'm ordering by help at all?
Maybe. If the search returns only a small portion of the records in the
table it is probably more efficient to use the current index for searching
and then do a sort on the returned records rather than scan the table
in the output order selecting records that match the search criteria.
Also extra indexes will slow down inserts and updates so if you are doing
a lot of those, you need to balance that against your select performance.
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-admin@postgresql.org
Cc: bruno@wolff.to, derek@capweb.com, marcm@eisolution.com
Subject: Re: Performance Expectations
In-Reply-To: <20030418200551.GA17645@wolff.to>
References: <000501c305d7$b001a070$1b01a8c0@jcaves.net> <006c01c305db$28050460$6701050a@eisolution.com> <000401c305e4$7aaa2840$1b01a8c0@jcaves.net> <20030418200551.GA17645@wolff.to>
* 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