Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 11328475BEC for ; Fri, 1 Nov 2002 08:17:57 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id A129F474E53 for ; Fri, 1 Nov 2002 08:17:56 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 4E9053817EE; Fri, 1 Nov 2002 08:17:55 -0500 (EST) From: "Gaetano Mendola" X-Newsgroups: comp.databases.postgresql.admin Subject: Reindex vs Vacuum analyze Date: Fri, 1 Nov 2002 12:27:48 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 33 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 To: pgsql-admin@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/7 X-Sequence-Number: 6195 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