Re: [PERFORM] Indexes with condition using immutable functions applied to column not used

2011-02-27 Thread Robert Haas
On Mon, Feb 7, 2011 at 7:14 PM, Sylvain Rabot 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_

Re: [PERFORM] Indexes with condition using immutable functions applied to column not used

2011-02-08 Thread Sylvain Rabot
On Tue, 2011-02-08 at 06:15 +0100, Jesper Krogh wrote: > On 2011-02-08 01:14, Sylvain Rabot wrote: > > CREATE INDEX directory_id_user_mod_cons_hash_0_btree_idx ON mike.directory > > USING btree (id_user) WHERE __mod_cons_hash(id_user, 4) = 0; > > CREATE INDEX directory_id_user_mod_cons_hash_1_btre

Re: [PERFORM] Indexes with condition using immutable functions applied to column not used

2011-02-07 Thread Jesper Krogh
On 2011-02-08 01:14, Sylvain Rabot wrote: CREATE INDEX directory_id_user_mod_cons_hash_0_btree_idx ON mike.directory USING btree (id_user) WHERE __mod_cons_hash(id_user, 4) = 0; CREATE INDEX directory_id_user_mod_cons_hash_1_btree_idx ON mike.directory USING btree (id_user) WHERE __mod_cons_has

[PERFORM] Indexes with condition using immutable functions applied to column not used

2011-02-07 Thread Sylvain Rabot
Hi, I am trying to understand how indexes works to get the most of them. First I would like to know if there is more advantage than overhead to split an index in several ones using conditions e.g. doing : CREATE INDEX directory_id_user_0_btree_idx ON mike.directory USING btree (id_user) WHERE i