|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Tuning MySQL
From: Atle Veka (atlev
flyingcroc.net)
Date: Fri Jul 01 2005 - 18:00:00 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Here are two ways to find the queries:
1) 'SHOW FULL PROCESSLIST\G' in the mysql client and taking note of what
queries seem to be taking the most time
2) enable update logging and slow query logging
When you have gathered a list of queries that you want to look into
optimizing, run [in the client]: 'EXPLAIN <query...>' . That will give you
an idea of where index(es) would benefit. Check the manual for EXPLAIN to
decipher the output.
Good luck!
Atle
-
Flying Crocodile Inc, Unix Systems Administrator
On Fri, 1 Jul 2005, Siegfried Heintze wrote:
> Are there any tools for finding hot spots in one's database? My screen
> scraper is maxing out my CPU. I'm thinking I might need some secondary
> indexes in some of my tables. I have a lot of two column tables consisting
> of integer primary key and varchar in the second column. I repeatedly search
> the second column and, if there is no match, return mysql_insertid.
>
>
> Are there any tools to help me tell which SQL statements are gobbling up my
> CPU and disk? I suppose I could blindly put secondary indexes everywhere.
>
> Siegfried
>
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]