Re: [ADMIN] Q: Structured index - which one runs faster?

From: Vivek Khera <khera(at)kcilink(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [ADMIN] Q: Structured index - which one runs faster?
Date: 2003-05-23 15:09:00
Message-ID: x7ptm94s4z.fsf@yertle.int.kciLink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-performance

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(at)kciLink(dot)com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Oleg Bartunov 2003-05-23 15:12:14 Re: upgrade issue
Previous Message Jodi Kanter 2003-05-23 14:01:08 upgrade issue

Browse pgsql-general by date

  From Date Subject
Next Message Johann Thoyer 2003-05-23 15:09:32 pg_connect()
Previous Message alex b. 2003-05-23 14:47:39 Re: caching query results

Browse pgsql-performance by date

  From Date Subject
Next Message scott.marlowe 2003-05-23 16:13:47 Re: postgres on a beowulf? (AMD)opteron?
Previous Message Stephan Szabo 2003-05-23 06:42:36 Re: [ADMIN] Q: Structured index - which one runs faster?