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

2011-02-11 Thread Nick Lello
rom directory where id_user = 4; > >QUERY > PLAN > > > ----- > > Index Scan using directory_id_user_4_btree_idx on directory > (cost=0.00..10.58 rows=67 width=148) (actual time=0.245..8.262 rows=10303 > loops=1) > >Index Cond: (id_user = 4) > > Total runtime: 11.110 ms > > (3 rows) > > > > As you see the index condition although, differently written, is the > > same but the second index is not used apparently because the immutable > > function is applied on the column. > > > > So do you know the reason why the planner is not able to use indexes > > which have immutable functions applied to the column in their > > condition ? > > > > Regards. > > > > -- > Sylvain Rabot > -- Nick Lello | Web Architect o +44 (0) 8433309374 | m +44 (0) 7917 138319 Email: nick.lello at rentrak.com RENTRAK | www.rentrak.com | NASDAQ: RENT

Re: [HACKERS] [PERFORM] Slow count(*) again...

2011-02-06 Thread Nick Lello
> > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance > -- Nick Lello | Web Architect o +44 (0) 8433309374 | m +44 (0) 7917 138319 Email: nick.lello at rentrak.com RENTRAK | www.rentrak.com | NASDAQ: RENT