Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8A94D9FB672 for ; Mon, 16 Apr 2007 16:22:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 50739-03 for ; Mon, 16 Apr 2007 16:21:59 -0300 (ADT) X-Greylist: delayed 04:56:57.180737 by SQLgrey-1.7.4 Received: from mail.part.net (ip67-88-113-20.z113-88-67.customer.algx.net [67.88.113.20]) by postgresql.org (Postfix) with ESMTP id E0FA99FB631 for ; Mon, 16 Apr 2007 16:21:59 -0300 (ADT) Received: from localhost (mail [127.0.0.1]) by mail.part.net (Postfix) with ESMTP id 419EB180EF; Mon, 16 Apr 2007 13:21:58 -0600 (MDT) X-Virus-Scanned: amavisd-new at part.net Received: from mail.part.net ([127.0.0.1]) by localhost (mail.part.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qxazuDRdqZCH; Mon, 16 Apr 2007 13:21:30 -0600 (MDT) Received: from [192.168.5.22] (titanium.part.net [192.168.5.22]) by mail.part.net (Postfix) with ESMTP id 2FB2F180F2; Mon, 16 Apr 2007 13:21:29 -0600 (MDT) Message-ID: <4623CCA0.305@part.net> Date: Mon, 16 Apr 2007 13:21:04 -0600 From: James House User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Kris Jurka CC: pgsql-jdbc@postgresql.org Subject: Re: Prepared Statements: Inefficient Type Conversion? References: <46238730.6060903@part.net> In-Reply-To: Content-Type: multipart/mixed; boundary="------------060201090101040109050001" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/53 X-Sequence-Number: 16902 This is a multi-part message in MIME format. --------------060201090101040109050001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kris Jurka wrote: >> It seems that using the prepared statement to pass the value as a >> string causes all of the 40 million upid values in the table to >> convert to string, rather than the string parameter being converted >> to a number. Can't the driver be smarter than that? > > > You can try adding the url parameter stringtype=unspecified which will > pass the String parameter untyped instead of as a String. FWIW, that didn't seem to make a difference - actually, it takes even longer to execute. Thanks anyway. We'll try to get the datatype of the column changed. --------------060201090101040109050001 Content-Type: text/x-vcard; charset=utf-8; name="jhouse.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="jhouse.vcf" begin:vcard fn:James House n:House;James org:Partnet, Inc.;Engineering adr;dom:;;;Salt Lake City;UT email;internet:jhouse@part.net title:Software Development Manager tel;work:801 581-1118 x.9718 tel;fax:801 581-1785 x-mozilla-html:TRUE version:2.1 end:vcard --------------060201090101040109050001--