Search Postgresql Archives

Re: Why my queryes doesnt not use indexes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux