From: Rod Taylor <rbt@rbt.ca>
To: Robert Treat <xzilla@users.sourceforge.net>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: redundent index?
Date: Wed, 29 Oct 2003 10:17:24 -0500
Message-ID: <1067440627.5789.2.camel@jester> (raw)
In-Reply-To: <1067436236.2069.28785.camel@camel>
References: <1067436236.2069.28785.camel@camel>
On Wed, 2003-10-29 at 09:03, Robert Treat wrote:
> I just noticed on one of my tables I have the following two indexes:
>
> Indexes: entity_watch_map_pkey primary key btree (entity_id, watch_id),
> ewm_entity_id btree (entity_id),
>
>
> I can't think of why the second index is there, as ISTM there is no
> instance where the first index wouldn't be used in place of the second
The cost in evaluating the first index will be a little higher (more
data to pull off disk due to second item), so there may be a few
borderline cases that could switch to a sequential scan rather than an
index scan.
Attachments:
signature.asc (application/pgp-signature, 186B) download
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: rbt@rbt.ca, xzilla@users.sourceforge.net
Subject: Re: redundent index?
In-Reply-To: <1067440627.5789.2.camel@jester>
* 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