From: | Chris Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Alter table command is pretty slow |
Date: | 2005-08-12 14:53:35 |
Message-ID: | 60r7czuryo.fsf@dba2.int.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
sreenivas(at)gmail(dot)com (Sreenivas K) writes:
> I have installed the PostgreSQL native Windows (8.0 using the Windows
> MSI installer) on a Windows 2K box. I accepted all of the
> installation defaults. It is running successfully and my application
> that stores data via Hibernate 2.0 is working. But it is taking too
> long [>15 mimutes] if I try to execute any DDL commands . I Issued
> vacuum command just before running a DDL. My computer has 512 MB of
> RAM. Why is it so slow?
>
> Any help would be great.
You might want to look at pg_stat_activity (assuming activity logging
is turned on) as well as pg_locks.
DDL commands require exclusive locks on the tables that they are
modifying, and *anything* else that may be touching the tables will
block the DDL commands.
VACUUM will definitely block DDL...
At any rate, pg_stat_activity can tell you what queries are busy in
the system. And pg_locks will tell you what relations are in what
states. (You'll need to join pg_locks against pg_class in order to
get relation names.)
--
(format nil "~S(at)~S" "cbbrowne" "acm.org")
http://www.ntlug.org/~cbbrowne/sap.html
Rules of the Evil Overlord #78. "I will not tell my Legions of Terror
"And he must be taken alive!" The command will be: ``And try to take
him alive if it is reasonably practical.''"
<http://www.eviloverlord.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-08-12 16:04:25 | Re: Forcing WAL switch |
Previous Message | Walker, Jed S | 2005-08-12 14:28:20 | Re: Forcing WAL switch |