Skip site navigation (1) Skip section navigation (2)

Re: bigint index not used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shiar <shiar(at)shiar(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: bigint index not used
Date: 2004-03-26 23:15:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Shiar <shiar(at)shiar(dot)org> 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

In response to

pgsql-performance by date

Next:From: scott.marloweDate: 2004-03-27 00:05:55
Subject: Re: postgres eating CPU on HP9000
Previous:From: Steve AtkinsDate: 2004-03-26 23:14:59
Subject: Re: [HACKERS] fsync method checking

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group