X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5FF26D1D2E3 for ; Fri, 26 Mar 2004 23:14:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 15739-10 for ; Fri, 26 Mar 2004 19:15:03 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 64988D1DC1E for ; Fri, 26 Mar 2004 19:14:54 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i2QNF1Uj028355; Fri, 26 Mar 2004 18:15:01 -0500 (EST) To: Shiar Cc: pgsql-performance@postgresql.org Subject: Re: bigint index not used In-reply-to: <20040324121125.GE1178@shiar.org> References: <20040324121125.GE1178@shiar.org> Comments: In-reply-to Shiar message dated "Wed, 24 Mar 2004 13:11:25 +0100" Date: Fri, 26 Mar 2004 18:15:01 -0500 Message-ID: <28354.1080342901@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/388 X-Sequence-Number: 6244 Shiar writes: >> EXPLAIN ANALYZE SELECT id FROM userinfo WHERE icq <> '0'; > Seq Scan on userinfo (cost=0.00..47355.90 rows=849244 width=4) (actual time=0.563..1222.963 rows=48797 loops=1) > Filter: (icq <> 0::bigint) > Total runtime: 1258.703 ms The rows estimate is way off, which might or might not have much to do with the issue, but it's surely suspicious. > We're running PostgreSQL 7.4.1 on a Debian/Linux 2.4 system with 4GB RAM and a > fast SCSI RAID array, with settings: Update to 7.4.2 and follow the procedure in the release notes about fixing pg_statistic; that may make things better. int8 columns are vulnerable to the statistic misalignment bug. regards, tom lane