From: | "Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com> |
---|---|
To: | "Andrew Sullivan" <ajs(at)crankycanuck(dot)ca> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Track query status |
Date: | 2007-03-29 19:48:39 |
Message-ID: | a97c77030703291248h1c1e0ab3h37e96b9775bc16d7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
more methods:
1. select * from pg_stat_activity;
see what all running and pid of your current query also.
2. SELECT h.pid AS blocker, w.pid AS blockee
FROM ONLY pg_locks h, ONLY pg_locks w
WHERE h."granted" AND NOT w."granted" AND (h.relation = w.relation
AND h."database" = w."database" OR h."transaction" = w."transaction");
make sure that the pid in 1 is not listed as a blockee in result of
above query m, ie The the update is waiting for anything.
3. go the shell , su - postgres ,
strace -p <pid> of the backend got in 1.
observe the system calls , see if anything awkward
there shoud be a lot of writes
4. iostat ofcourse, unless the above sql is the only sql(update)
running running in server .
my 4cents
regds
mallah.
On 3/29/07, Andrew Sullivan <ajs(at)crankycanuck(dot)ca> wrote:
> On Wed, Mar 28, 2007 at 04:59:24PM -0400, Sumeet wrote:
> > Hi all,
> >
> > I have ran a update query on a dataset which has about 48 million records
> > and the query is already running for the third day....im so tempted to the
> > kill this query now....is there a way to know if the query is running??
> > here is the query i've ran
>
> 48 million records is a lot. You oughta see activity with iostat or
> something.
>
> A
>
> --
> Andrew Sullivan | ajs(at)crankycanuck(dot)ca
> When my information changes, I alter my conclusions. What do you do sir?
> --attr. John Maynard Keynes
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jon Horsman | 2007-03-29 21:23:02 | Re: Foreign Unique Constraint |
Previous Message | Rajesh Kumar Mallah | 2007-03-29 19:41:40 | Re: Empty Table |