On Mon, Jun 22, 2009 at 08:43:43AM -0700, DaNieL wrote:
> Hi guys, i am in trouble with some simple data that seem like doesnt
> use any index.. and i dont know why.
It can be for a couple of reasons; firstly using an index isn't always a
good thing. In your case I'd guess you probably want to probably want
to do the following when creating the index:
> CREATE INDEX users_nick_index ON users (nickname varchar_pattern_ops);
That will allow PG to use the index in LIKE expressions. For more
details see:
http://www.postgresql.org/docs/current/static/indexes-opclass.html
--
Sam http://samason.me.uk/