X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 903064758F1 for ; Thu, 17 Apr 2003 03:13:47 -0400 (EDT) Received: from newgen.co.in (unknown [203.168.76.148]) by postgresql.org (Postfix) with ESMTP id DE9AC475458 for ; Thu, 17 Apr 2003 03:13:44 -0400 (EDT) Received: from nhweb.newgen.co.in ([203.168.76.5]) by newgen.co.in (8.11.6/8.11.6) with ESMTP id h3HCh1305872 for ; Thu, 17 Apr 2003 18:13:01 +0530 Received: from maggon (ws40.newgen.co.in [192.168.5.40]) by nhweb.newgen.co.in (8.12.3/8.12.3/Debian -4) with SMTP id h3H7BRpv012477 for ; Thu, 17 Apr 2003 12:41:30 +0530 Reply-To: From: "Sameer Maggon" To: Subject: IN Qeury Problem Date: Thu, 17 Apr 2003 12:27:54 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Spam-Status: No, hits=-6.1 required=5.0 tests=BAYES_30,DATE_IN_FUTURE_06_12,MSGID_GOOD_EXCHANGE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/257 X-Sequence-Number: 12958 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