今天一天学习的MYSQL语句,立此存照

数据库基本知识在各行各业,都是必须要掌握的基本技能呀。

今天在家休息一天,作了几个样例测试。

参考书籍是 MYSQL COOKBOOK第二版。

服务器端是MYSQL SERVER5.5.

CLIENT为SQLYOG 8.7.

~~~~~~~

/*[8:21:21][  78 ms]*/ SHOW VARIABLES LIKE 'lower_case_table_names';
/*[8:21:21][  15 ms]*/ SET NAMES 'utf8';
/*[8:21:21][   0 ms]*/ SET SQL_MODE='';
/*[8:21:21][  16 ms]*/ SHOW DATABASES;
/*[8:37:03][   0 ms]*/ SELECT DATABASE();
/*[8:37:14][   0 ms]*/ SHOW CHARSET;
/*[8:37:14][   0 ms]*/ SHOW COLLATION;
/*[8:37:23][   0 ms]*/ CREATE DATABASE `cookbook`;
/*[8:37:24][   0 ms]*/ USE `cookbook`;
/*[8:37:24][   0 ms]*/ SHOW DATABASES;
/*[8:37:24][   0 ms]*/ USE `cookbook`;
/*[8:37:32][   0 ms]*/ USE cookbook;
/*[8:37:32][   0 ms]*/ SELECT DATABASE();
/*[8:37:38][   0 ms]*/ SELECT DATABASE();
/*[8:38:19][  16 ms]*/ SHOW VARIABLES LIKE 'profiling';
/*[8:38:19][   0 ms]*/ SET PROFILING = 1;
/*[8:38:19][   0 ms]*/ SET profiling_history_size = 0;
/*[8:38:19][   0 ms]*/ SET profiling_history_size = 15;
/*[8:38:19][   0 ms]*/ SHOW STATUS;
/*[8:38:19][   0 ms]*/ SHOW STATUS;
/*[8:38:19][   0 ms]*/ SELECT * FROM taxpayer LIMIT 0, 1000;
/*[8:38:19][   0 ms]*/ SHOW STATUS;
/*[8:38:19][   0 ms]*/ SHOW PROFILES;
/*[8:38:19][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 5 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:38:19][   0 ms]*/ SET PROFILING = 0;
/*[8:38:19][   0 ms]*/ EXPLAIN SELECT * FROM taxpayer LIMIT 0, 1000;
/*[8:38:47][   0 ms]*/ SET PROFILING = 1;
/*[8:38:47][   0 ms]*/ SET profiling_history_size = 0;
/*[8:38:47][   0 ms]*/ SET profiling_history_size = 15;
/*[8:38:47][  15 ms]*/ SHOW STATUS;
/*[8:38:47][   0 ms]*/ SELECT * FROM taxpayer WHERE id = NULL LIMIT 0, 1000;
/*[8:38:47][   0 ms]*/ SHOW STATUS;
/*[8:38:47][   0 ms]*/ SHOW PROFILES;
/*[8:38:47][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 11 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:38:47][   0 ms]*/ SET PROFILING = 0;
/*[8:38:47][   0 ms]*/ EXPLAIN SELECT * FROM taxpayer WHERE id = NULL LIMIT 0, 1000;
/*[8:38:48][   0 ms]*/ SET PROFILING = 1;
/*[8:38:48][   0 ms]*/ SET profiling_history_size = 0;
/*[8:38:48][   0 ms]*/ SET profiling_history_size = 15;
/*[8:38:48][   0 ms]*/ SHOW STATUS;
/*[8:38:48][  16 ms]*/ SELECT * FROM taxpayer WHERE id = NULL LIMIT 0, 1000;
/*[8:38:48][   0 ms]*/ SHOW STATUS;
/*[8:38:48][   0 ms]*/ SHOW PROFILES;
/*[8:38:48][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 17 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:38:48][   0 ms]*/ SET PROFILING = 0;
/*[8:38:48][  16 ms]*/ EXPLAIN SELECT * FROM taxpayer WHERE id = NULL LIMIT 0, 1000;
/*[8:38:54][   0 ms]*/ SET PROFILING = 1;
/*[8:38:54][   0 ms]*/ SET profiling_history_size = 0;
/*[8:38:54][   0 ms]*/ SET profiling_history_size = 15;
/*[8:38:54][  15 ms]*/ SHOW STATUS;
/*[8:38:54][   0 ms]*/ SELECT * FROM taxpayer WHERE id != NULL LIMIT 0, 1000;
/*[8:38:54][   0 ms]*/ SHOW STATUS;
/*[8:38:54][   0 ms]*/ SHOW PROFILES;
/*[8:38:54][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 23 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:38:54][   0 ms]*/ SET PROFILING = 0;
/*[8:38:54][   0 ms]*/ EXPLAIN SELECT * FROM taxpayer WHERE id != NULL LIMIT 0, 1000;
/*[8:38:54][   0 ms]*/ SET PROFILING = 1;
/*[8:38:54][   0 ms]*/ SET profiling_history_size = 0;
/*[8:38:54][   0 ms]*/ SET profiling_history_size = 15;
/*[8:38:54][  16 ms]*/ SHOW STATUS;
/*[8:38:54][   0 ms]*/ SELECT * FROM taxpayer WHERE id != NULL LIMIT 0, 1000;
/*[8:38:54][   0 ms]*/ SHOW STATUS;
/*[8:38:54][   0 ms]*/ SHOW PROFILES;
/*[8:38:54][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 29 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:38:54][  16 ms]*/ SET PROFILING = 0;
/*[8:38:54][   0 ms]*/ EXPLAIN SELECT * FROM taxpayer WHERE id != NULL LIMIT 0, 1000;
/*[8:39:16][   0 ms]*/ SET PROFILING = 1;
/*[8:39:16][   0 ms]*/ SET profiling_history_size = 0;
/*[8:39:16][   0 ms]*/ SET profiling_history_size = 15;
/*[8:39:16][  15 ms]*/ SHOW STATUS;
/*[8:39:16][   0 ms]*/ SELECT * FROM taxpayer WHERE id IS NULL LIMIT 0, 1000;
/*[8:39:16][  16 ms]*/ SHOW STATUS;
/*[8:39:16][   0 ms]*/ SHOW PROFILES;
/*[8:39:16][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 35 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:39:16][   0 ms]*/ SET PROFILING = 0;
/*[8:39:16][   0 ms]*/ EXPLAIN SELECT * FROM taxpayer WHERE id IS NULL LIMIT 0, 1000;
/*[8:39:22][   0 ms]*/ SET PROFILING = 1;
/*[8:39:22][   0 ms]*/ SET profiling_history_size = 0;
/*[8:39:22][  15 ms]*/ SET profiling_history_size = 15;
/*[8:39:22][   0 ms]*/ SHOW STATUS;
/*[8:39:22][   0 ms]*/ SELECT * FROM taxpayer WHERE id NOT IS NULL LIMIT 0, 1000;
/*[8:39:32][   0 ms]*/ SET PROFILING = 1;
/*[8:39:32][   0 ms]*/ SET profiling_history_size = 0;
/*[8:39:32][   0 ms]*/ SET profiling_history_size = 15;
/*[8:39:32][  15 ms]*/ SHOW STATUS;
/*[8:39:32][   0 ms]*/ SELECT * FROM taxpayer WHERE id !IS NULL LIMIT 0, 1000;
/*[8:39:32][  15 ms]*/ SET PROFILING = 1;
/*[8:39:32][   0 ms]*/ SET profiling_history_size = 0;
/*[8:39:32][   0 ms]*/ SET profiling_history_size = 15;
/*[8:39:32][   0 ms]*/ SHOW STATUS;
/*[8:39:32][   0 ms]*/ SELECT * FROM taxpayer WHERE id !IS NULL LIMIT 0, 1000;
/*[8:39:44][   0 ms]*/ SET PROFILING = 1;
/*[8:39:44][   0 ms]*/ SET profiling_history_size = 0;
/*[8:39:44][   0 ms]*/ SET profiling_history_size = 15;
/*[8:39:44][   0 ms]*/ SHOW STATUS;
/*[8:39:44][   0 ms]*/ SELECT * FROM taxpayer WHERE id IS NOT NULL LIMIT 0, 1000;
/*[8:39:44][  16 ms]*/ SHOW STATUS;
/*[8:39:44][   0 ms]*/ SHOW PROFILES;
/*[8:39:44][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 56 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:39:44][   0 ms]*/ SET PROFILING = 0;
/*[8:39:44][   0 ms]*/ EXPLAIN SELECT * FROM taxpayer WHERE id IS NOT NULL LIMIT 0, 1000;
/*[8:40:21][   0 ms]*/ SET PROFILING = 1;
/*[8:40:21][   0 ms]*/ SET profiling_history_size = 0;
/*[8:40:21][   0 ms]*/ SET profiling_history_size = 15;
/*[8:40:21][  16 ms]*/ SHOW STATUS;
/*[8:40:21][  16 ms]*/ SELECT * FROM taxpayer WHERE id <=> NULL LIMIT 0, 1000;
/*[8:40:21][   0 ms]*/ SHOW STATUS;
/*[8:40:21][   0 ms]*/ SHOW PROFILES;
/*[8:40:21][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 62 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:40:21][   0 ms]*/ SET PROFILING = 0;
/*[8:40:21][   0 ms]*/ EXPLAIN SELECT * FROM taxpayer WHERE id <=> NULL LIMIT 0, 1000;
/*[8:40:27][   0 ms]*/ SET PROFILING = 1;
/*[8:40:27][   0 ms]*/ SET profiling_history_size = 0;
/*[8:40:27][   0 ms]*/ SET profiling_history_size = 15;
/*[8:40:27][  15 ms]*/ SHOW STATUS;
/*[8:40:27][   0 ms]*/ SELECT * FROM taxpayer WHERE id <!=> NULL LIMIT 0, 1000;
/*[8:40:32][   0 ms]*/ SET PROFILING = 1;
/*[8:40:32][   0 ms]*/ SET profiling_history_size = 0;
/*[8:40:32][   0 ms]*/ SET profiling_history_size = 15;
/*[8:40:32][  16 ms]*/ SHOW STATUS;
/*[8:40:32][   0 ms]*/ SELECT * FROM taxpayer WHERE id !<=> NULL LIMIT 0, 1000;
/*[8:40:33][   0 ms]*/ SET PROFILING = 1;
/*[8:40:33][   0 ms]*/ SET profiling_history_size = 0;
/*[8:40:33][   0 ms]*/ SET profiling_history_size = 15;
/*[8:40:33][  16 ms]*/ SHOW STATUS;
/*[8:40:33][   0 ms]*/ SELECT * FROM taxpayer WHERE id !<=> NULL LIMIT 0, 1000;
/*[8:41:01][   0 ms]*/ SET PROFILING = 1;
/*[8:41:01][   0 ms]*/ SET profiling_history_size = 0;
/*[8:41:01][   0 ms]*/ SET profiling_history_size = 15;
/*[8:41:01][  16 ms]*/ SHOW STATUS;
/*[8:41:01][   0 ms]*/ SELECT NULL = NULL ,NULL <=> NULL;
/*[8:41:01][   0 ms]*/ SHOW STATUS;
/*[8:41:01][   0 ms]*/ SHOW PROFILES;
/*[8:41:01][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 83 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:41:01][   0 ms]*/ SET PROFILING = 0;
/*[8:41:01][   0 ms]*/ EXPLAIN SELECT NULL = NULL ,NULL <=> NULL;
/*[8:42:05][   0 ms]*/ SET PROFILING = 1;
/*[8:42:05][   0 ms]*/ SET profiling_history_size = 0;
/*[8:42:05][   0 ms]*/ SET profiling_history_size = 15;
/*[8:42:05][  16 ms]*/ SHOW STATUS;
/*[8:42:05][   0 ms]*/ SELECT NAME,IF(id IS NULL,'Unkown',id) AS 'id' FROM taxpayer LIMIT 0, 1000;
/*[8:42:05][  15 ms]*/ SHOW STATUS;
/*[8:42:05][   0 ms]*/ SHOW PROFILES;
/*[8:42:05][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 89 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:42:05][   0 ms]*/ SET PROFILING = 0;
/*[8:42:05][   0 ms]*/ EXPLAIN SELECT NAME,IF(id IS NULL,'Unkown',id) AS 'id' FROM taxpayer LIMIT 0, 1000;
/*[8:43:44][   0 ms]*/ SET PROFILING = 1;
/*[8:43:44][   0 ms]*/ SET profiling_history_size = 0;
/*[8:43:44][   0 ms]*/ SET profiling_history_size = 15;
/*[8:43:44][   0 ms]*/ SHOW STATUS;
/*[8:43:44][   0 ms]*/ SELECT NAME,IFNULL(id ,'Unkown',) AS 'id' FROM taxpayer LIMIT 0, 1000;
/*[8:43:49][   0 ms]*/ SET PROFILING = 1;
/*[8:43:49][   0 ms]*/ SET profiling_history_size = 0;
/*[8:43:49][   0 ms]*/ SET profiling_history_size = 15;
/*[8:43:49][  15 ms]*/ SHOW STATUS;
/*[8:43:49][  16 ms]*/ SELECT NAME,IFNULL(id ,'Unkown') AS 'id' FROM taxpayer LIMIT 0, 1000;
/*[8:43:49][   0 ms]*/ SHOW STATUS;
/*[8:43:49][   0 ms]*/ SHOW PROFILES;
/*[8:43:49][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 100 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:43:49][   0 ms]*/ SET PROFILING = 0;
/*[8:43:49][   0 ms]*/ EXPLAIN SELECT NAME,IFNULL(id ,'Unkown') AS 'id' FROM taxpayer LIMIT 0, 1000;
/*[8:46:24][   0 ms]*/ SELECT DATABASE();
/*[8:46:43][   0 ms]*/ SET PROFILING = 1;
/*[8:46:43][   0 ms]*/ SET profiling_history_size = 0;
/*[8:46:43][   0 ms]*/ SET profiling_history_size = 15;
/*[8:46:43][   0 ms]*/ SHOW STATUS;
/*[8:46:43][   0 ms]*/ SELECT * FROM mail LIMIT 0, 1000;
/*[8:46:43][   0 ms]*/ SHOW STATUS;
/*[8:46:43][   0 ms]*/ SHOW PROFILES;
/*[8:46:43][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 106 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:46:43][  15 ms]*/ SET PROFILING = 0;
/*[8:46:43][   0 ms]*/ EXPLAIN SELECT * FROM mail LIMIT 0, 1000;
/*[8:47:13][   0 ms]*/ SET PROFILING = 1;
/*[8:47:13][   0 ms]*/ SET profiling_history_size = 0;
/*[8:47:13][   0 ms]*/ SET profiling_history_size = 15;
/*[8:47:13][   0 ms]*/ SHOW STATUS;
/*[8:47:13][   0 ms]*/ SELECT * FROM mail WHERE size > 100000 ORDER BY size LIMIT 0, 1000;
/*[8:47:13][  15 ms]*/ SHOW STATUS;
/*[8:47:13][   0 ms]*/ SHOW PROFILES;
/*[8:47:13][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 112 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:47:13][   0 ms]*/ SET PROFILING = 0;
/*[8:47:13][   0 ms]*/ EXPLAIN SELECT * FROM mail WHERE size > 100000 ORDER BY size LIMIT 0, 1000;
/*[8:47:19][   0 ms]*/ SET PROFILING = 1;
/*[8:47:19][   0 ms]*/ SET profiling_history_size = 0;
/*[8:47:19][   0 ms]*/ SET profiling_history_size = 15;
/*[8:47:19][   0 ms]*/ SHOW STATUS;
/*[8:47:19][   0 ms]*/ SELECT * FROM mail WHERE size > 100000 ORDER BY size DESC LIMIT 0, 1000;
/*[8:47:19][   0 ms]*/ SHOW STATUS;
/*[8:47:19][   0 ms]*/ SHOW PROFILES;
/*[8:47:19][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 118 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:47:19][   0 ms]*/ SET PROFILING = 0;
/*[8:47:19][   0 ms]*/ EXPLAIN SELECT * FROM mail WHERE size > 100000 ORDER BY size DESC LIMIT 0, 1000;
/*[8:48:27][   0 ms]*/ SET PROFILING = 1;
/*[8:48:27][   0 ms]*/ SET profiling_history_size = 0;
/*[8:48:27][   0 ms]*/ SET profiling_history_size = 15;
/*[8:48:27][   0 ms]*/ SHOW STATUS;
/*[8:48:27][   0 ms]*/ SELECT * FROM mail WHERE dstuser = 'tricia' ORDER BY srchost,srcuser LIMIT 0, 1000;
/*[8:48:27][  15 ms]*/ SHOW STATUS;
/*[8:48:27][   0 ms]*/ SHOW PROFILES;
/*[8:48:27][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 124 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:48:27][   0 ms]*/ SET PROFILING = 0;
/*[8:48:27][   0 ms]*/ EXPLAIN SELECT * FROM mail WHERE dstuser = 'tricia' ORDER BY srchost,srcuser LIMIT 0, 1000;
/*[8:49:15][   0 ms]*/ SET PROFILING = 1;
/*[8:49:15][   0 ms]*/ SET profiling_history_size = 0;
/*[8:49:15][   0 ms]*/ SET profiling_history_size = 15;
/*[8:49:15][   0 ms]*/ SHOW STATUS;
/*[8:49:15][   0 ms]*/ SELECT * FROM mail WHERE dstuser = 'tricia' ORDER BY srchost,srcuser DESC LIMIT 0, 1000;
/*[8:49:15][   0 ms]*/ SHOW STATUS;
/*[8:49:15][  16 ms]*/ SHOW PROFILES;
/*[8:49:15][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 130 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:49:15][   0 ms]*/ SET PROFILING = 0;
/*[8:49:15][   0 ms]*/ EXPLAIN SELECT * FROM mail WHERE dstuser = 'tricia' ORDER BY srchost,srcuser DESC LIMIT 0, 1000;
/*[8:52:22][   0 ms]*/ SET PROFILING = 1;
/*[8:52:22][   0 ms]*/ SET profiling_history_size = 0;
/*[8:52:22][  15 ms]*/ SET profiling_history_size = 15;
/*[8:52:22][   0 ms]*/ SHOW STATUS;
/*[8:52:22][   0 ms]*/ SELECT  DATE_FORMAT(t,'%M %e, %Y') AS date_sent,  CONCAT(srcuser,'@',srchost) AS sender,  CONCAT(dstuser,'@',dsthost) AS recipient,  size FROM mail LIMIT 0, 1000;
/*[8:52:22][  16 ms]*/ SHOW STATUS;
/*[8:52:22][   0 ms]*/ SHOW PROFILES;
/*[8:52:22][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 136 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:52:22][   0 ms]*/ SET PROFILING = 0;
/*[8:52:22][   0 ms]*/ EXPLAIN SELECT  DATE_FORMAT(t,'%M %e, %Y') AS date_sent,  CONCAT(srcuser,'@',srchost) AS sender,  CONCAT(dstuser,'@',dsthost) AS recipient,  size FROM mail LIMIT 0, 1000;
/*[8:53:42][  47 ms]*/ CREATE VIEW mail_view AS  SELECT  DATE_FORMAT(t,'%M %e, %Y') AS date_sent,  CONCAT(srcuser,'@',srchost) AS sender,  CONCAT(dstuser,'@',dsthost) AS recipient,  size FROM mail;
/*[8:53:54][   0 ms]*/ SELECT `TABLE_NAME` FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA` = 'cookbook' AND `TABLE_TYPE` = 'VIEW';
/*[8:53:58][  15 ms]*/ SHOW FULL TABLES FROM `cookbook` WHERE table_type = 'BASE TABLE';
/*[8:54:01][  31 ms]*/ DESCRIBE `cookbook`.`mail`;
/*[8:54:01][  32 ms]*/ SHOW INDEX FROM `cookbook`.`mail`;
/*[8:54:57][   0 ms]*/ SET PROFILING = 1;
/*[8:54:57][   0 ms]*/ SET profiling_history_size = 0;
/*[8:54:57][   0 ms]*/ SET profiling_history_size = 15;
/*[8:54:57][  16 ms]*/ SHOW STATUS;
/*[8:54:57][   0 ms]*/ SELECT date_sent,sender,size FROM mail_view WHERE size > 100000 ORDER BY size DESC LIMIT 0, 1000;
/*[8:54:57][  16 ms]*/ SHOW STATUS;
/*[8:54:57][   0 ms]*/ SHOW PROFILES;
/*[8:54:57][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 142 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[8:54:57][   0 ms]*/ SET PROFILING = 0;
/*[8:54:57][   0 ms]*/ EXPLAIN SELECT date_sent,sender,size FROM mail_view WHERE size > 100000 ORDER BY size DESC LIMIT 0, 1000;
/*[9:17:07][ 811 ms]*/ SELECT DATABASE();
/*[9:17:42][   0 ms]*/ SELECT DATABASE();
/*[9:18:01][ 171 ms]*/ SHOW FULL TABLES FROM `cookbook` WHERE table_type = 'BASE TABLE';
/*[9:18:05][ 234 ms]*/ DESCRIBE `cookbook`.`profile`;
/*[9:18:05][  31 ms]*/ SHOW INDEX FROM `cookbook`.`profile`;
/*[9:18:07][ 359 ms]*/ SHOW FULL FIELDS FROM `cookbook`.`profile`;
/*[9:18:07][   0 ms]*/ SHOW KEYS FROM `cookbook`.`profile`;
/*[9:18:07][   0 ms]*/ SELECT * FROM `cookbook`.`profile` LIMIT 0, 100;
/*[9:18:15][ 125 ms]*/ SHOW FULL FIELDS FROM `cookbook`.`profile_contact`;
/*[9:18:15][   0 ms]*/ SHOW KEYS FROM `cookbook`.`profile_contact`;
/*[9:18:15][   0 ms]*/ SELECT * FROM `cookbook`.`profile_contact` LIMIT 0, 100;
/*[9:18:27][  62 ms]*/ SHOW FULL FIELDS FROM `cookbook`.`profile`;
/*[9:18:27][  16 ms]*/ SHOW KEYS FROM `cookbook`.`profile`;
/*[9:18:27][   0 ms]*/ SELECT * FROM `cookbook`.`profile` LIMIT 0, 100;
/*[9:20:49][   0 ms]*/ SET PROFILING = 1;
/*[9:20:49][   0 ms]*/ SET profiling_history_size = 0;
/*[9:20:49][   0 ms]*/ SET profiling_history_size = 15;
/*[9:20:49][  16 ms]*/ SHOW STATUS;
/*[9:20:49][   0 ms]*/ SELECT id,NAME,service,contact_name   FROM PROFILE INNER JOIN profile_contact ON id = profile_id LIMIT 0, 1000;
/*[9:20:49][   0 ms]*/ SHOW STATUS;
/*[9:20:49][   0 ms]*/ SHOW PROFILES;
/*[9:20:49][  16 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 148 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[9:20:49][   0 ms]*/ SET PROFILING = 0;
/*[9:20:49][   0 ms]*/ EXPLAIN SELECT id,NAME,service,contact_name   FROM PROFILE INNER JOIN profile_contact ON id = profile_id LIMIT 0, 1000;
/*[9:21:51][   0 ms]*/ SET PROFILING = 1;
/*[9:21:51][   0 ms]*/ SET profiling_history_size = 0;
/*[9:21:51][   0 ms]*/ SET profiling_history_size = 15;
/*[9:21:51][  15 ms]*/ SHOW STATUS;
/*[9:21:51][ 125 ms]*/ SELECT id,NAME,service,contact_name   FROM PROFILE INNER JOIN profile_contact ON id = profile_id WHERE id > 2 AND service = 'AIM'  LIMIT 0, 1000;
/*[9:21:51][   0 ms]*/ SHOW STATUS;
/*[9:21:51][   0 ms]*/ SHOW PROFILES;
/*[9:21:51][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 154 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[9:21:51][   0 ms]*/ SET PROFILING = 0;
/*[9:21:51][  16 ms]*/ EXPLAIN SELECT id,NAME,service,contact_name   FROM PROFILE INNER JOIN profile_contact ON id = profile_id WHERE id > 2 AND service = 'AIM'  LIMIT 0, 1000;
/*[9:22:18][   0 ms]*/ SET PROFILING = 1;
/*[9:22:18][   0 ms]*/ SET profiling_history_size = 0;
/*[9:22:18][   0 ms]*/ SET profiling_history_size = 15;
/*[9:22:18][   0 ms]*/ SHOW STATUS;
/*[9:22:18][  16 ms]*/ SELECT id,NAME,service,contact_name   FROM PROFILE INNER JOIN profile_contact ON id = profile_id   WHERE id > 2  LIMIT 0, 1000;
/*[9:22:18][   0 ms]*/ SHOW STATUS;
/*[9:22:18][   0 ms]*/ SHOW PROFILES;
/*[9:22:18][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 160 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[9:22:18][   0 ms]*/ SET PROFILING = 0;
/*[9:22:18][   0 ms]*/ EXPLAIN SELECT id,NAME,service,contact_name   FROM PROFILE INNER JOIN profile_contact ON id = profile_id   WHERE id > 2  LIMIT 0, 1000;
/*[9:22:35][   0 ms]*/ SET PROFILING = 1;
/*[9:22:35][   0 ms]*/ SET profiling_history_size = 0;
/*[9:22:35][   0 ms]*/ SET profiling_history_size = 15;
/*[9:22:35][   0 ms]*/ SHOW STATUS;
/*[9:22:35][   0 ms]*/ SELECT id,NAME,service,contact_name   FROM PROFILE INNER JOIN profile_contact ON id = profile_id   WHERE id > 1 AND service = 'AIM' LIMIT 0, 1000;
/*[9:22:35][  16 ms]*/ SHOW STATUS;
/*[9:22:35][   0 ms]*/ SHOW PROFILES;
/*[9:22:35][  15 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 166 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[9:22:35][   0 ms]*/ SET PROFILING = 0;
/*[9:22:35][   0 ms]*/ EXPLAIN SELECT id,NAME,service,contact_name   FROM PROFILE INNER JOIN profile_contact ON id = profile_id   WHERE id > 1 AND service = 'AIM' LIMIT 0, 1000;
/*[9:24:54][   0 ms]*/ SET PROFILING = 1;
/*[9:24:54][   0 ms]*/ SET profiling_history_size = 0;
/*[9:24:54][   0 ms]*/ SET profiling_history_size = 15;
/*[9:24:54][  16 ms]*/ SHOW STATUS;
/*[9:24:54][  15 ms]*/ SELECT * FROM profile_contact   WHERE profile_id = (SELECT id FROM PROFILE WHERE NAME = 'Mort') LIMIT 0, 1000;
/*[9:24:54][   0 ms]*/ SHOW STATUS;
/*[9:24:54][  16 ms]*/ SHOW PROFILES;
/*[9:24:54][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 172 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[9:24:54][   0 ms]*/ SET PROFILING = 0;
/*[9:24:54][  15 ms]*/ EXPLAIN SELECT * FROM profile_contact   WHERE profile_id = (SELECT id FROM PROFILE WHERE NAME = 'Mort') LIMIT 0, 1000;
/*[9:25:27][   0 ms]*/ SET PROFILING = 1;
/*[9:25:27][   0 ms]*/ SET profiling_history_size = 0;
/*[9:25:27][   0 ms]*/ SET profiling_history_size = 15;
/*[9:25:27][  15 ms]*/ SHOW STATUS;
/*[9:25:27][   0 ms]*/ SELECT * FROM profile_contact   WHERE profile_id = (SELECT id FROM PROFILE ) LIMIT 0, 1000;
/*[13:22:31][   0 ms]*/ SET PROFILING = 1;
/*[13:22:31][   0 ms]*/ SET profiling_history_size = 0;
/*[13:22:31][   0 ms]*/ SET profiling_history_size = 15;
/*[13:22:31][   0 ms]*/ SHOW STATUS;
/*[13:22:31][  78 ms]*/ SELECT * FROM PROFILE LIMIT 0, 1000;
/*[13:22:31][   0 ms]*/ SHOW STATUS;
/*[13:22:31][   0 ms]*/ SHOW PROFILES;
/*[13:22:31][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 183 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:22:31][   0 ms]*/ SET PROFILING = 0;
/*[13:22:31][  16 ms]*/ EXPLAIN SELECT * FROM PROFILE LIMIT 0, 1000;
/*[13:23:05][   0 ms]*/ SET PROFILING = 1;
/*[13:23:05][   0 ms]*/ SET profiling_history_size = 0;
/*[13:23:05][   0 ms]*/ SET profiling_history_size = 15;
/*[13:23:05][  15 ms]*/ SHOW STATUS;
/*[13:23:05][   0 ms]*/ SELECT * FROM PROFILE LIMIT 1;
/*[13:23:05][  16 ms]*/ SHOW STATUS;
/*[13:23:05][   0 ms]*/ SHOW PROFILES;
/*[13:23:05][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 189 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:23:05][   0 ms]*/ SET PROFILING = 0;
/*[13:23:05][   0 ms]*/ EXPLAIN SELECT * FROM PROFILE LIMIT 1;
/*[13:23:27][   0 ms]*/ SET PROFILING = 1;
/*[13:23:27][   0 ms]*/ SET profiling_history_size = 0;
/*[13:23:27][   0 ms]*/ SET profiling_history_size = 15;
/*[13:23:27][   0 ms]*/ SHOW STATUS;
/*[13:23:27][   0 ms]*/ SELECT * FROM PROFILE LIMIT 5;
/*[13:23:27][  16 ms]*/ SHOW STATUS;
/*[13:23:27][   0 ms]*/ SHOW PROFILES;
/*[13:23:27][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 195 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:23:27][   0 ms]*/ SET PROFILING = 0;
/*[13:23:27][  15 ms]*/ EXPLAIN SELECT * FROM PROFILE LIMIT 5;
/*[13:24:14][  15 ms]*/ SET PROFILING = 1;
/*[13:24:14][  15 ms]*/ SET profiling_history_size = 0;
/*[13:24:14][   0 ms]*/ SET profiling_history_size = 15;
/*[13:24:14][   0 ms]*/ SHOW STATUS;
/*[13:24:14][   0 ms]*/ SELECT * FROM PROFILE ORDER BY birth LIMIT 5;
/*[13:24:14][  16 ms]*/ SHOW STATUS;
/*[13:24:14][   0 ms]*/ SHOW PROFILES;
/*[13:24:14][  15 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 201 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:24:14][   0 ms]*/ SET PROFILING = 0;
/*[13:24:14][  15 ms]*/ EXPLAIN SELECT * FROM PROFILE ORDER BY birth LIMIT 5;
/*[13:24:21][   0 ms]*/ SET PROFILING = 1;
/*[13:24:21][   0 ms]*/ SET profiling_history_size = 0;
/*[13:24:21][   0 ms]*/ SET profiling_history_size = 15;
/*[13:24:21][   0 ms]*/ SHOW STATUS;
/*[13:24:21][   0 ms]*/ SELECT * FROM PROFILE ORDER BY birth LIMIT 1;
/*[13:24:21][  16 ms]*/ SHOW STATUS;
/*[13:24:21][   0 ms]*/ SHOW PROFILES;
/*[13:24:21][  15 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 207 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:24:21][   0 ms]*/ SET PROFILING = 0;
/*[13:24:21][   0 ms]*/ EXPLAIN SELECT * FROM PROFILE ORDER BY birth LIMIT 1;
/*[13:24:40][   0 ms]*/ SET PROFILING = 1;
/*[13:24:40][   0 ms]*/ SET profiling_history_size = 0;
/*[13:24:40][  16 ms]*/ SET profiling_history_size = 15;
/*[13:24:40][   0 ms]*/ SHOW STATUS;
/*[13:24:40][ 171 ms]*/ SELECT * FROM PROFILE ORDER BY birth DESC LIMIT 1;
/*[13:24:40][  32 ms]*/ SHOW STATUS;
/*[13:24:40][   0 ms]*/ SHOW PROFILES;
/*[13:24:41][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 213 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:24:41][   0 ms]*/ SET PROFILING = 0;
/*[13:24:41][   0 ms]*/ EXPLAIN SELECT * FROM PROFILE ORDER BY birth DESC LIMIT 1;
/*[13:26:08][   0 ms]*/ SET PROFILING = 1;
/*[13:26:08][   0 ms]*/ SET profiling_history_size = 0;
/*[13:26:08][   0 ms]*/ SET profiling_history_size = 15;
/*[13:26:08][  16 ms]*/ SHOW STATUS;
/*[13:26:08][  16 ms]*/ SELECT * FROM PROFILE ORDER BY birth DESC LIMIT 2-3;
/*[13:26:15][   0 ms]*/ SET PROFILING = 1;
/*[13:26:15][   0 ms]*/ SET profiling_history_size = 0;
/*[13:26:15][   0 ms]*/ SET profiling_history_size = 15;
/*[13:26:15][  16 ms]*/ SHOW STATUS;
/*[13:26:15][  16 ms]*/ SELECT * FROM PROFILE ORDER BY birth DESC LIMIT 2,4;
/*[13:26:15][   0 ms]*/ SHOW STATUS;
/*[13:26:15][   0 ms]*/ SHOW PROFILES;
/*[13:26:15][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 224 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:26:15][   0 ms]*/ SET PROFILING = 0;
/*[13:26:15][  15 ms]*/ EXPLAIN SELECT * FROM PROFILE ORDER BY birth DESC LIMIT 2,4;
/*[13:28:01][   0 ms]*/ SET PROFILING = 1;
/*[13:28:01][   0 ms]*/ SET profiling_history_size = 0;
/*[13:28:01][   0 ms]*/ SET profiling_history_size = 15;
/*[13:28:01][  16 ms]*/ SHOW STATUS;
/*[13:28:01][  31 ms]*/ SELECT COUNT(*) FROM PROFILE LIMIT 0, 1000;
/*[13:28:02][  16 ms]*/ SHOW STATUS;
/*[13:28:02][   0 ms]*/ SHOW PROFILES;
/*[13:28:02][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 230 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:28:02][   0 ms]*/ SET PROFILING = 0;
/*[13:28:02][   0 ms]*/ EXPLAIN SELECT COUNT(*) FROM PROFILE LIMIT 0, 1000;
/*[13:28:45][   0 ms]*/ SET PROFILING = 1;
/*[13:28:45][   0 ms]*/ SET profiling_history_size = 0;
/*[13:28:45][  15 ms]*/ SET profiling_history_size = 15;
/*[13:28:45][   0 ms]*/ SHOW STATUS;
/*[13:28:45][  16 ms]*/ SELECT * FROM PROFILE ORDER BY NAME LIMIT 0,4;
/*[13:28:45][   0 ms]*/ SHOW STATUS;
/*[13:28:45][   0 ms]*/ SHOW PROFILES;
/*[13:28:45][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 236 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:28:45][   0 ms]*/ SET PROFILING = 0;
/*[13:28:45][   0 ms]*/ EXPLAIN SELECT * FROM PROFILE ORDER BY NAME LIMIT 0,4;
/*[13:28:54][   0 ms]*/ SET PROFILING = 1;
/*[13:28:54][   0 ms]*/ SET profiling_history_size = 0;
/*[13:28:54][   0 ms]*/ SET profiling_history_size = 15;
/*[13:28:54][  15 ms]*/ SHOW STATUS;
/*[13:28:54][   0 ms]*/ SELECT * FROM PROFILE ORDER BY NAME LIMIT 4,4;
/*[13:28:54][   0 ms]*/ SHOW STATUS;
/*[13:28:54][   0 ms]*/ SHOW PROFILES;
/*[13:28:54][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 242 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:28:54][   0 ms]*/ SET PROFILING = 0;
/*[13:28:54][   0 ms]*/ EXPLAIN SELECT * FROM PROFILE ORDER BY NAME LIMIT 4,4;
/*[13:28:57][   0 ms]*/ SET PROFILING = 1;
/*[13:28:57][   0 ms]*/ SET profiling_history_size = 0;
/*[13:28:57][   0 ms]*/ SET profiling_history_size = 15;
/*[13:28:57][  15 ms]*/ SHOW STATUS;
/*[13:28:57][  16 ms]*/ SELECT * FROM PROFILE ORDER BY NAME LIMIT 8,4;
/*[13:28:57][  31 ms]*/ SHOW STATUS;
/*[13:28:57][   0 ms]*/ SHOW PROFILES;
/*[13:28:57][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 248 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:28:57][   0 ms]*/ SET PROFILING = 0;
/*[13:28:58][   0 ms]*/ EXPLAIN SELECT * FROM PROFILE ORDER BY NAME LIMIT 8,4;
/*[13:30:15][   0 ms]*/ SET PROFILING = 1;
/*[13:30:15][   0 ms]*/ SET profiling_history_size = 0;
/*[13:30:15][   0 ms]*/ SET profiling_history_size = 15;
/*[13:30:15][  16 ms]*/ SHOW STATUS;
/*[13:30:15][   0 ms]*/ SELECT SQL_CALC_FOUND_ROWS * FROM PROFILE ORDER BY NAME LIMIT 4;
/*[13:30:15][   0 ms]*/ SHOW STATUS;
/*[13:30:15][   0 ms]*/ SHOW PROFILES;
/*[13:30:15][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 254 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:30:15][  16 ms]*/ SET PROFILING = 0;
/*[13:30:15][  15 ms]*/ EXPLAIN SELECT SQL_CALC_FOUND_ROWS * FROM PROFILE ORDER BY NAME LIMIT 4;
/*[13:30:56][   0 ms]*/ SET PROFILING = 1;
/*[13:30:56][   0 ms]*/ SET profiling_history_size = 0;
/*[13:30:56][   0 ms]*/ SET profiling_history_size = 15;
/*[13:30:56][  15 ms]*/ SHOW STATUS;
/*[13:30:56][  32 ms]*/ SELECT FOUND_ROWS();
/*[13:30:56][  15 ms]*/ SHOW STATUS;
/*[13:30:56][   0 ms]*/ SHOW PROFILES;
/*[13:30:56][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 260 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:30:56][   0 ms]*/ SET PROFILING = 0;
/*[13:30:56][   0 ms]*/ EXPLAIN   SELECT FOUND_ROWS();
/*[13:30:58][   0 ms]*/ SET PROFILING = 1;
/*[13:30:58][   0 ms]*/ SET profiling_history_size = 0;
/*[13:30:58][   0 ms]*/ SET profiling_history_size = 15;
/*[13:30:58][   0 ms]*/ SHOW STATUS;
/*[13:30:58][   0 ms]*/ SELECT FOUND_ROWS();
/*[13:30:58][   0 ms]*/ SHOW STATUS;
/*[13:30:58][   0 ms]*/ SHOW PROFILES;
/*[13:30:58][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 266 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:30:58][   0 ms]*/ SET PROFILING = 0;
/*[13:30:58][   0 ms]*/ EXPLAIN   SELECT FOUND_ROWS();
/*[13:30:59][   0 ms]*/ SET PROFILING = 1;
/*[13:30:59][  15 ms]*/ SET profiling_history_size = 0;
/*[13:30:59][   0 ms]*/ SET profiling_history_size = 15;
/*[13:30:59][   0 ms]*/ SHOW STATUS;
/*[13:30:59][   0 ms]*/ SELECT FOUND_ROWS();
/*[13:30:59][   0 ms]*/ SHOW STATUS;
/*[13:30:59][   0 ms]*/ SHOW PROFILES;
/*[13:30:59][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 272 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:30:59][   0 ms]*/ SET PROFILING = 0;
/*[13:30:59][   0 ms]*/ EXPLAIN   SELECT FOUND_ROWS();
/*[13:31:00][   0 ms]*/ SET PROFILING = 1;
/*[13:31:00][   0 ms]*/ SET profiling_history_size = 0;
/*[13:31:00][   0 ms]*/ SET profiling_history_size = 15;
/*[13:31:00][   0 ms]*/ SHOW STATUS;
/*[13:31:00][   0 ms]*/ SELECT FOUND_ROWS();
/*[13:31:00][  15 ms]*/ SHOW STATUS;
/*[13:31:00][   0 ms]*/ SHOW PROFILES;
/*[13:31:00][  16 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 278 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:31:00][   0 ms]*/ SET PROFILING = 0;
/*[13:31:00][   0 ms]*/ EXPLAIN   SELECT FOUND_ROWS();
/*[13:31:03][   0 ms]*/ SET PROFILING = 1;
/*[13:31:03][   0 ms]*/ SET profiling_history_size = 0;
/*[13:31:03][   0 ms]*/ SET profiling_history_size = 15;
/*[13:31:03][  15 ms]*/ SHOW STATUS;
/*[13:31:03][   0 ms]*/ SELECT SQL_CALC_FOUND_ROWS * FROM PROFILE ORDER BY NAME LIMIT 4;
/*[13:31:03][   0 ms]*/ SHOW STATUS;
/*[13:31:03][  16 ms]*/ SHOW PROFILES;
/*[13:31:03][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 284 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:31:03][  16 ms]*/ SET PROFILING = 0;
/*[13:31:04][   0 ms]*/ EXPLAIN SELECT SQL_CALC_FOUND_ROWS * FROM PROFILE ORDER BY NAME LIMIT 4;
/*[13:31:24][  15 ms]*/ SET PROFILING = 1;
/*[13:31:24][   0 ms]*/ SET profiling_history_size = 0;
/*[13:31:24][   0 ms]*/ SET profiling_history_size = 15;
/*[13:31:24][  15 ms]*/ SHOW STATUS;
/*[13:31:24][   0 ms]*/ SELECT SQL_CALC_FOUND_ROWS * FROM PROFILE ORDER BY NAME LIMIT 4;
/*[13:31:24][  15 ms]*/ SHOW STATUS;
/*[13:31:24][   0 ms]*/ SHOW PROFILES;
/*[13:31:24][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 290 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:31:24][   0 ms]*/ SET PROFILING = 0;
/*[13:31:24][   0 ms]*/ SELECT FOUND_ROWS();
/*[13:31:24][   0 ms]*/ EXPLAIN SELECT SQL_CALC_FOUND_ROWS * FROM PROFILE ORDER BY NAME LIMIT 4;
/*[13:33:42][   0 ms]*/ SELECT DATABASE();
/*[13:33:58][  93 ms]*/ DESCRIBE `cookbook`.`profile`;
/*[13:33:58][   0 ms]*/ SHOW INDEX FROM `cookbook`.`profile`;
/*[13:34:04][ 297 ms]*/ SHOW FULL TABLES FROM `cookbook` WHERE table_type = 'BASE TABLE';
/*[13:34:07][  47 ms]*/ DESCRIBE `cookbook`.`al_winner`;
/*[13:34:07][   0 ms]*/ SHOW INDEX FROM `cookbook`.`al_winner`;
/*[13:35:03][   0 ms]*/ SET PROFILING = 1;
/*[13:35:03][   0 ms]*/ SET profiling_history_size = 0;
/*[13:35:03][   0 ms]*/ SET profiling_history_size = 15;
/*[13:35:03][   0 ms]*/ SHOW STATUS;
/*[13:35:03][   0 ms]*/ SELECT NAME,wins FROM al_winner ORDER BY wins DESC,NAME LIMIT 0, 1000;
/*[13:35:03][   0 ms]*/ SHOW STATUS;
/*[13:35:03][   0 ms]*/ SHOW PROFILES;
/*[13:35:03][  15 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 296 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:35:03][   0 ms]*/ SET PROFILING = 0;
/*[13:35:03][  16 ms]*/ EXPLAIN SELECT NAME,wins FROM al_winner ORDER BY wins DESC,NAME LIMIT 0, 1000;
/*[13:35:51][  16 ms]*/ SET PROFILING = 1;
/*[13:35:51][   0 ms]*/ SET profiling_history_size = 0;
/*[13:35:51][   0 ms]*/ SET profiling_history_size = 15;
/*[13:35:51][  16 ms]*/ SHOW STATUS;
/*[13:35:51][   0 ms]*/ SELECT NAME,wins FROM al_winner ORDER BY wins DESC,NAME LIMIT 4;
/*[13:35:51][   0 ms]*/ SHOW STATUS;
/*[13:35:51][   0 ms]*/ SHOW PROFILES;
/*[13:35:51][  16 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 302 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:35:51][   0 ms]*/ SET PROFILING = 0;
/*[13:35:51][  16 ms]*/ EXPLAIN SELECT NAME,wins FROM al_winner ORDER BY wins DESC,NAME LIMIT 4;
/*[13:36:43][   0 ms]*/ SET PROFILING = 1;
/*[13:36:43][  16 ms]*/ SET profiling_history_size = 0;
/*[13:36:43][   0 ms]*/ SET profiling_history_size = 15;
/*[13:36:43][  15 ms]*/ SHOW STATUS;
/*[13:36:43][   0 ms]*/ SELECT NAME,wins FROM al_winner ORDER BY wins DESC,NAME LIMIT 3,1;
/*[13:36:44][   0 ms]*/ SHOW STATUS;
/*[13:36:44][   0 ms]*/ SHOW PROFILES;
/*[13:36:44][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 308 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:36:44][   0 ms]*/ SET PROFILING = 0;
/*[13:36:44][   0 ms]*/ EXPLAIN SELECT NAME,wins FROM al_winner ORDER BY wins DESC,NAME LIMIT 3,1;
/*[13:37:12][  15 ms]*/ SET PROFILING = 1;
/*[13:37:12][   0 ms]*/ SET profiling_history_size = 0;
/*[13:37:12][  16 ms]*/ SET profiling_history_size = 15;
/*[13:37:12][   0 ms]*/ SHOW STATUS;
/*[13:37:12][   0 ms]*/ SELECT NAME,wins FROM al_winner  WHERE wins >= 18 ORDER BY wins DESC,NAME LIMIT 0, 1000;
/*[13:37:13][   0 ms]*/ SHOW STATUS;
/*[13:37:13][   0 ms]*/ SHOW PROFILES;
/*[13:37:13][  16 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 314 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:37:13][   0 ms]*/ SET PROFILING = 0;
/*[13:37:13][   0 ms]*/ EXPLAIN SELECT NAME,wins FROM al_winner  WHERE wins >= 18 ORDER BY wins DESC,NAME LIMIT 0, 1000;
/*[13:40:07][   0 ms]*/ SET PROFILING = 1;
/*[13:40:07][  15 ms]*/ SET profiling_history_size = 0;
/*[13:40:07][   0 ms]*/ SET profiling_history_size = 15;
/*[13:40:07][  16 ms]*/ SHOW STATUS;
/*[13:40:07][  16 ms]*/ SELECT * FROM (SELECT NAME,birth FROM PROFILE ORDER BY birth DESC LIMIT 4) AS t ORDER BY birth LIMIT 0, 1000;
/*[13:40:07][  15 ms]*/ SHOW STATUS;
/*[13:40:07][  16 ms]*/ SHOW PROFILES;
/*[13:40:07][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 320 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:40:07][   0 ms]*/ SET PROFILING = 0;
/*[13:40:07][  16 ms]*/ EXPLAIN SELECT * FROM (SELECT NAME,birth FROM PROFILE ORDER BY birth DESC LIMIT 4) AS t ORDER BY birth LIMIT 0, 1000;
/*[13:43:53][ 172 ms]*/ CREATE TABLE mail2 LIKE mail;
/*[13:44:32][  78 ms]*/ INSERT INTO mail2 SELECT * FROM mail WHERE srcuser = 'barb';
/*[13:44:48][   0 ms]*/ SET PROFILING = 1;
/*[13:44:48][   0 ms]*/ SET profiling_history_size = 0;
/*[13:44:48][   0 ms]*/ SET profiling_history_size = 15;
/*[13:44:48][   0 ms]*/ SHOW STATUS;
/*[13:44:48][  16 ms]*/ SELECT * FROM mail2 LIMIT 0, 1000;
/*[13:44:48][  15 ms]*/ SHOW STATUS;
/*[13:44:48][   0 ms]*/ SHOW PROFILES;
/*[13:44:48][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 326 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[13:44:48][   0 ms]*/ SET PROFILING = 0;
/*[13:44:48][  15 ms]*/ EXPLAIN SELECT * FROM mail2 LIMIT 0, 1000;
/*[14:01:53][ 374 ms]*/ CREATE TEMPORARY TABLE mail SELECT * FROM mail;
/*[14:02:10][   0 ms]*/ SET PROFILING = 1;
/*[14:02:10][   0 ms]*/ SET profiling_history_size = 0;
/*[14:02:10][   0 ms]*/ SET profiling_history_size = 15;
/*[14:02:10][   0 ms]*/ SHOW STATUS;
/*[14:02:10][   0 ms]*/ SELECT COUNT(*) FROM mail LIMIT 0, 1000;
/*[14:02:10][   0 ms]*/ SHOW STATUS;
/*[14:02:10][   0 ms]*/ SHOW PROFILES;
/*[14:02:10][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 332 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[14:02:10][  16 ms]*/ SET PROFILING = 0;
/*[14:02:10][   0 ms]*/ EXPLAIN SELECT COUNT(*) FROM mail LIMIT 0, 1000;
/*[14:02:23][ 172 ms]*/ DELETE FROM mail;
/*[14:02:24][   0 ms]*/ DELETE FROM mail;
/*[14:02:37][   0 ms]*/ SET PROFILING = 1;
/*[14:02:37][  16 ms]*/ SET profiling_history_size = 0;
/*[14:02:37][   0 ms]*/ SET profiling_history_size = 15;
/*[14:02:37][   0 ms]*/ SHOW STATUS;
/*[14:02:37][  15 ms]*/ SELECT COUNT(*) FROM mail LIMIT 0, 1000;
/*[14:02:37][   0 ms]*/ SHOW STATUS;
/*[14:02:37][   0 ms]*/ SHOW PROFILES;
/*[14:02:37][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 338 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[14:02:37][   0 ms]*/ SET PROFILING = 0;
/*[14:02:37][  16 ms]*/ EXPLAIN SELECT COUNT(*) FROM mail LIMIT 0, 1000;
/*[14:02:52][ 375 ms]*/ DROP TABLE mail;
/*[14:03:06][   0 ms]*/ SET PROFILING = 1;
/*[14:03:06][   0 ms]*/ SET profiling_history_size = 0;
/*[14:03:06][   0 ms]*/ SET profiling_history_size = 15;
/*[14:03:06][   0 ms]*/ SHOW STATUS;
/*[14:03:06][  15 ms]*/ SELECT COUNT(*) FROM mail LIMIT 0, 1000;
/*[14:03:06][  16 ms]*/ SHOW STATUS;
/*[14:03:06][   0 ms]*/ SHOW PROFILES;
/*[14:03:06][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 344 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[14:03:06][   0 ms]*/ SET PROFILING = 0;
/*[14:03:06][  15 ms]*/ EXPLAIN SELECT COUNT(*) FROM mail LIMIT 0, 1000;
/*[14:04:43][  63 ms]*/ SELECT `SPECIFIC_NAME` FROM `INFORMATION_SCHEMA`.`ROUTINES` WHERE `ROUTINE_SCHEMA` = 'cookbook' AND ROUTINE_TYPE = 'PROCEDURE';
/*[14:04:43][  15 ms]*/ SELECT `SPECIFIC_NAME` FROM `INFORMATION_SCHEMA`.`ROUTINES` WHERE `ROUTINE_SCHEMA` = 'cookbook' AND ROUTINE_TYPE = 'FUNCTION';
/*[14:04:44][  62 ms]*/ SHOW TRIGGERS FROM `cookbook`;
/*[14:04:45][  47 ms]*/ SELECT `EVENT_NAME` FROM `INFORMATION_SCHEMA`.`EVENTS` WHERE `EVENT_SCHEMA` = 'cookbook' ORDER BY EVENT_NAME;
/*[14:06:40][   0 ms]*/ SET PROFILING = 1;
/*[14:06:40][  31 ms]*/ SET profiling_history_size = 0;
/*[14:06:40][   0 ms]*/ SET profiling_history_size = 15;
/*[14:06:40][  16 ms]*/ SHOW STATUS;
/*[14:06:40][   0 ms]*/ SELECT ENGINE fromj information_schema.TABLES  WHERE table_schema = 'cookbook' AND table_name = 'mail';
/*[14:06:52][   0 ms]*/ SET PROFILING = 1;
/*[14:06:52][   0 ms]*/ SET profiling_history_size = 0;
/*[14:06:52][   0 ms]*/ SET profiling_history_size = 15;
/*[14:06:52][  15 ms]*/ SHOW STATUS;
/*[14:06:52][   0 ms]*/ SELECT ENGINE FROM information_schema.TABLES  WHERE table_schema = 'cookbook' AND table_name = 'mail' LIMIT 0, 1000;
/*[14:06:52][   0 ms]*/ SHOW STATUS;
/*[14:06:52][   0 ms]*/ SHOW PROFILES;
/*[14:06:52][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 355 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[14:06:52][   0 ms]*/ SET PROFILING = 0;
/*[14:06:52][   0 ms]*/ EXPLAIN SELECT ENGINE FROM information_schema.TABLES  WHERE table_schema = 'cookbook' AND table_name = 'mail' LIMIT 0, 1000;
/*[14:07:35][  15 ms]*/ USE `information_schema`;
/*[14:07:37][   0 ms]*/ SHOW TABLES FROM `information_schema`;
/*[14:07:44][  31 ms]*/ DESCRIBE `information_schema`.`TABLES`;
/*[14:07:44][  16 ms]*/ SHOW INDEX FROM `information_schema`.`TABLES`;
/*[14:07:47][  94 ms]*/ SHOW FULL FIELDS FROM `information_schema`.`TABLES`;
/*[14:07:47][   0 ms]*/ SHOW KEYS FROM `information_schema`.`TABLES`;
/*[14:07:49][1825 ms]*/ SELECT * FROM `information_schema`.`TABLES` LIMIT 0, 100;
/*[14:08:45][   0 ms]*/ SET PROFILING = 1;
/*[14:08:45][   0 ms]*/ SET profiling_history_size = 0;
/*[14:08:45][  16 ms]*/ SET profiling_history_size = 15;
/*[14:08:45][  15 ms]*/ SHOW STATUS;
/*[14:08:45][   0 ms]*/ SELECT ENGINE FROM information_schema.TABLES  WHERE table_schema = 'cookbook' AND table_name = 'mail' LIMIT 0, 1000;
/*[14:08:45][   0 ms]*/ SHOW STATUS;
/*[14:08:45][   0 ms]*/ SHOW PROFILES;
/*[14:08:45][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 361 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[14:08:45][  15 ms]*/ SET PROFILING = 0;
/*[14:08:45][   0 ms]*/ EXPLAIN SELECT ENGINE FROM information_schema.TABLES  WHERE table_schema = 'cookbook' AND table_name = 'mail' LIMIT 0, 1000;
/*[14:09:22][  16 ms]*/ SHOW TABLE STATUS LIKE 'mail';
/*[14:09:45][   0 ms]*/ SHOW TABLE STATUS LIKE 'mail'G ;
/*[14:10:27][   0 ms]*/ SHOW CREATE TABLE mailG;
/*[14:10:34][  15 ms]*/ SHOW CREATE TABLE mail;
/*[14:16:10][  78 ms]*/ SHOW CHARACTER SET;
/*[18:45:10][   0 ms]*/ USE `cookbook`;
/*[18:45:13][   0 ms]*/ SELECT DATABASE();
/*[18:45:28][   0 ms]*/ SELECT DATABASE();
/*[18:47:06][ 187 ms]*/ SHOW FULL TABLES FROM `cookbook` WHERE table_type = 'BASE TABLE';
/*[18:47:07][   0 ms]*/ SHOW FULL TABLES FROM `cookbook` WHERE table_type = 'BASE TABLE';
/*[18:47:09][  31 ms]*/ DESCRIBE `cookbook`.`artist`;
/*[18:47:09][  16 ms]*/ SHOW INDEX FROM `cookbook`.`artist`;
/*[18:47:12][  31 ms]*/ SHOW FULL FIELDS FROM `cookbook`.`artist`;
/*[18:47:12][   0 ms]*/ SHOW KEYS FROM `cookbook`.`artist`;
/*[18:47:12][   0 ms]*/ SELECT * FROM `cookbook`.`artist` LIMIT 0, 100;
/*[18:47:19][  62 ms]*/ SHOW FULL FIELDS FROM `cookbook`.`painting`;
/*[18:47:19][   0 ms]*/ SHOW KEYS FROM `cookbook`.`painting`;
/*[18:47:19][   0 ms]*/ SELECT * FROM `cookbook`.`painting` LIMIT 0, 100;
/*[18:47:20][  47 ms]*/ DESCRIBE `cookbook`.`painting`;
/*[18:47:20][   0 ms]*/ SHOW INDEX FROM `cookbook`.`painting`;
/*[18:48:13][   0 ms]*/ SET PROFILING = 1;
/*[18:48:13][   0 ms]*/ SET profiling_history_size = 0;
/*[18:48:13][   0 ms]*/ SET profiling_history_size = 15;
/*[18:48:13][  16 ms]*/ SHOW STATUS;
/*[18:48:13][   0 ms]*/ SELECT * FROM artist ORDER BY a_id LIMIT 0, 1000;
/*[18:48:13][   0 ms]*/ SHOW STATUS;
/*[18:48:13][  15 ms]*/ SHOW PROFILES;
/*[18:48:13][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 367 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[18:48:13][   0 ms]*/ SET PROFILING = 0;
/*[18:48:13][   0 ms]*/ EXPLAIN SELECT * FROM artist ORDER BY a_id LIMIT 0, 1000;
/*[18:48:41][   0 ms]*/ SET PROFILING = 1;
/*[18:48:41][   0 ms]*/ SET profiling_history_size = 0;
/*[18:48:41][   0 ms]*/ SET profiling_history_size = 15;
/*[18:48:41][   0 ms]*/ SHOW STATUS;
/*[18:48:41][  16 ms]*/ SELECT * FROM painting ORDER BY a_id,p_id LIMIT 0, 1000;
/*[18:48:41][  16 ms]*/ SHOW STATUS;
/*[18:48:41][   0 ms]*/ SHOW PROFILES;
/*[18:48:41][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 373 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[18:48:41][   0 ms]*/ SET PROFILING = 0;
/*[18:48:41][   0 ms]*/ EXPLAIN SELECT * FROM painting ORDER BY a_id,p_id LIMIT 0, 1000;
/*[18:50:09][   0 ms]*/ SET PROFILING = 1;
/*[18:50:09][   0 ms]*/ SET profiling_history_size = 0;
/*[18:50:09][   0 ms]*/ SET profiling_history_size = 15;
/*[18:50:09][   0 ms]*/ SHOW STATUS;
/*[18:50:09][   0 ms]*/ SELECT * FROM painting ,artist LIMIT 0, 1000;
/*[18:50:09][   0 ms]*/ SHOW STATUS;
/*[18:50:09][   0 ms]*/ SHOW PROFILES;
/*[18:50:09][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 379 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[18:50:09][   0 ms]*/ SET PROFILING = 0;
/*[18:50:09][   0 ms]*/ EXPLAIN SELECT * FROM painting ,artist LIMIT 0, 1000;
/*[19:37:30][   0 ms]*/ SET PROFILING = 1;
/*[19:37:30][   0 ms]*/ SET profiling_history_size = 0;
/*[19:37:30][   0 ms]*/ SET profiling_history_size = 15;
/*[19:37:30][  15 ms]*/ SHOW STATUS;
/*[19:37:30][   0 ms]*/ SELECT * FROM artist,paiting WHERE artist.a_id = painting.a_id LIMIT 0, 1000;
/*[19:37:54][   0 ms]*/ SET PROFILING = 1;
/*[19:37:54][   0 ms]*/ SET profiling_history_size = 0;
/*[19:37:54][   0 ms]*/ SET profiling_history_size = 15;
/*[19:37:54][  16 ms]*/ SHOW STATUS;
/*[19:37:54][   0 ms]*/ SELECT * FROM artist,painting WHERE artist.a_id = painting.a_id LIMIT 0, 1000;
/*[19:37:54][  15 ms]*/ SHOW STATUS;
/*[19:37:54][   0 ms]*/ SHOW PROFILES;
/*[19:37:54][  16 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 390 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[19:37:54][   0 ms]*/ SET PROFILING = 0;
/*[19:37:54][   0 ms]*/ EXPLAIN SELECT * FROM artist,painting WHERE artist.a_id = painting.a_id LIMIT 0, 1000;
/*[19:41:34][  46 ms]*/ DESCRIBE `cookbook`.`painting`;
/*[19:41:34][   0 ms]*/ SHOW INDEX FROM `cookbook`.`painting`;
/*[19:41:39][   0 ms]*/ SET PROFILING = 1;
/*[19:41:39][   0 ms]*/ SET profiling_history_size = 0;
/*[19:41:39][   0 ms]*/ SET profiling_history_size = 15;
/*[19:41:39][   0 ms]*/ SHOW STATUS;
/*[19:41:39][   0 ms]*/ SELECT * FROM artist INNER JOIN painting ON artist.a_id = painting.a_id LIMIT 0, 1000;
/*[19:41:39][   0 ms]*/ SHOW STATUS;
/*[19:41:39][   0 ms]*/ SHOW PROFILES;
/*[19:41:39][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 396 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[19:41:39][   0 ms]*/ SET PROFILING = 0;
/*[19:41:39][   0 ms]*/ EXPLAIN SELECT * FROM artist INNER JOIN painting ON artist.a_id = painting.a_id LIMIT 0, 1000;
/*[19:41:40][   0 ms]*/ SET PROFILING = 1;
/*[19:41:40][   0 ms]*/ SET profiling_history_size = 0;
/*[19:41:40][   0 ms]*/ SET profiling_history_size = 15;
/*[19:41:40][   0 ms]*/ SHOW STATUS;
/*[19:41:40][   0 ms]*/ SELECT * FROM artist INNER JOIN painting ON artist.a_id = painting.a_id LIMIT 0, 1000;
/*[19:41:40][  16 ms]*/ SHOW STATUS;
/*[19:41:40][   0 ms]*/ SHOW PROFILES;
/*[19:41:40][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 402 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[19:41:40][   0 ms]*/ SET PROFILING = 0;
/*[19:41:40][   0 ms]*/ EXPLAIN SELECT * FROM artist INNER JOIN painting ON artist.a_id = painting.a_id LIMIT 0, 1000;
/*[19:43:15][   0 ms]*/ SET PROFILING = 1;
/*[19:43:15][   0 ms]*/ SET profiling_history_size = 0;
/*[19:43:15][   0 ms]*/ SET profiling_history_size = 15;
/*[19:43:15][   0 ms]*/ SHOW STATUS;
/*[19:43:15][   0 ms]*/ SELECT * FROM artist INNER JOIN painting USING(a_id) LIMIT 0, 1000;
/*[19:43:15][   0 ms]*/ SHOW STATUS;
/*[19:43:15][   0 ms]*/ SHOW PROFILES;
/*[19:43:15][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 408 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[19:43:15][   0 ms]*/ SET PROFILING = 0;
/*[19:43:15][   0 ms]*/ EXPLAIN SELECT * FROM artist INNER JOIN painting USING(a_id) LIMIT 0, 1000;
/*[19:46:13][   0 ms]*/ SET PROFILING = 1;
/*[19:46:13][   0 ms]*/ SET profiling_history_size = 0;
/*[19:46:13][   0 ms]*/ SET profiling_history_size = 15;
/*[19:46:13][  16 ms]*/ SHOW STATUS;
/*[19:46:13][   0 ms]*/ SELECT * FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  WHERE painting.state = 'KY' LIMIT 0, 1000;
/*[19:46:13][   0 ms]*/ SHOW STATUS;
/*[19:46:13][   0 ms]*/ SHOW PROFILES;
/*[19:46:13][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 414 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[19:46:13][   0 ms]*/ SET PROFILING = 0;
/*[19:46:13][   0 ms]*/ EXPLAIN SELECT * FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  WHERE painting.state = 'KY' LIMIT 0, 1000;
/*[19:47:19][  63 ms]*/ DESCRIBE `cookbook`.`painting`;
/*[19:47:19][   0 ms]*/ SHOW INDEX FROM `cookbook`.`painting`;
/*[19:47:21][   0 ms]*/ SET PROFILING = 1;
/*[19:47:21][   0 ms]*/ SET profiling_history_size = 0;
/*[19:47:21][   0 ms]*/ SET profiling_history_size = 15;
/*[19:47:21][   0 ms]*/ SHOW STATUS;
/*[19:47:21][  15 ms]*/ SELECT artist.NAME,painting.title,painting.state,painting.price  FROM artist INNER JOIN painting   ON artist.a_id = painting.a_id  WHERE painting.state = 'KY' LIMIT 0, 1000;
/*[19:47:21][   0 ms]*/ SHOW STATUS;
/*[19:47:21][   0 ms]*/ SHOW PROFILES;
/*[19:47:21][  16 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 420 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[19:47:21][   0 ms]*/ SET PROFILING = 0;
/*[19:47:21][   0 ms]*/ EXPLAIN SELECT artist.NAME,painting.title,painting.state,painting.price  FROM artist INNER JOIN painting   ON artist.a_id = painting.a_id  WHERE painting.state = 'KY' LIMIT 0, 1000;
/*[19:49:13][   0 ms]*/ SELECT DATABASE();
/*[19:50:52][   0 ms]*/ SET PROFILING = 1;
/*[19:50:52][  15 ms]*/ SET profiling_history_size = 0;
/*[19:50:52][   0 ms]*/ SET profiling_history_size = 15;
/*[19:50:52][   0 ms]*/ SHOW STATUS;
/*[19:50:52][   0 ms]*/ SELECT artist.NAME,painting.title,states.state,painting.price  FROM artist INNER JOIN painting INNER JOIN states  ON artist.a_id = painting.a_id AND painting.state = states.abbrev  WHERE painting.state = 'KY' LIMIT 0, 1000;
/*[19:51:24][   0 ms]*/ SET PROFILING = 1;
/*[19:51:24][   0 ms]*/ SET profiling_history_size = 0;
/*[19:51:24][   0 ms]*/ SET profiling_history_size = 15;
/*[19:51:24][   0 ms]*/ SHOW STATUS;
/*[19:51:24][  16 ms]*/ SELECT artist.NAME,painting.title,states.NAME,painting.price  FROM artist INNER JOIN painting INNER JOIN states  ON artist.a_id = painting.a_id AND painting.state = states.abbrev  WHERE painting.state = 'KY' LIMIT 0, 1000;
/*[19:51:24][   0 ms]*/ SHOW STATUS;
/*[19:51:24][   0 ms]*/ SHOW PROFILES;
/*[19:51:24][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 431 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[19:51:24][   0 ms]*/ SET PROFILING = 0;
/*[19:51:24][   0 ms]*/ EXPLAIN SELECT artist.NAME,painting.title,states.NAME,painting.price  FROM artist INNER JOIN painting INNER JOIN states  ON artist.a_id = painting.a_id AND painting.state = states.abbrev  WHERE painting.state = 'KY' LIMIT 0, 1000;
/*[19:51:33][   0 ms]*/ SET PROFILING = 1;
/*[19:51:33][   0 ms]*/ SET profiling_history_size = 0;
/*[19:51:33][   0 ms]*/ SET profiling_history_size = 15;
/*[19:51:33][  16 ms]*/ SHOW STATUS;
/*[19:51:33][   0 ms]*/ SELECT artist.NAME,painting.title,states.NAME,painting.price  FROM artist INNER JOIN painting INNER JOIN states  ON artist.a_id = painting.a_id AND painting.state = states.abbrev LIMIT 0, 1000;
/*[19:51:33][   0 ms]*/ SHOW STATUS;
/*[19:51:33][   0 ms]*/ SHOW PROFILES;
/*[19:51:33][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 437 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[19:51:33][   0 ms]*/ SET PROFILING = 0;
/*[19:51:33][   0 ms]*/ EXPLAIN SELECT artist.NAME,painting.title,states.NAME,painting.price  FROM artist INNER JOIN painting INNER JOIN states  ON artist.a_id = painting.a_id AND painting.state = states.abbrev LIMIT 0, 1000;
/*[19:57:46][   0 ms]*/ SET PROFILING = 1;
/*[19:57:46][   0 ms]*/ SET profiling_history_size = 0;
/*[19:57:46][   0 ms]*/ SET profiling_history_size = 15;
/*[19:57:46][   0 ms]*/ SHOW STATUS;
/*[19:57:46][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.az-id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[19:58:25][   0 ms]*/ SET PROFILING = 1;
/*[19:58:25][   0 ms]*/ SET profiling_history_size = 0;
/*[19:58:25][   0 ms]*/ SET profiling_history_size = 15;
/*[19:58:25][   0 ms]*/ SHOW STATUS;
/*[19:58:25][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[19:59:38][   0 ms]*/ SET PROFILING = 1;
/*[19:59:38][   0 ms]*/ SET profiling_history_size = 0;
/*[19:59:38][   0 ms]*/ SET profiling_history_size = 15;
/*[19:59:38][  16 ms]*/ SHOW STATUS;
/*[19:59:38][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[19:59:39][   0 ms]*/ SET PROFILING = 1;
/*[19:59:39][   0 ms]*/ SET profiling_history_size = 0;
/*[19:59:39][   0 ms]*/ SET profiling_history_size = 15;
/*[19:59:39][  15 ms]*/ SHOW STATUS;
/*[19:59:39][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[19:59:39][   0 ms]*/ SET PROFILING = 1;
/*[19:59:39][   0 ms]*/ SET profiling_history_size = 0;
/*[19:59:39][   0 ms]*/ SET profiling_history_size = 15;
/*[19:59:39][  16 ms]*/ SHOW STATUS;
/*[19:59:39][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[19:59:39][   0 ms]*/ SET PROFILING = 1;
/*[19:59:39][   0 ms]*/ SET profiling_history_size = 0;
/*[19:59:39][   0 ms]*/ SET profiling_history_size = 15;
/*[19:59:39][   0 ms]*/ SHOW STATUS;
/*[19:59:39][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[19:59:39][   0 ms]*/ SET PROFILING = 1;
/*[19:59:39][   0 ms]*/ SET profiling_history_size = 0;
/*[19:59:39][   0 ms]*/ SET profiling_history_size = 15;
/*[19:59:39][   0 ms]*/ SHOW STATUS;
/*[19:59:39][  16 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[20:00:07][   0 ms]*/ SET PROFILING = 1;
/*[20:00:07][   0 ms]*/ SET profiling_history_size = 0;
/*[20:00:07][   0 ms]*/ SET profiling_history_size = 15;
/*[20:00:07][  15 ms]*/ SHOW STATUS;
/*[20:00:07][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id LIMIT 0, 1000;
/*[20:01:35][  15 ms]*/ SET PROFILING = 1;
/*[20:01:35][   0 ms]*/ SET profiling_history_size = 0;
/*[20:01:35][   0 ms]*/ SET profiling_history_size = 15;
/*[20:01:35][   0 ms]*/ SHOW STATUS;
/*[20:01:35][  15 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.p_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[20:01:39][   0 ms]*/ SET PROFILING = 1;
/*[20:01:39][  15 ms]*/ SET profiling_history_size = 0;
/*[20:01:39][   0 ms]*/ SET profiling_history_size = 15;
/*[20:01:39][   0 ms]*/ SHOW STATUS;
/*[20:01:39][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price',  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[20:02:15][   0 ms]*/ SET PROFILING = 1;
/*[20:02:15][   0 ms]*/ SET profiling_history_size = 0;
/*[20:02:15][   0 ms]*/ SET profiling_history_size = 15;
/*[20:02:15][  16 ms]*/ SHOW STATUS;
/*[20:02:15][  15 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price'  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[20:02:15][   0 ms]*/ SHOW STATUS;
/*[20:02:15][   0 ms]*/ SHOW PROFILES;
/*[20:02:15][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 493 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[20:02:15][  16 ms]*/ SET PROFILING = 0;
/*[20:02:15][   0 ms]*/ EXPLAIN SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price'  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[20:02:34][   0 ms]*/ SET PROFILING = 1;
/*[20:02:34][   0 ms]*/ SET profiling_history_size = 0;
/*[20:02:34][   0 ms]*/ SET profiling_history_size = 15;
/*[20:02:34][  16 ms]*/ SHOW STATUS;
/*[20:02:34][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price'  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id LIMIT 0, 1000;
/*[20:02:34][  15 ms]*/ SHOW STATUS;
/*[20:02:34][   0 ms]*/ SHOW PROFILES;
/*[20:02:34][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 499 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[20:02:34][   0 ms]*/ SET PROFILING = 0;
/*[20:02:34][   0 ms]*/ EXPLAIN SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price'  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id LIMIT 0, 1000;
/*[20:02:52][   0 ms]*/ SET PROFILING = 1;
/*[20:02:52][   0 ms]*/ SET profiling_history_size = 0;
/*[20:02:52][   0 ms]*/ SET profiling_history_size = 15;
/*[20:02:52][  15 ms]*/ SHOW STATUS;
/*[20:02:52][   0 ms]*/ SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price'  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[20:02:52][  16 ms]*/ SHOW STATUS;
/*[20:02:52][   0 ms]*/ SHOW PROFILES;
/*[20:02:52][  15 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 505 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[20:02:52][   0 ms]*/ SET PROFILING = 0;
/*[20:02:52][   0 ms]*/ EXPLAIN SELECT artist.NAME,  COUNT(*) AS 'number of paintings',  SUM(painting.price) AS 'total price',  AVG(painting.price) AS 'average price'  FROM artist INNER JOIN painting ON artist.a_id = painting.a_id  GROUP BY artist.NAME LIMIT 0, 1000;
/*[20:06:06][   0 ms]*/ SET PROFILING = 1;
/*[20:06:06][   0 ms]*/ SET profiling_history_size = 0;
/*[20:06:06][   0 ms]*/ SET profiling_history_size = 15;
/*[20:06:06][  16 ms]*/ SHOW STATUS;
/*[20:06:06][   0 ms]*/ SELECT a.NAME,p.title,s.NAME,p.price  FROM artist AS a INNER JOIN painting AS p INNER JOIN states AS s  ON a.a_id = p.a_id AND p.state = s.abbrev LIMIT 0, 1000;
/*[20:06:06][  15 ms]*/ SHOW STATUS;
/*[20:06:06][   0 ms]*/ SHOW PROFILES;
/*[20:06:06][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 511 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[20:06:06][   0 ms]*/ SET PROFILING = 0;
/*[20:06:06][   0 ms]*/ EXPLAIN SELECT a.NAME,p.title,s.NAME,p.price  FROM artist AS a INNER JOIN painting AS p INNER JOIN states AS s  ON a.a_id = p.a_id AND p.state = s.abbrev LIMIT 0, 1000;
/*[20:18:44][  47 ms]*/ SHOW FULL FIELDS FROM `cookbook`.`painting`;
/*[20:22:44][   0 ms]*/ USE `information_schema`;
/*[20:22:47][   0 ms]*/ USE `cookbook`;
/*[20:22:51][   0 ms]*/ SET PROFILING = 1;
/*[20:22:51][   0 ms]*/ SET profiling_history_size = 0;
/*[20:22:51][   0 ms]*/ SET profiling_history_size = 15;
/*[20:22:51][   0 ms]*/ SHOW STATUS;
/*[20:22:51][   0 ms]*/ SELECT a.NAME,p.title,s.NAME,p.price  FROM artist AS a INNER JOIN painting AS p INNER JOIN states AS s  ON a.a_id = p.a_id AND p.state = s.abbrev LIMIT 0, 1000;
/*[20:22:51][   0 ms]*/ SHOW STATUS;
/*[20:22:51][   0 ms]*/ SHOW PROFILES;
/*[20:22:51][   0 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 517 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[20:22:51][   0 ms]*/ SET PROFILING = 0;
/*[20:22:51][   0 ms]*/ EXPLAIN SELECT a.NAME,p.title,s.NAME,p.price  FROM artist AS a INNER JOIN painting AS p INNER JOIN states AS s  ON a.a_id = p.a_id AND p.state = s.abbrev LIMIT 0, 1000;
/*[20:22:52][   0 ms]*/ SET PROFILING = 1;
/*[20:22:52][   0 ms]*/ SET profiling_history_size = 0;
/*[20:22:52][   0 ms]*/ SET profiling_history_size = 15;
/*[20:22:52][  15 ms]*/ SHOW STATUS;
/*[20:22:52][   0 ms]*/ SELECT a.NAME,p.title,s.NAME,p.price  FROM artist AS a INNER JOIN painting AS p INNER JOIN states AS s  ON a.a_id = p.a_id AND p.state = s.abbrev LIMIT 0, 1000;
/*[20:22:52][   0 ms]*/ SHOW STATUS;
/*[20:22:52][   0 ms]*/ SHOW PROFILES;
/*[20:22:52][  16 ms]*/ SELECT state, ROUND(SUM(duration),5) AS `duration (summed) in sec` FROM information_schema.profiling WHERE query_id = 523 GROUP BY state ORDER BY `duration (summed) in sec` DESC;
/*[20:22:52][   0 ms]*/ SET PROFILING = 0;
/*[20:22:52][   0 ms]*/ EXPLAIN SELECT a.NAME,p.title,s.NAME,p.price  FROM artist AS a INNER JOIN painting AS p INNER JOIN states AS s  ON a.a_id = p.a_id AND p.state = s.abbrev LIMIT 0, 1000;
/*[20:23:32][   0 ms]*/ SHOW TABLE STATUS FROM `cookbook` WHERE ENGINE IS NOT NULL;
/*[20:23:32][  62 ms]*/ SELECT `TABLE_NAME` AS View_name,`View_definition`,`Check_option`,`Is_updatable`,`Definer`,`Security_type` FROM `INFORMATION_SCHEMA`.`VIEWS` WHERE `TABLE_SCHEMA` = 'cookbook';
/*[20:23:32][  15 ms]*/ SHOW PROCEDURE STATUS WHERE Db = 'cookbook';
/*[20:23:32][   0 ms]*/ SHOW FUNCTION STATUS WHERE Db='cookbook';
/*[20:23:32][   0 ms]*/ SHOW TRIGGERS FROM `cookbook`;
/*[20:23:32][   0 ms]*/ SELECT `Event_name`,`Definer`,`Event_type`,`Execute_at`,`Interval_value`,`Interval_field`,`Starts`,`Ends`,`Status` FROM `INFORMATION_SCHEMA`.`EVENTS` WHERE `EVENT_SCHEMA` = 'cookbook';
/*[20:23:32][   0 ms]*/ SHOW CREATE DATABASE `cookbook`;

~~~~~~~~

时间: 2024-10-28 09:11:03

今天一天学习的MYSQL语句,立此存照的相关文章

PHP中常用到的一些MySQL语句

在PHP开发中,经常会使用到MySQL语句,下面就为您列举了一些经常使用的MySQL语句,希望对您平时的学习和开发工作能起到些许的作用. MySQL语句显示数据库或表: show databases;//然后可以use database_name; show tables; MySQL语句更改表名: alter table table_name rename new_t; MySQL语句添加列 : alter table table_name add column c_n column attr

mysql-求一个Mysql语句 查询出当前周的数据按照天分组

问题描述 求一个Mysql语句 查询出当前周的数据按照天分组 SELECT DATE_FORMAT(uploadTime_beg%Y-%m-%d"") as time SUM(field01) as sumStatus1 SUM(field02) as sumStatus2 SUM(field03) as sumStatus3 SUM(field04) as sumStatus4 SUM(field05) as sumStatus5 FROM health_realdata WHERE

通过索引优化含ORDER BY的MySQL语句

通过索引优化含ORDER BY的MySQL语句 关于建立索引的几个准则: 1.合理的建立索引能够加速数据读取效率,不合理的建立索引反而会拖慢数据库的响应速度. 2.索引越多,更新数据的速度越慢. 3.尽量在采用MyIsam作为引擎的时候使用索引(因为MySQL以BTree存储索引),而不是InnoDB.但MyISAM不支持Transcation. 4.当你的程序和数据库结构/SQL语句已经优化到无法优化的程度,而程序瓶颈并不能顺利解决,那就是应该考虑使用诸如memcached这样的分布式缓存系统

mysql语句中使用like后面的%(百分号)的问题

  问题:mysql语句中使用like后面的%(百分号) 是不是越多执行效率越慢! 总用时:0.0489秒 0.0691 0.0485 0.0467 SELECT `goods_name`, `goods_img`, `sku_id`, `import` FROM `goods` WHERE `goods_name` LIKE '%iPhone%iPod%' AND `stime` < 1413877244 AND `etime` > 1413877244 ORDER BY `flag` DE

mysql使用什么函数来执行mysql语句

  mysql使用什么函数来执行mysql语句 定义和用法 mysql_query() 函数执行一条 MySQL 查询. 语法 mysql_query(query,connection)参数 描述 query 必需.规定要发送的 SQL 查询.注释:查询字符串不应以分号结束. connection 可选.规定 SQL 连接标识符.如果未规定,则使用上一个打开的连接. 说明 如果没有打开的连接,本函数会尝试无参数调用 mysql_connect() 函数来建立一个连接并使用之. 返回值 mysql

mysql-一条简单而又迷惑的MySql语句

问题描述 一条简单而又迷惑的MySql语句 有两个表person和ordersperson里存着顾客的名字name和身份证号id,orders里存着顾客的身份证号id.订单的oid和每笔订单所购的货物的清单list.如下person表 name id orders表id oid list SQL语句 select name(select count(*) from orders where orders.id=person.id) from person order by name;输出的结果正

mysql语句,去除字段首尾的“|”,替换字段中间的“|”为“,”。这个字段不是所有值要替换

问题描述 mysql语句,去除字段首尾的"|",替换字段中间的"|"为",".这个字段不是所有值要替换 表名是article 需要修改的字段为keywords , 将 "|魅力芜湖|文物保护|委员会|"改为"魅力芜湖,文物保护,委员会".然后keywords 这个字段 有些值本身就是 "国内,新闻"这种值,不需要改. 请问我该怎么写. 用 trim ?然后replace 具体怎么写我不知

mysql语句当天个人按成绩排名,要查询快,不消耗太多资源的。

问题描述 mysql语句当天个人按成绩排名,要查询快,不消耗太多资源的. ID UID NAME S O TIME 1 1001 p1 12 22 2015-1-21 2 1002 p2 13 32 2015-1-21 3 1001 p1 13 12 2015-1-22 4 1002 p2 11 32 2015-1-22 5 1001 p1 19 12 2015-1-23 6 1002 p2 11 13 2015-1-23 ....................................

oracle-求救求救 关于mysql语句

问题描述 求救求救 关于mysql语句 在oracle中有一个语句是to_char(), 那和这个对应的mysql语句是什么呢? 谁知道? 那个date_format 是转换日期的吧 我这个不是日期 只是类型转换 解决方案 求救!!求救,帮帮我求救 解决方案二: 解决掉了 不用回啦 ~~ 解决方案三: mysql的日期转换函数DATE_FORMA T(date, format) 根据格式串format 格式化日期或日期和时间值date,返回结果串. 你说的类型转换是什么意思?具体想怎么用呢?