X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CB37E53396 for ; Thu, 12 May 2005 13:37:50 -0300 (ADT) 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 77945-01 for ; Thu, 12 May 2005 16:37:49 +0000 (GMT) Received: from mail.liquidcore.com (mail.liquidcore.net [68.17.96.60]) by svr1.postgresql.org (Postfix) with ESMTP id 2C806533FE for ; Thu, 12 May 2005 13:37:48 -0300 (ADT) Received: (from root@localhost) by mail.liquidcore.com (8.13.1/8.12.10) id j4CGbxuW025654; Thu, 12 May 2005 11:37:59 -0500 Received: from [192.168.0.81] (ppasalalinux.nqadmin.com [192.168.0.81]) by mail.liquidcore.com (8.13.1/8.12.10) with ESMTP id j4CGbxrS025624; Thu, 12 May 2005 11:37:59 -0500 Message-ID: <42838721.50801@nqadmin.com> Date: Thu, 12 May 2005 11:41:05 -0500 From: Prasanth Reply-To: dbadmin@nqadmin.com User-Agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-admin@postgresql.org Subject: Re: Query Plan - Index Scan & Seq Scan References: <428370AC.3070207@nqadmin.com> <886.1115910870@sss.pgh.pa.us> <428379E0.4010709@nqadmin.com> <2052.1115913920@sss.pgh.pa.us> <428381C3.80205@nqadmin.com> <6708.1115915406@sss.pgh.pa.us> In-Reply-To: <6708.1115915406@sss.pgh.pa.us> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-scanner: scanned for malicious content X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.051 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200505/159 X-Sequence-Number: 17588 Sorry seems like I am missing some thing here. What is the difference between int2 & int4 as far as index scan is concerned? I did try to update to 8.0 but it is not taking my dump from 7.4.7. If I remember right it was complaining about pg_database being not present. I posted a message on forums no response so I had to abort it. I will give it a short again when I have some time. I think pg_database belongs to pgadmin. I can drop those tables and create a dump but then if for some reason I have to restore a old dump them I will be in trouble. Thanks, -Prasanth. Tom Lane wrote: > Prasanth writes: > >>code data type is int2. > > > Ah-hah. So "where code > 2::int2" should work noticeably better for > you. Or you could do "where code > '2'" to avoid hard-wiring the data > type knowledge into your queries. Or just change it to int4 ;-) > Or update to 8.0. > > regards, tom lane > >