Re: [ADMIN] Q: Structured index - which one runs faster? - Mailing list pgsql-general

From Vivek Khera
Subject Re: [ADMIN] Q: Structured index - which one runs faster?
Date
Msg-id x7ptm94s4z.fsf@yertle.int.kciLink.com
Whole thread Raw
In response to Q: Structured index - which one runs faster?  (Ernest E Vogelsinger <ernest@vogelsinger.at>)
Responses Re: [ADMIN] Q: Structured index - which one runs faster?  (Bruno Wolff III <bruno@wolff.to>)
Re: [ADMIN] Q: Structured index - which one runs faster?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [ADMIN] Q: Structured index - which one runs faster?  (Manfred Koizar <mkoi-pg@aon.at>)
List pgsql-general
A related question:

Are any of these indexes redundant:

 CREATE UNIQUE INDEX user_list_id_email ON user_list (owner_id,user_email);
 CREATE INDEX user_list_owner_id ON user_list (owner_id);
 CREATE INDEX user_list_oid_created ON user_list (owner_id,user_created);

In particular, is user_list_owner_id redundant to
user_list_oid_created?  Will the latter be used for queries such as

 SELECT user_fname from user_list where owner_id=34

If so, I can drop the owner_id index.  the _id columns are integers,
created is a datetime, and email is a string.  owner_id is also a
foreign key into the owners table (via REFERENCES), if that matters.

I'd try it out by dropping the index, but reindexing it takes a *LONG*
time which I cannot afford to be unavailable.

Thanks.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/

pgsql-general by date:

Previous
From: "alex b."
Date:
Subject: Re: caching query results
Next
From: "scott.marlowe"
Date:
Subject: Re: Tool for BackUp