Re: database running slow - Mailing list pgsql-admin

From Andrew Sullivan
Subject Re: database running slow
Date
Msg-id 20030513121419.GC17278@libertyrms.info
Whole thread Raw
In response to database running slow  (Shankar K <shan0075@yahoo.com>)
Responses Re: database running slow  (Shankar K <shan0075@yahoo.com>)
List pgsql-admin
On Mon, May 12, 2003 at 11:55:11AM -0700, Shankar K wrote:

> Since our application involves high inserts/deletes,
> we vacuum/analyze major tables thrice a day. Apart
> from this

Be sure you really need the vacuum before you do it.  Remember,
vacuum destroys your buffers, so it's not free.  On certain kinds of
tables, it can be worth it to do a vacuum very often (we have some we
do once an hour).

> 1. how to identify run-away sql backends

Define "run-away".  You can look for long-running transactions; that
might be helpful.

> 2. find out the bad sqls thats causing trouble

Look for queries that take a long time.  EXPLAIN ANALYSE is your
friend.

A
--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


pgsql-admin by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: No flamefest please, MySQL vs. PostgreSQL AGAIN
Next
From: "Vinay"
Date:
Subject: [OT]:Database design question