Re: [ADMIN] Lock Statistics

2007-07-30 Thread adey
On 7/31/07, Michael Fuhr <[EMAIL PROTECTED]> wrote: > > On Tue, Jul 31, 2007 at 10:35:25AM +1200, adey wrote: > > -- CAUTION: this query may impact system performance as you are > selecting > > from system tables > > What difference are you expecting that to make and why? It was a warning I recei

Re: [ADMIN] Lock Statistics

2007-07-30 Thread Michael Fuhr
On Tue, Jul 31, 2007 at 10:35:25AM +1200, adey wrote: > -- CAUTION: this query may impact system performance as you are selecting > from system tables What difference are you expecting that to make and why? -- Michael Fuhr ---(end of broadcast)---

Re: [ADMIN] Lock Statistics

2007-07-30 Thread Michael Fuhr
On Mon, Jul 30, 2007 at 07:11:11PM +0300, Milen A. Radev wrote: > I have performance problems with a DB (slow queries) and I suspect the > main cause is that a lot of queries wait for a lock on one small > table. That's why I need some stats about the number and (average) > wait-time for locks (eve

Re: [ADMIN] Lock Statistics

2007-07-30 Thread adey
Try this query for a start, and add system tables to the join to find what you want:- -- displays locks with database name and username, but not table -- CAUTION: this query may impact system performance as you are selecting from system tables select relation , c.relname , u.usename , pid

[ADMIN] Lock Statistics

2007-07-30 Thread Milen A. Radev
I have performance problems with a DB (slow queries) and I suspect the main cause is that a lot of queries wait for a lock on one small table. That's why I need some stats about the number and (average) wait-time for locks (even only for this particular table). After a bit of googling I found a pr