From owner-freebsd-database@FreeBSD.ORG Sun Sep 21 18:48:50 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BEE316A4B3; Sun, 21 Sep 2003 18:48:50 -0700 (PDT) Received: from gunjin.wccnet.org (gunjin.wccnet.org [198.111.176.99]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0638843FDF; Sun, 21 Sep 2003 18:48:49 -0700 (PDT) (envelope-from anthony@gunjin.wccnet.org) Received: from gunjin.wccnet.org (localhost.rexroof.com [127.0.0.1]) by gunjin.wccnet.org (8.12.3/8.12.2) with ESMTP id h8M1oKQI072249; Sun, 21 Sep 2003 21:50:20 -0400 (EDT) Received: (from anthony@localhost) by gunjin.wccnet.org (8.12.3/8.12.3/Submit) id h8M1oK9n072248; Sun, 21 Sep 2003 21:50:20 -0400 (EDT) Date: Sun, 21 Sep 2003 21:50:20 -0400 From: Anthony Schneider To: Supote Leelasupphakorn Message-ID: <20030922015020.GA71959@x-anthony.com> References: <20030918110851.55151.qmail@web40611.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <20030918110851.55151.qmail@web40611.mail.yahoo.com> User-Agent: Mutt/1.4.1i cc: freebsd-database@freebsd.org cc: freebsd-questions@freebsd.org cc: FreeBSD-Chat@freebsd.org Subject: Re: How DBA solved overload problem ? X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 01:48:50 -0000 --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable one of the first things to look for in database performance tuning is the existence (or nonexistence) of indexes (for SELECTs, that is).=20 they are perhaps the "#1 most used" optimization for relational=20 databases. =20 if you can, i would suggest first tracking down the query text itself. =20 sybase and oracle have mechanisms for logging full query text (oracle=20 to a file, sybase to the sybsecurity database in sysaudits_0x tables), mysql and postgresql most likely have the same features. if not, it would be a trivial task to have query text logged to a file. next, i would determine if there are indeed indexes on the tables in the query. if there are none, try adding some. if there are some, then try adding more. :) (without getting into too much detail, try=20 adding indexes on columns that are commonly joined on or restricted on...primary keys for tables is also nice). -Anthony. On Thu, Sep 18, 2003 at 12:08:51PM +0100, Supote Leelasupphakorn wrote: > To all, >=20 > As a newly DBA, I really don't know how I deal with > this problem. My problem is not so long ago, my database > server seem to overloaded. It take me a time to find > the cause of problem. I realize that some program don't > queried wiht inappropriated SQL statement. I mean they're > not efficient one. >=20 > AS DBA how do you solved this problem? >=20 > Thanks in advance, >=20 > ________________________________________________________________________ > Want to chat instantly with your online friends? Get the FREE Yahoo! > Messenger http://mail.messenger.yahoo.co.uk > _______________________________________________ > freebsd-chat@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-chat > To unsubscribe, send any mail to "freebsd-chat-unsubscribe@freebsd.org" --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE/blVaKUeW47UGY2kRArkjAJwOTQ8Unaa7vIl2IG3SWcPcGl0tqACeNBMw fh0qz+iAg/43rSzAY+rj/ms= =5UAI -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--