IN Qeury Problem - Mailing list pgsql-sql

From Sameer Maggon
Subject IN Qeury Problem
Date
Msg-id PIEELGOGLBEAPIHJAMIDEEMHCHAA.maggon@newgen.co.in
Whole thread Raw
Responses Re: IN Qeury Problem  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Re: IN Qeury Problem  (Wei Weng <wweng@kencast.com>)
List pgsql-sql
Hello,
 I am facing a problem regarding the performance of postgres. I am
concerned about the speed of the execution of a query when large number of
entries is given in the IN clause.

I have a Table with columns:

FolderName (Indexed)
FolderIndex (Indexed)
ParentFolderIndex (Indexed)
...
..

I have a query where i do a SELECT

SELECT * FROM FolderTable WHERE PARENTFOLDERINDEX IN (38::int8, ......);

If the number of values in IN clause is small, its working fine, but as and
when the number of values increases the speed of the query is detoriating
with a steep curve.

How can this problem be solved ?

Thanks and Regards
Sameer Maggon



pgsql-sql by date:

Previous
From: "David Stanaway"
Date:
Subject: Equivalent of inet type for phone number?
Next
From: Rajesh Kumar Mallah
Date:
Subject: analyse question..