Re: How to determine database activity???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try this query that displays current activity:-
 
select  datid,
 datname as "DB Name",
 substr(procpid,1,6) as "Procpid",
 substr(usesysid,1,5) AS "UseSysid",
 usename,
 current_query as SQL,
 query_start
from
 pg_stat_activity
order by
 procpid
 
You may need to turn on some of the parameters in postgresql.conf to populate some of the returned columns in the table (view?).

 
On 10/30/05, Joost Kraaijeveld <J.Kraaijeveld@xxxxxxxxxx> wrote:
Hi,

Is there a way to actually determine if the database is doing anything
after a query is send to the backend during *long* lasting queries
besides waiting and hoping?


--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@xxxxxxxxxx
web: www.askesis.nl



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux