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

Поиск
Список
Период
Сортировка
Искать
От
Vivek Khera
Тема
Re: [ADMIN] Q: Structured index - which one runs faster?
Дата
в 11:45:53
Msg-id
x7ptm94s4z.fsf@yertle.int.kciLink.com
Список
Дерево обсуждения
Re: [ADMIN] Q: Structured index - which one runs faster? Vivek Khera <khera@kcilink.com>
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? Vivek Khera <khera@kcilink.com>
Re: [ADMIN] Q: Structured index - which one runs faster? Bruno Wolff III <bruno@wolff.to>
Re: [ADMIN] Q: Structured index - which one runs faster? Manfred Koizar <mkoi-pg@aon.at>
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 по дате отправления
От: alex b.
Дата:
Сообщение: Re: caching query results
От: scott.marlowe
Дата:
Сообщение: Re: Tool for BackUp
FAQ