Re: Indexes with condition using immutable functions applied to column not used
От | Robert Haas |
---|---|
Тема | Re: Indexes with condition using immutable functions applied to column not used |
Дата | |
Msg-id | AANLkTinEjAWSD8cObVgS1-YrnVS=7TScCGkpRWEQ0DHs@mail.gmail.com обсуждение исходный текст |
Ответ на | Indexes with condition using immutable functions applied to column not used (Sylvain Rabot <sylvain@abstraction.fr>) |
Список | pgsql-performance |
On Mon, Feb 7, 2011 at 7:14 PM, Sylvain Rabot <sylvain@abstraction.fr> wrote: > First I would like to know if there is more advantage than overhead to > split an index in several ones using conditions I don't see why that would be any better than just defining one big index. > e.g. doing : > > CREATE INDEX directory_id_user_0_btree_idx ON mike.directory USING btree (id_user) WHERE id_user < 250000; > CREATE INDEX directory_id_user_250000_btree_idx ON mike.directory USING btree (id_user) WHERE id_user >= 250000 AND id_user< 500000; > CREATE INDEX directory_id_user_500000_btree_idx ON mike.directory USING btree (id_user) WHERE id_user >= 500000 AND id_user< 750000; > CREATE INDEX directory_id_user_750000_btree_idx ON mike.directory USING btree (id_user) WHERE id_user >= 750000 AND id_user< 1000000; > > instead of having only one index for all the id_user. the forecasts for > the table directory are +500 millions records and something like 1 > million distinct id_user. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-performance по дате отправления: