pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedTrack query status
3+ messages / 3 participants
[nested] [flat]
* Track query status
@ 2007-03-28 20:59 Sumeet <asumeet@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Sumeet @ 2007-03-28 20:59 UTC (permalink / raw)
To: pgsql-sql
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
UPDATE ma SET av=to_tsvector('default',coalesce(name_first,'') ||' '||
coalesce(name_last,''));
Thanks,
Sumeet
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Track query status
@ 2007-03-28 21:49 Andrew Sullivan <ajs@crankycanuck.ca>
parent: Sumeet <asumeet@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Sullivan @ 2007-03-28 21:49 UTC (permalink / raw)
To: pgsql-sql
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@crankycanuck.ca
When my information changes, I alter my conclusions. What do you do sir?
--attr. John Maynard Keynes
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Track query status
@ 2007-03-29 19:48 Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
parent: Andrew Sullivan <ajs@crankycanuck.ca>
0 siblings, 0 replies; 3+ messages in thread
From: Rajesh Kumar Mallah @ 2007-03-29 19:48 UTC (permalink / raw)
To: Andrew Sullivan <ajs@crankycanuck.ca>; +Cc: 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@crankycanuck.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@crankycanuck.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
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2007-03-29 19:48 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-28 20:59 Track query status Sumeet <asumeet@gmail.com>
2007-03-28 21:49 ` Andrew Sullivan <ajs@crankycanuck.ca>
2007-03-29 19:48 ` Rajesh Kumar Mallah <mallah.rajesh@gmail.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