Re: Performance Expectations

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Derek Hamilton <derek(at)capweb(dot)com>
Cc: Marc Mitchell <marcm(at)eisolution(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Performance Expectations
Date: 2003-04-18 20:05:51
Message-ID: 20030418200551.GA17645@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Apr 18, 2003 at 12:55:35 -0700,
Derek Hamilton <derek(at)capweb(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sean Chittenden 2003-04-18 20:18:26 Re: max_connections limit
Previous Message Derek Hamilton 2003-04-18 19:55:35 Re: Performance Expectations