Is it worth allowing this:

select count(*) from users_users where position('ch' in username) = 0;

To be able to use an index, like:

select count(*) from users_users where username like 'ch%';

At the moment the position() syntax will do a seqscan, but the like syntax will use an index.

Chris


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to