Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DD1DB9FB48B for ; Wed, 18 Oct 2006 00:41:46 -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 67358-07 for ; Wed, 18 Oct 2006 00:41:44 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by postgresql.org (Postfix) with ESMTP id 0C1B29FB4C2 for ; Wed, 18 Oct 2006 00:41:41 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id i2so553940nfe for ; Tue, 17 Oct 2006 20:41:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jkSC8mauAVVU1weA3Ww1b8ZWKp1Rm0BKEBEL1y5BovdZSAFBjYmG5FtxMRfU8sLqQHk0nY4bO228sLmI/o9DRXJIcA0JkUKBC101Bl3ZmjXI1sEenFd4e2SYwPimh1gQJPxYdoXrxzoCkPYUyOiEcj3Js+MTiSYhBpDT9vui8ls= Received: by 10.78.193.19 with SMTP id q19mr10381640huf; Tue, 17 Oct 2006 20:41:40 -0700 (PDT) Received: by 10.78.35.18 with HTTP; Tue, 17 Oct 2006 20:41:40 -0700 (PDT) Message-ID: Date: Wed, 18 Oct 2006 09:11:40 +0530 From: "Merlin Moncure" To: "Bucky Jordan" Subject: Re: Jdbc/postgres performance Cc: Rohit_Behl , pgsql-performance@postgresql.org In-Reply-To: <78ED28FACE63744386D68D8A9D1CF5D4209D1C@MAIL.corp.lumeta.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <78ED28FACE63744386D68D8A9D1CF5D4209D1C@MAIL.corp.lumeta.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.256 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/340 X-Sequence-Number: 21469 On 10/18/06, Bucky Jordan wrote: > > On 10/17/06, Rohit_Behl wrote: > > > Select events.event_id, ctrl.real_name, events.tsds, events.value, > > events.lds, events.correction, ctrl.type, ctrl.freq from table events, > > iso_midw_control ctrl where events.obj_id = ctrl.obj_id and > > events.event_id > ?::bigint order by events.event_id limit ? > > > After a quick search on the JDBC list, it looks like there's some recent > discussion on the subject of how to give the planner better insight for > prepared statements (the subject is "Blind Message" if you're > looking...). > > So, I'm off to go read there and perhaps join the jdbc mailing list too. this is not really a jdbc issue, just a practical problem with prepared statements...except for the mechanism if any the jdbc driver allows you to choose if a statement is prepared. > But, a more general postgres question. I assume if I want to turn > prepared statements off altogether (say I'm using a jdbc abstraction you turn off prepared statements by not invoking sql prepare or PQprepare. (or, if jdbc implements its own protocol client, it's version of PQprepare). > layer that likes parameterized statements, and there's other benefits to > parameterizing other than just saving on db parse/plan) can I set > max_prepared_transactions to 0? Is there any other option outside of this setting is for 2pc and is not relevent to the discussion :) even if it were, im not so sure about a setting designed to enforce a partcular method of querying. yes, you are correct this is not exactly the use case for hints being discussed in -hackers. however, imho, this is much more important and relevant so long as prepared statements continue to work the way they do. merlin