katten
01-30-2007, 01:05 AM
I was lastnight while working on my own open-source forum for fun, i looked at the mysql runtime varibles and i noticed a few things that concerned me...
here are a few things i would like to have tips on how to fix.
Innodb_buffer_pool_reads 25 The number of logical reads that InnoDB could not satisfy from buffer pool and had to do a single-page read.
Handler_read_rnd 488 The number of requests to read a row based on a fixed position. This is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don't use keys properly.
i have got one single join in my code witch is
$posts = $db->query('SELECT `posts`.`id` AS `postid`,`message` AS `post`,`deleted` AS `deleted`,`users`.`id` AS `uid`,`users`.`signature` AS `signature`,`users`.`posts` AS `posts`,`users`.`access` AS `access`,`users`.`name` AS `name`,`users`.`website` AS `website`,`lAStvisit` AS `online` FROM `posts`,`users` WHERE (`posts`.`threadid` = \''. (int) $id .'\' AND `users`.`id` = `posts`.`uid` AND `posts`.`deleted` = \''.$deleted.'\') ORDER BY `posts`.`time` DESC LIMIT 10')->fetchAll();
Handler_read_rnd_next 48 k The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.
I tried to fix this myself last night but i don't know how to.
Created_tmp_disk_tables 311 The number of temporary tables on disk created automatically by the server while executing statements. If Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based.
Key_reads 17 The number of physical reads of a key block from disk. If Key_reads is big, then your key_buffer_size value is probably too small. The cache miss rate can be calculated as Key_reads/Key_read_requests.
Opened_tables 190 The number of tables that have been opened. If opened tables is big, your table cache value is probably too small.
Note, i'm using a pdo extension for the connection to MYSQL, and that i'm runing my stuff on my own Ubuntu-edgy server.
also i'm only 15 years old, and i have never took a single lesson in any programing language also here is link it you want to see it. http://drakaro.ath.cx/engine/
here are a few things i would like to have tips on how to fix.
Innodb_buffer_pool_reads 25 The number of logical reads that InnoDB could not satisfy from buffer pool and had to do a single-page read.
Handler_read_rnd 488 The number of requests to read a row based on a fixed position. This is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don't use keys properly.
i have got one single join in my code witch is
$posts = $db->query('SELECT `posts`.`id` AS `postid`,`message` AS `post`,`deleted` AS `deleted`,`users`.`id` AS `uid`,`users`.`signature` AS `signature`,`users`.`posts` AS `posts`,`users`.`access` AS `access`,`users`.`name` AS `name`,`users`.`website` AS `website`,`lAStvisit` AS `online` FROM `posts`,`users` WHERE (`posts`.`threadid` = \''. (int) $id .'\' AND `users`.`id` = `posts`.`uid` AND `posts`.`deleted` = \''.$deleted.'\') ORDER BY `posts`.`time` DESC LIMIT 10')->fetchAll();
Handler_read_rnd_next 48 k The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.
I tried to fix this myself last night but i don't know how to.
Created_tmp_disk_tables 311 The number of temporary tables on disk created automatically by the server while executing statements. If Created_tmp_disk_tables is big, you may want to increase the tmp_table_size value to cause temporary tables to be memory-based instead of disk-based.
Key_reads 17 The number of physical reads of a key block from disk. If Key_reads is big, then your key_buffer_size value is probably too small. The cache miss rate can be calculated as Key_reads/Key_read_requests.
Opened_tables 190 The number of tables that have been opened. If opened tables is big, your table cache value is probably too small.
Note, i'm using a pdo extension for the connection to MYSQL, and that i'm runing my stuff on my own Ubuntu-edgy server.
also i'm only 15 years old, and i have never took a single lesson in any programing language also here is link it you want to see it. http://drakaro.ath.cx/engine/