Queries on this page
Array
(
[DROP DATABASE test_db_explain] => 1
[CREATE DATABASE test_db_explain] => 1
[CREATE TABLE events (id INT UNSIGNED DEFAULT 0 NOT NULL, name VARCHAR(255) DEFAULT NULL, datetime DATETIME DEFAULT NULL)] => 1
[ALTER TABLE events ADD PRIMARY KEY (id)] => 1
[INSERT INTO events_seq (sequence) VALUES (NULL)] => 2
[CREATE TABLE events_seq (sequence INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (sequence))] => 1
[SELECT LAST_INSERT_ID()] => 1
[DELETE FROM events_seq WHERE sequence < 1] => 1
[INSERT INTO events (id, name, datetime) VALUES (?, ?, ?)] => 1
[PREPARE MDB2_STATEMENT_mysql_9085129b66d00d18efddbf86e5c29f02 FROM 'INSERT INTO events (id, name, datetime) VALUES (?, ?, ?)'] => 2
[SET @0 = 1] => 1
[SET @1 = 'Breakfast a Tiffany\'s'] => 1
[SET @2 = '2007-01-15 00:00:00'] => 1
[EXECUTE MDB2_STATEMENT_mysql_9085129b66d00d18efddbf86e5c29f02 USING @0, @1, @2] => 1
[DEALLOCATE PREPARE MDB2_STATEMENT_mysql_9085129b66d00d18efddbf86e5c29f02] => 1
[SELECT * FROM `events` WHERE `datetime` > '1980-12-31 00:00:00' AND `datetime` < '2020-12-31 00:00:00'] => 1
[INSERT INTO events VALUES(2, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(3, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(4, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(5, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(6, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(7, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(8, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(9, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(10, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(11, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(12, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(13, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(14, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(15, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(16, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(17, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(18, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(19, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(20, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(21, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(22, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(23, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(24, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(25, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(26, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(27, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(28, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(29, "test event", "2005-05-05 00:00:00")] => 1
[INSERT INTO events VALUES(30, "test event", "2005-05-05 00:00:00")] => 1
[SELECT DISTINCT datetime FROM events] => 1
[SELECT * FROM events WHERE id IN (SELECT id FROM events WHERE id > 1)] => 1
)
EXPLAIN-ed SELECTs
Array
(
[SELECT LAST_INSERT_ID()] => Array
(
[explain] => Array
(
[0] => Array
(
[id] => 1
[select_type] => SIMPLE
[table] =>
[type] =>
[possible_keys] =>
[key] =>
[key_len] =>
[ref] =>
[rows] =>
[extra] => No tables used
)
)
[warnings] => Array
(
[0] => Array
(
[level] => Note
[code] => 1003
[message] => select sql_no_cache last_insert_id() AS `LAST_INSERT_ID()`
)
)
[time] => 0.000406980514526
)
[SELECT * FROM `events` WHERE `datetime` > '1980-12-31 00:00:00' AND `datetime` < '2020-12-31 00:00:00'] => Array
(
[explain] => Array
(
[0] => Array
(
[id] => 1
[select_type] => SIMPLE
[table] => events
[type] => ALL
[possible_keys] =>
[key] =>
[key_len] =>
[ref] =>
[rows] => 30
[extra] => Using where
)
)
[warnings] => Array
(
[0] => Array
(
[level] => Note
[code] => 1003
[message] => select test_db_explain.events.id AS `id`,test_db_explain.events.name AS `name`,test_db_explain.events.datetime AS `datetime` from test_db_explain.events where ((test_db_explain.events.datetime > 19801231000000) and (test_db_explain.events.datetime < 20201231000000))
)
)
[time] => 0.000553131103516
)
[SELECT DISTINCT datetime FROM events] => Array
(
[explain] => Array
(
[0] => Array
(
[id] => 1
[select_type] => SIMPLE
[table] => events
[type] => ALL
[possible_keys] =>
[key] =>
[key_len] =>
[ref] =>
[rows] => 30
[extra] => Using temporary
)
)
[warnings] => Array
(
[0] => Array
(
[level] => Note
[code] => 1003
[message] => select distinct test_db_explain.events.datetime AS `datetime` from test_db_explain.events
)
)
[time] => 0.000473022460938
)
[SELECT * FROM events WHERE id IN (SELECT id FROM events WHERE id > 1)] => Array
(
[explain] => Array
(
[0] => Array
(
[id] => 1
[select_type] => PRIMARY
[table] => events
[type] => ALL
[possible_keys] =>
[key] =>
[key_len] =>
[ref] =>
[rows] => 30
[extra] => Using where
)
[1] => Array
(
[id] => 2
[select_type] => DEPENDENT SUBQUERY
[table] => events
[type] => unique_subquery
[possible_keys] => PRIMARY
[key] => PRIMARY
[key_len] => 4
[ref] => func
[rows] => 1
[extra] => Using index; Using where
)
)
[warnings] => Array
(
[0] => Array
(
[level] => Note
[code] => 1003
[message] => select test_db_explain.events.id AS `id`,test_db_explain.events.name AS `name`,test_db_explain.events.datetime AS `datetime` from test_db_explain.events where (test_db_explain.events.id,(((test_db_explain.events.id) in events on PRIMARY where (test_db_explain.events.id > 1))))
)
)
[time] => 0.000664949417114
)
)