Reindex vs Vacuum analyze

From: "Gaetano Mendola" <mendola(at)bigfoot(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Reindex vs Vacuum analyze
Date: 2002-11-01 11:27:48
Message-ID: aptuu2$1ejg$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I repeat my simple experience for
know about what is going on:

push=# explain analyze select * from jobs where status = 'r';
NOTICE: QUERY PLAN:

Index Scan using idx_jobs_status_r on jobs (cost=0.00..8.57 rows=3770
width=49)
(actual time=19.26..1295.73 rows=5 loops=1)
Total runtime: 1295.85 msec

EXPLAIN
push=# vacuum analyze jobs;
VACUUM
push=# explain analyze select * from jobs where status = 'r';
NOTICE: QUERY PLAN:

Index Scan using idx_jobs_status_r on jobs (cost=0.00..3.12 rows=1
width=49)
(actual time=0.08..1318.36 rows=5 loops=1)
Total runtime: 1318.48 msec

EXPLAIN
push=# reindex table jobs;
REINDEX
push=# explain analyze select * from jobs where status = 'r';
NOTICE: QUERY PLAN:

Index Scan using idx_jobs_status_r on jobs (cost=0.00..3.12 rows=1
width=49) (actual time=0.04..0.15 rows=4 loops=1)
Total runtime: 0.24 msec

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rod Taylor 2002-11-01 12:52:40 Re: [pgsql-performance] Is dump-reload the only cure?
Previous Message mallah 2002-11-01 11:15:43 Is dump-reload the only cure?