Re: More indexes...more better?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: More indexes...more better?
Дата
Msg-id Pine.LNX.4.44.0206242239210.16955-100000@cm-lcon-46-187.cm.vtr.net
обсуждение исходный текст
Ответ на More indexes...more better?  (Varun Kacholia <varunk@cse.iitb.ac.in>)
Список pgsql-general
Varun Kacholia dijo:

>  hi ,
>   I wanted to know whether it is better (speed-wise) to have more
>   indexes .Or one should try to have less number of them , so that
>   as much as possible all can be stored 'in-memory'? Or is it
>   that they are loaded 'in-memory' only after the analyzer
>   decides which of them to use?
>    I am having 12 indexes on 6 tables(they are huge with 0.5 million
>    rows in each).

Every index you have adds some maintenance overhead when you INSERT,
UPDATE or DELETE.  Therefore, for those operations, the less indexes,
the better.  However you should have the indexes you need for SELECT
operations.  You have to find out which ones do your queries use, by
means of EXPLAINing them.

Don't forget to VACUUM and ANALYZE your tables.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"El destino baraja y nosotros jugamos" (A. Schopenhauer)




В списке pgsql-general по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Proxy Server ...
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Proxy Server ...