From: | - - <loh(dot)law(at)hotmail(dot)com> |
---|---|
To: | <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Query with rightmost function does not use index |
Date: | 2011-08-08 05:27:49 |
Message-ID: | BAY147-W2DE1CC19183EB316AECA9F0210@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
But why? The expression is not on the left side of the WHERE clause.
> Hello
>
> use a functional index
>
> http://www.postgresql.org/docs/8.4/interactive/indexes-expressional.html
>
> Regards
>
> Pavel Stehule
>
> 2011/8/8 - - <loh(dot)law(at)hotmail(dot)com>:
> > For a table where column col has an index, the query:
> > SELECT ... FROM ... WHERE col = MD5('')
> > doesn't seem to use an index but
> > SELECT ... FROM ... WHERE col = 'd41d8cd98f00b204e9800998ecf8427e'
> > does.
> >
> > Is this a gotcha?
> > I'm using PostgreSQL 8.4.8 on i686-pc-linux-gnu, compiled by GCC
> > gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 32-bit
> >
> >
> >
From | Date | Subject | |
---|---|---|---|
Next Message | pasman pasmański | 2011-08-08 05:31:56 | Re: Query with rightmost function does not use index |
Previous Message | John R Pierce | 2011-08-08 05:03:45 | Re: Granting Privileges in Postgres |