Re: Index Backward Scan fast / Index Scan slow !

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pailloncy Jean-Gérard <pailloncy(at)ifrance(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Index Backward Scan fast / Index Scan slow !
Date: 2004-04-12 21:23:46
Message-ID: 13960.1081805026@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

[ Ah, I just got to your message with the VACUUM VERBOSE results ... ]

=?ISO-8859-1?Q?Pailloncy_Jean-G=E9rard?= <pailloncy(at)ifrance(dot)com> writes:
> dps=# VACUUM VERBOSE url;
> INFO: index "url_next_index_time" now contains 349519 row versions in
> 3534 pages
> DETAIL: 229515 index row versions were removed.
> 3071 index pages have been deleted, 2864 are currently reusable.
> CPU 0.32s/0.67u sec elapsed 76.25 sec.

Hm, this is odd. That says you've got 349519 live index entries in only
463 actively-used index pages, or an average of 754 per page, which
AFAICS could not fit in an 8K page. Are you using a nondefault value of
BLCKSZ? If so what?

If you *are* using default BLCKSZ then this index must be corrupt, and
what you probably need to do is REINDEX it. But before you do that,
could you send me a copy of the index file?

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Ken Geis 2004-04-13 00:17:31 Tracking down performance issue
Previous Message Tom Lane 2004-04-12 21:02:47 Re: index v. seqscan for certain values