Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Using index wit...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3339 of 3799
Post > Topic >>

Using index with array ANY operator

by ml <marlag@[EMAIL PROTECTED] > Mar 10, 2008 at 08:21 AM

Hello,

 I have some function with integer[] argument and the body uses
"column = ANY( $1)" construction.
 If I evaluate the function body in regular query I can see that index
on 'column' is not used.
 When I change query into "column IN( x, y, z)" I can see that index
is used and of course the query time
 is shorter. But in this case I have problem with appropriate argument
passing (array cannot be used with
 IN)

 My questions:
 1. How to optimize ANY operator to use index on column (is it
possible?)
 2. Or how to convert array into "integer list" acceptable by "IN
operator"

Has anyone some hint?

ml.
 




 1 Posts in Topic:
Using index with array ANY operator
ml <marlag@[EMAIL PROT  2008-03-10 08:21:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 22:00:23 CST 2008.