Haifeng Liu
2012-12-25 11:37:10 UTC
Hi,
I found that queries like "select * from tbl where col1 like 'abc%'" will use index only when the col1(and the index) use 'C' collation. If I use 'default' which is 'en_US.utf8' in my database, the equation condition will use the index but like query will not.
I also tried to specify the collation explicitly: like ('abc%' collate 'en_US.utf8'), not work too.
Is that only 'C' collation support 'like' query or I missed something in my sql? Or do I need to install something additional to support index on other collation?
Thanks in advance.
I found that queries like "select * from tbl where col1 like 'abc%'" will use index only when the col1(and the index) use 'C' collation. If I use 'default' which is 'en_US.utf8' in my database, the equation condition will use the index but like query will not.
I also tried to specify the collation explicitly: like ('abc%' collate 'en_US.utf8'), not work too.
Is that only 'C' collation support 'like' query or I missed something in my sql? Or do I need to install something additional to support index on other collation?
Thanks in advance.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin