Re: explain analyze output for review (was: optimizing a geo_distance()...)

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Mark Stosberg <mark(at)summersault(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: explain analyze output for review (was: optimizing a geo_distance()...)
Date: 2007-02-06 15:45:08
Message-ID: 20070206154508.GA13065@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Feb 06, 2007 at 09:39:54 -0500,
Mark Stosberg <mark(at)summersault(dot)com> wrote:
>
> I've been investigating partial indexes for the pets table. It has about
> 300,000 rows, but only about 10 are "active", and those are the ones we
> are care about. Queries are also frequently made on males vs females, dogs vs cats

It probably won't pay to make partial indexes on sex or species (at least
for the popular ones), as you aren't likely to save enough by eliminating only
half the cases to make up for maintaining another index. A partial index for
active rows probably does make sense.

> or specific ages, and those specific cases seem like possible candidates for partial indexes
> as well. I played with that approach some, but had trouble coming up with any thing that
> benchmarked faster.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2007-02-06 16:14:44 Re: How long should it take to insert 200,000 records?
Previous Message Hiltibidal, Robert 2007-02-06 15:04:54 Re: explain analyze output for review (was: optimizing a geo_distance()...)