X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DD9EC9FB26D for ; Wed, 2 Aug 2006 11:33:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 57638-07 for ; Wed, 2 Aug 2006 11:32:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.ecircle.de (mail.ecircle.de [195.140.186.200]) by postgresql.org (Postfix) with ESMTP id 6FC839FB256 for ; Wed, 2 Aug 2006 11:32:56 -0300 (ADT) Received: from einstein.muc.ecircle.de (einstein.muc.ecircle.de [192.168.1.7]) by mail.ecircle.de (READY) with ESMTP id 6625A55C006 for ; Wed, 2 Aug 2006 16:32:54 +0200 (CEST) Received: from [192.168.1.91] ([192.168.1.91]) by einstein.muc.ecircle.de with Microsoft SMTPSVC(6.0.3790.1830); Wed, 2 Aug 2006 16:33:17 +0200 Subject: PGStatement#setPrepareThreshold From: Csaba Nagy To: Postgres JDBC Content-Type: text/plain Message-Id: <1154529173.21451.27.camel@coppola.muc.ecircle.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 02 Aug 2006 16:32:54 +0200 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Aug 2006 14:33:17.0426 (UTC) FILETIME=[9832B520:01C6B640] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.49 tagged_above=0 required=5 tests=AWL, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/8 X-Sequence-Number: 15535 Hi all, Question: will PGStatement.setPrepareThreshold(1) cause server side prepare to be used already on the first execution, or only after the second one ? The problem: I want to force server side prepare at least for some of the queries on my system, as the query plan is completely bad if the server knows the parameters when planning (due to null values in IN list, nothing to be fixed in my application unless I completely rewrite some parts of it). I couldn't figure out this from the log files... postgres logs the queries as , but that doesn't tell me too much. Is there a way to force server side prepare from the first query ? Thanks, Csaba.