Re: Server 8.0 is extremaly slow
+-------------+---------------+------------+--------------------------+---------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
---------------------------------------------------------+
| schema_name | total_latency | exec_count | total_latency/exec_count | query_sa
mple_text
|
+-------------+---------------+------------+--------------------------+---------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
---------------------------------------------------------+
| sakila | 4765726259250 | 1 | 4765726259250.0000 | -- After
MySQL 5.6.10, InnoDB supports fulltext indexes
/*!50610 ALTER TABLE film_text engine=InnoDB */
|
| sakila | 8805690762450 | 2 | 4402845381225.0000 | INSERT I
NTO rental VALUES (1,'2005-05-24 22:53:30',367,130,'2005-05-26 22:04:30',1,'2006
-02-15 21:30:53'),
(2,'2005-05-24 22:54:33',1525,459,'2005-05-28 19:40:33',1,'2006-02-15 21:30:53')
,
(3,'2005-05-24 23:03:39',1711,408,'2005-06-01 22:12:39',1,'2006-02-15 21:30:53')
,
(4,'2005-05-24 23:04:41',2452,333,'2005-06-03 01:43:41',2,'2006-02-15 21:30:53')
,
(5,'2005-05-24 23:05:21',2079,222,'2005-06-02 04:33:21',1,'2006-02-15 21:30:53')
,
(6,'2005-05-24 23:08:07',2792,549,'2005-05-27 01:32:07',1,'2006-02-15 21:30:53')
,
(7,'2005-05-24 23:11:53',3995,269,'2005-05-29 20:34:53',2,'2006-02-15 21:30:53')
,
(8,'2005-05-24 23:31:46',2346,239,'2005-05-27 23:33:46',2,'2006-02-15 21:30:53')
,
(9,'2005-05-25 00:00:40',2580,126,'2005-05-28 00:22:40',1,'2006-02-15 21:30:53')
,
(10,'2005-05-25 00:02:21',1824,399,'2005-05-31 22:44:21',2,'2006-02-15 21:30:53'
),
(11,'2005-05-25 00:09:02',4443,142,'2005-06-02 20:56:02',2,'2006-02-15 21:30:53'
),
(12,'2005-05-25 00:19:27',1584,261,'2005-05-30 05:44:27',2,'2006-02-15 21:30:53'
)... |
| sakila | 8043865009500 | 2 | 4021932504750.0000 | INSERT I
NTO payment VALUES (1,1,1,76,'2.99','2005-05-25 11:30:37','2006-02-15 22:12:30')
,
(2,1,1,573,'0.99','2005-05-28 10:35:23','2006-02-15 22:12:30'),
(3,1,1,1185,'5.99','2005-06-15 00:54:12','2006-02-15 22:12:30'),
(4,1,2,1422,'0.99','2005-06-15 18:02:53','2006-02-15 22:12:30'),
(5,1,2,1476,'9.99','2005-06-15 21:08:46','2006-02-15 22:12:30'),
(6,1,1,1725,'4.99','2005-06-16 15:18:57','2006-02-15 22:12:30'),
(7,1,1,2308,'4.99','2005-06-18 08:41:48','2006-02-15 22:12:30'),
(8,1,2,2363,'0.99','2005-06-18 13:33:59','2006-02-15 22:12:30'),
(9,1,1,3284,'3.99','2005-06-21 06:24:45','2006-02-15 22:12:30'),
(10,1,2,4526,'5.99','2005-07-08 03:17:05','2006-02-15 22:12:30'),
(11,1,1,4611,'5.99','2005-07-08 07:33:56','2006-02-15 22:12:30'),
(12,1,1,5244,'4.99','2005-07-09 13:24:07','2006-02-15 22:12:30'),
(13,1,1,5326,'4.99','2005-07-09 16:38:01','2006-02-15 22:12:30'),
(14,1,1,6163,'7.99','2005-07-11 10:13:46','2006-02-15 22:12:30'),
(15,1,2,7273,'2.99','2005-07-27 11:31:22','2006-02-15 22:12:30'),
(... |
| sakila | 3758823859650 | 1 | 3758823859650.0000 | --
-- Table structure for table `inventory`
--
CREATE TABLE inventory (
inventory_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
film_id SMALLINT UNSIGNED NOT NULL,
store_id TINYINT UNSIGNED NOT NULL,
last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIM
ESTAMP,
PRIMARY KEY (inventory_id),
KEY idx_fk_film_id (film_id),
KEY idx_store_id_film_id (store_id,film_id),
CONSTRAINT fk_inventory_store FOREIGN KEY (store_id) REFERENCES store (store_i
d) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT fk_inventory_film FOREIGN KEY (film_id) REFERENCES film (film_id) O
N DELETE RESTRICT ON UPDATE CASCADE
)ENGINE=InnoDB DEFAULT CHARSET=utf8
|
| sakila | 1626665830800 | 1 | 1626665830800.0000 | --
-- Table structure for table `payment`
--
CREATE TABLE payment (
payment_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
customer_id SMALLINT UNSIGNED NOT NULL,
staff_id TINYINT UNSIGNED NOT NULL,
rental_id INT DEFAULT NULL,
amount DECIMAL(5,2) NOT NULL,
payment_date DATETIME NOT NULL,
last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (payment_id),
KEY idx_fk_staff_id (staff_id),
KEY idx_fk_customer_id (customer_id),
CONSTRAINT fk_payment_rental FOREIGN KEY (rental_id) REFERENCES rental (rental
_id) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT fk_payment_customer FOREIGN KEY (customer_id) REFERENCES customer (
customer_id) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT fk_payment_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id)
ON DELETE RESTRICT ON UPDATE CASCADE
)ENGINE=InnoDB DEFAULT CHARSET=utf8
|
| sakila | 1549768370850 | 1 | 1549768370850.0000 | --
-- Table structure for table `rental`
--
CREATE TABLE rental (
rental_id INT NOT NULL AUTO_INCREMENT,
rental_date DATETIME NOT NULL,
inventory_id MEDIUMINT UNSIGNED NOT NULL,
customer_id SMALLINT UNSIGNED NOT NULL,
return_date DATETIME DEFAULT NULL,
staff_id TINYINT UNSIGNED NOT NULL,
last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIM
ESTAMP,
PRIMARY KEY (rental_id),
UNIQUE KEY (rental_date,inventory_id,customer_id),
KEY idx_fk_inventory_id (inventory_id),
KEY idx_fk_customer_id (customer_id),
KEY idx_fk_staff_id (staff_id),
CONSTRAINT fk_rental_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id)
ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT fk_rental_inventory FOREIGN KEY (inventory_id) REFERENCES inventory
(inventory_id) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT fk_rental_customer FOREIGN KEY (customer_id) REFERENCES customer (c
ustomer_id) ON DELETE RESTRICT ON UPDATE CASCADE
)ENGINE=InnoDB DEFAULT CHARSET=utf8 |
| sakila | 1395416772750 | 1 | 1395416772750.0000 | INSERT I
NTO film VALUES (1,'ACADEMY DINOSAUR','A Epic Drama of a Feminist And a Mad Scie
ntist who must Battle a Teacher in The Canadian Rockies',2006,1,NULL,6,'0.99',86
,'20.99','PG','Deleted Scenes,Behind the Scenes','2006-02-15 05:03:42'),
(2,'ACE GOLDFINGER','A Astounding Epistle of a Database Administrator And a Expl
orer who must Find a Car in Ancient China',2006,1,NULL,3,'4.99',48,'12.99','G','
Trailers,Deleted Scenes','2006-02-15 05:03:42'),
(3,'ADAPTATION HOLES','A Astounding Reflection of a Lumberjack And a Car who mus
t Sink a Lumberjack in A Baloon Factory',2006,1,NULL,7,'2.99',50,'18.99','NC-17'
,'Trailers,Deleted Scenes','2006-02-15 05:03:42'),
(4,'AFFAIR PREJUDICE','A Fanciful Documentary of a Frisbee And a Lumberjack who
must Chase a Monkey in A Shark Tank',2006,1,NULL,5,'2.99',117,'26.99','G','Comme
ntaries,Behind the Scenes','2006-02-15 05:03:42'),
(5,'AFRICAN EGG','A Fast-Paced Documentary of a Pastry Chef And a Dentist who mu
st Pursue a Forensic Psychologist in The Gulf of Mexico',2006,1,N... |
+-------------+---------------+------------+--------------------------+---------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
---------------------------------------------------------+
7 rows in set (0.05 sec)