X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 931673A4881 for ; Thu, 25 Nov 2004 23:55:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22263-07 for ; Thu, 25 Nov 2004 23:55:27 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id E99923A4878 for ; Thu, 25 Nov 2004 23:55:29 +0000 (GMT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1CXTSO-0008Ok-00; Fri, 26 Nov 2004 12:55:24 +1300 Message-ID: <41A67210.8010206@opencloud.com> Date: Fri, 26 Nov 2004 13:00:16 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.9 (X11/20041115) X-Accept-Language: en-us, en MIME-Version: 1.0 To: paree@LEXUM.UMontreal.CA Cc: pgsql-jdbc@postgresql.org Subject: Re: using index with bigint pkey References: <1101425976.3726.56.camel@localhost.localdomain> In-Reply-To: <1101425976.3726.56.camel@localhost.localdomain> X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/209 X-Sequence-Number: 11631 Éric Paré wrote: > I found that running a simple query on a bigint index does not behave as > expected in the planner. This query does not use the index on 'a pkey > id column' if it is of bigint type : > Note on setup : > - postgresql 7.4.1 server > - postgresql-7.4.1-jdbc3.jar Use an 8.0 server (allows cross-type index use), or the development JDBC driver (sends longs as BIGINT via the V3 protocol). -O