Add pt-table-usage, copied and converted from mk-table-usage.

This commit is contained in:
Daniel Nichter
2012-03-30 16:45:10 -06:00
parent 4300f2908b
commit 34602e89fe
22 changed files with 9746 additions and 8 deletions

View File

@@ -0,0 +1,6 @@
Query_id: 0xDC115301537AEE70.1
SELECT ca.lmp_rt_5min
JOIN ca.interval_lmp_rt_5min
JOIN ca.lmp_rt_5min
WHERE ca.interval_lmp_rt_5min

View File

@@ -0,0 +1,26 @@
drop database if exists ca;
create database ca;
use ca;
CREATE TABLE `interval_lmp_rt_5min` (
`datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`avg` float DEFAULT NULL,
`median` float DEFAULT NULL,
`reference` float DEFAULT NULL,
`interpolated` tinyint(3) unsigned DEFAULT '0',
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`datetime`),
KEY `interval_lmp_rt_5min_timestamp_idx` (`timestamp`)
) ENGINE=InnoDB;
CREATE TABLE `lmp_rt_5min` (
`datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`handle_node_lmp` mediumint(8) unsigned NOT NULL DEFAULT '0',
`lmp` float DEFAULT NULL,
`congestion` float DEFAULT NULL,
`loss` float DEFAULT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`interpolated` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`datetime`,`handle_node_lmp`),
KEY `lmp_rt_5min_handle_node_lmp_idxfk` (`handle_node_lmp`),
KEY `lmp_rt_5min_timestamp_idx` (`timestamp`)
) ENGINE=InnoDB;

View File

@@ -0,0 +1,24 @@
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 1
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
select * from t;
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 2
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
select * from t1, t2 as x, t3 y, z;
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 3
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
insert into t values (1, 2, 3);
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 4
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
delete from t where id < 1000;
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 5
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
select * from a as t1, b as t2 where t1.id=t2.id;
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 6
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
replace into t set foo='bar';

View File

@@ -0,0 +1,20 @@
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 1
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
UPDATE t1 AS a JOIN t2 AS b USING (id) SET a.foo="bar" WHERE b.foo IS NOT NULL;
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 2
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
UPDATE t1 AS a JOIN t2 AS b USING (id) SET a.foo="bar", b.foo="bat" WHERE a.id=1;
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 3
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
UPDATE t1 INNER JOIN t2 USING (id) SET t1.foo="bar" WHERE t2.id=1;
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 4
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
insert into t1 (a, b, c) select x, y, z from t2 where x is not null;
# Time: 071218 11:48:27
# Thread_id: 10 Query_id: 5
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
insert into t (a, b, c) select a.x, a.y, b.z from a, b where a.id=b.id;

View File

@@ -0,0 +1,3 @@
# Time: 110422 11:28:00
# Query_time: 0.000300 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 1
select country.country, city.city from city join country using (country_id) where country = 'Brazil' and city like 'A%' limit 1;

View File

@@ -0,0 +1,4 @@
Query_id: 0x1E0BF7001F0D58BB.1
SELECT sakila.city
WHERE sakila.city

View File

@@ -0,0 +1,5 @@
Query_id: 0x9840C99F532C2E3F.1
CREATE temp.5
SELECT t
WHERE t

View File

@@ -0,0 +1,3 @@
Query_id: 0xAED187CD505CBD92.1
DROP_TABLE t

View File

@@ -0,0 +1,6 @@
Query_id: 0xF318E3D2483D370E.1
SELECT temp.temp6
JOIN temp.temp6
JOIN n.type
WHERE n.type

View File

@@ -0,0 +1,5 @@
Query_id: 0xF573BD7AD8CDDD7D.1
JOIN d1.t1
JOIN d2.t2
JOIN d3.t3

View File

@@ -0,0 +1,31 @@
Query_id: 0xF28708D8F2920792.1
SELECT t
Query_id: 0x09CB59D3450EF6E8.1
SELECT t1
SELECT t2
SELECT t3
SELECT z
TLIST t1
TLIST t2
TLIST t3
TLIST z
Query_id: 0xCF687AF9F2D5E248.1
INSERT t
SELECT DUAL
Query_id: 0xF1FBC364588DC469.1
DELETE t
WHERE t
Query_id: 0x8745D03011B0E1CE.1
SELECT a
SELECT b
JOIN a
JOIN b
Query_id: 0xEB871CD2B5729EA1.1
REPLACE t
SELECT DUAL

View File

@@ -0,0 +1,40 @@
Query_id: 0x6B1671EA6890F103.1
UPDATE t1
SELECT DUAL
JOIN t1
JOIN t2
WHERE t2
Query_id: 0x1CD27577D202A339.1
UPDATE t1
SELECT DUAL
JOIN t1
JOIN t2
WHERE t1
Query_id: 0x1CD27577D202A339.2
UPDATE t2
SELECT DUAL
JOIN t1
JOIN t2
WHERE t1
Query_id: 0xF4BEDD52BF14F91B.1
UPDATE t1
SELECT DUAL
JOIN t1
JOIN t2
WHERE t2
Query_id: 0x1E62B5AB0DD828BF.1
INSERT t1
SELECT t2
WHERE t2
Query_id: 0xE25F88EDB02EA4A3.1
INSERT t
SELECT a
SELECT b
JOIN a
JOIN b

View File

@@ -0,0 +1,6 @@
Query_id: 0x7C6C08E1FA6D7E73.1
SELECT country
SELECT city
JOIN city
JOIN country

View File

@@ -0,0 +1,8 @@
Query_id: 0x7C6C08E1FA6D7E73.1
SELECT sakila.country
SELECT sakila.city
JOIN sakila.city
JOIN sakila.country
WHERE sakila.city
WHERE sakila.country

View File

@@ -0,0 +1,6 @@
Query_id: 110422 11:28:00.1
SELECT country
SELECT city
JOIN city
JOIN country