Re: [GENERAL] Query with rightmost function does not use index

2011-08-08 Thread Andres Freund
Hi, On Monday, August 08, 2011 15:40:20 - - wrote: > explain analyze select * from filter_item where filter_hash = MD5(''); > > QUERY PLAN > > ---

Re: [GENERAL] Query with rightmost function does not use index

2011-08-08 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of - - Sent: Monday, August 08, 2011 3:40 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Query with rightmost function does not use index Here are the EXPLAIN ANALYZE outputs: explain

Re: [GENERAL] Query with rightmost function does not use index

2011-08-08 Thread - -
Here are the EXPLAIN ANALYZE outputs: explain analyze select * from filter_item where filter_hash = MD5(''); QUERY PLAN -

Re: [GENERAL] Query with rightmost function does not use index

2011-08-07 Thread pasman pasmański
Here may be other problem. Show us the result of EXPLAIN Analyze. 2011/8/8, Pavel Stehule : > Hello > > use a functional index > > http://www.postgresql.org/docs/8.4/interactive/indexes-expressional.html > > Regards > > Pavel Stehule > > 2011/8/8 - - : >> For a table where column col has an index,

Re: [GENERAL] Query with rightmost function does not use index

2011-08-07 Thread - -
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 - - : > > For a table where column col has an index, the query: > >

Re: [GENERAL] Query with rightmost function does not use index

2011-08-07 Thread Pavel Stehule
Hello use a functional index http://www.postgresql.org/docs/8.4/interactive/indexes-expressional.html Regards Pavel Stehule 2011/8/8 - - : > 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 ...