pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedWhy is VACUUM ANALYZE <table> so slow?
3+ messages / 3 participants
[nested] [flat]
* Why is VACUUM ANALYZE <table> so slow?
@ 2003-12-09 21:14 David Shadovitz <david@www.shadovitz.com>
0 siblings, 1 reply; 3+ messages in thread
From: David Shadovitz @ 2003-12-09 21:14 UTC (permalink / raw)
To: pgsql-performance; +Cc: david@shadovitz.com
I'm running PG 7.2.2 on RH Linux 8.0.
I'd like to know why "VACUUM ANALYZE <table>" is extemely slow (hours) for
certain tables. Here's what the log file shows when I run this command on
my "employees" table, which has just 5 columns and 55 records:
VACUUM ANALYZE employees
DEBUG: --Relation employees--
DEBUG: index employees_pkey: Pages 2; Tuples 55: Deleted 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
DEBUG: index emp_dept_id_idx: Pages 2; Tuples 55: Deleted 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
DEBUG: index emp_emp_num_idx: Pages 2; Tuples 55: Deleted 0.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
DEBUG: recycled transaction log file 00000000000000CC
DEBUG: geqo_main: using edge recombination crossover [ERX]
(When I get a chance I will enable timestamping of log file entries.)
Thanks for any insight. Please reply to me personally (david@shadovitz.com)
as well as to the list.
-David
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Why is VACUUM ANALYZE <table> so slow?
@ 2003-12-16 22:51 Neil Conway <neilc@samurai.com>
parent: David Shadovitz <david@www.shadovitz.com>
0 siblings, 0 replies; 3+ messages in thread
From: Neil Conway @ 2003-12-16 22:51 UTC (permalink / raw)
To: David Shadovitz <david@www.shadovitz.com>; +Cc: pgsql-performance; david@shadovitz.com
"David Shadovitz" <david@www.shadovitz.com> writes:
> I'm running PG 7.2.2 on RH Linux 8.0.
Note that this version of PostgreSQL is quite old.
> I'd like to know why "VACUUM ANALYZE <table>" is extemely slow (hours) for
> certain tables.
Is there another concurrent transaction that has modified the table
but has not committed? VACUUM ANALYZE will need to block waiting for
it. You might be able to get some insight into this by examining the
pg_locks system view:
http://www.postgresql.org/docs/current/static/monitoring-locks.html
As well as the pg_stat_activity view.
-Neil
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Why is VACUUM ANALYZE <table> so slow?
@ 2003-12-17 04:37 David Shadovitz <david@shadovitz.com>
0 siblings, 0 replies; 3+ messages in thread
From: David Shadovitz @ 2003-12-17 04:37 UTC (permalink / raw)
To: Neil Conway <neilc@samurai.com>; +Cc: pgsql-performance
Neil,
Thanks for the good advice. I noticed that I had some sessions for which I
could not account, and I think even a 2nd postmaster running. It looks like
I've cleaned everything up, and now I can VACUUM and I can DROP an index which
wouldn't drop.
And I'm looking into upgrading PostgreSQL.
-David
On Tuesday, December 16, 2003 2:51 PM, Neil Conway [SMTP:neilc@samurai.com]
wrote:
> "David Shadovitz" <david@www.shadovitz.com> writes:
> > I'm running PG 7.2.2 on RH Linux 8.0.
>
> Note that this version of PostgreSQL is quite old.
>
> > I'd like to know why "VACUUM ANALYZE <table>" is extemely slow (hours) for
> > certain tables.
>
> Is there another concurrent transaction that has modified the table
> but has not committed? VACUUM ANALYZE will need to block waiting for
> it. You might be able to get some insight into this by examining the
> pg_locks system view:
>
> http://www.postgresql.org/docs/current/static/monitoring-locks.html
>
> As well as the pg_stat_activity view.
>
> -Neil
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-12-17 04:37 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-12-09 21:14 Why is VACUUM ANALYZE <table> so slow? David Shadovitz <david@www.shadovitz.com>
2003-12-16 22:51 ` Neil Conway <neilc@samurai.com>
2003-12-17 04:37 Re: Why is VACUUM ANALYZE <table> so slow? David Shadovitz <david@shadovitz.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox