################### Environment System Summary Report ###################### Date | 2023-10-26 08:38:37 UTC (local TZ: CEST +0200) Hostname | support-cluster03 Uptime | 643 days, 15:07, 3 users, load average: 0.08, 0.02, 0.00 Platform | Linux Release | Red Hat Enterprise Linux Server release 7.9 (Maipo) Kernel | 5.4.17-2102.206.1.el7uek.x86_64 Architecture | CPU = 64-bit, OS = 64-bit Threading | NPTL 2.17 Compiler | GNU CC version 4.8.5 20150623 (Red Hat 4.8.5-44.0.3). SELinux | Disabled Virtualized | VMWare # Processor ################################################## Processors | physical = 1, cores = 8, virtual = 16, hyperthreading = yes Speeds | 16x2445.406 Models | 16xAMD EPYC 7J13 64-Core Processor Caches | 16x512 KB # Memory ##################################################### Total | 117.4G Free | 805.2M Used | physical = 1.7G, swap allocated = 8.0G, swap used = 1.6G, virtual = 3.3G Shared | 6.5G Buffers | 114.9G Caches | 108.1G Dirty | 255080 kB UsedRSS | 1.4G Swappiness | 60 DirtyPolicy | 20, 10 DirtyStatus | 0, 0 -- uname -an Linux support-cluster03 5.4.17-2102.206.1.el7uek.x86_64 #2 SMP Wed Oct 6 16:40:40 PDT 2021 x86_64 x86_64 x86_64 GNU/Linux -- cat /etc/*release Oracle Linux Server release 7.9 NAME="Oracle Linux Server" VERSION="7.9" ID="ol" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.9" PRETTY_NAME="Oracle Linux Server 7.9" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:oracle:linux:7:9:server" HOME_URL="https://linux.oracle.com/" BUG_REPORT_URL="https://bugzilla.oracle.com/" ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7" ORACLE_BUGZILLA_PRODUCT_VERSION=7.9 ORACLE_SUPPORT_PRODUCT="Oracle Linux" ORACLE_SUPPORT_PRODUCT_VERSION=7.9 Red Hat Enterprise Linux Server release 7.9 (Maipo) Oracle Linux Server release 7.9 -- df -Th /export/home/tmp/ushastry Filesystem Type Size Used Avail Use% Mounted on /dev/sdb1 xfs 2.0T 1.3T 713G 65% /export/home *** Note - Binary tarball builds pulled from internal reposiroty mounted on all support boxes ####################################### 5.7 ####################################### -- Conf file provided by reporter rm -rf 112824/ bin/mysqld --defaults-file=./my.cnf --initialize-insecure --basedir=$PWD --datadir=$PWD/112824 --log-error-verbosity=3 bin/mysqld_safe --defaults-file=./my.cnf --basedir=$PWD --datadir=$PWD/112824 --core-file --socket=/tmp/mysql.sock --port=3306 --log-error=$PWD/112824/log.err --log-error-verbosity=3 --secure-file-priv="" --local-infile=1 2>&1 & bin/mysql -uroot -S /tmp/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.44-log MySQL Community Server (GPL) Copyright (c) 2000, 2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE DATABASE test; Query OK, 1 row affected (0.00 sec) mysql> use test; Database changed mysql> mysql> CREATE TABLE `T1` ( -> `a` bigint(20) NOT NULL AUTO_INCREMENT, -> `b` varchar(50) DEFAULT NULL, -> `c` datetime NOT NULL, -> `d` json DEFAULT NULL, -> `e` json DEFAULT NULL, -> `f` varchar(15) DEFAULT NULL, -> `g` varchar(50) DEFAULT NULL, -> `h` varchar(10) DEFAULT NULL, -> PRIMARY KEY (`a`), -> KEY `IDX_b` (`b`), -> KEY `IX_c` (`c`) -> ) ENGINE=InnoDB ; Query OK, 0 rows affected (0.02 sec) mysql> DROP PROCEDURE IF EXISTS InsertData2; DELIMITER // CREATE PROCEDURE InsertData2(IN N INT, IN M BIGINT) BEGIN DECLARE i BIGINT DEFAULT M; WHILE i < M + N DO INSERT INTO T1 (b,c,d,e,f,g,h) VALUES ( RPAD('a', 50, 'a'), NOW(), CONCAT('{"key1":"', RPAD('a', 250, 'a'), '","key2":"', RPAD('a', 250, 'a'), '"}'), CONCAT('{"key1":"', RPAD('a', 750, 'a'), '","key2":"', RPAD('a', 750, 'a'), '"}'), RPAD('a', 15, 'a'), RPAD('a', 50, 'a'), 'Active' ); Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> DELIMITER // mysql> CREATE PROCEDURE InsertData2(IN N INT, IN M BIGINT) -> BEGIN -> DECLARE i BIGINT DEFAULT M; -> -> WHILE i < M + N DO -> INSERT INTO T1 (b,c,d,e,f,g,h) VALUES ( -> RPAD('a', 50, 'a'), -> NOW(), -> CONCAT('{"key1":"', RPAD('a', 250, 'a'), '","key2":"', RPAD('a', 250, 'a'), '"}'), -> CONCAT('{"key1":"', RPAD('a', 750, 'a'), '","key2":"', RPAD('a', 750, 'a'), '"}'), -> RPAD('a', 15, 'a'), -> RPAD('a', 50, 'a'), -> 'Active' -> ); -> -> SET i = i + 1; -> END WHILE; -> END // Query OK, 0 rows affected (0.00 sec) mysql> DELIMITER ; mysql> mysql> DROP PROCEDURE IF EXISTS InsertData3; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> DELIMITER // mysql> CREATE PROCEDURE InsertData3(IN N INT) -> BEGIN -> DECLARE i INT DEFAULT 0; -> -> WHILE i < N DO -> INSERT INTO T1(b,c,d,e,f,g,h) SELECT b,NOW(),d,e,f,g,h FROM T1 LIMIT 100000; -> SELECT i, count(*) from T1; -> SET i = i + 1; -> END WHILE; -> END // Query OK, 0 rows affected (0.00 sec) mysql> DELIMITER ; mysql> mysql> -- initial data insert mysql> CALL InsertData2(9, 0); Query OK, 1 row affected (0.02 sec) mysql> -- for 100k records insert mysql> CALL InsertData3(13); +------+----------+ | i | count(*) | +------+----------+ | 0 | 18 | +------+----------+ 1 row in set (0.00 sec) +------+----------+ | i | count(*) | +------+----------+ | 1 | 36 | +------+----------+ 1 row in set (0.01 sec) +------+----------+ | i | count(*) | +------+----------+ | 2 | 72 | +------+----------+ 1 row in set (0.03 sec) +------+----------+ | i | count(*) | +------+----------+ | 3 | 144 | +------+----------+ 1 row in set (0.05 sec) +------+----------+ | i | count(*) | +------+----------+ | 4 | 288 | +------+----------+ 1 row in set (0.11 sec) +------+----------+ | i | count(*) | +------+----------+ | 5 | 576 | +------+----------+ 1 row in set (0.12 sec) +------+----------+ | i | count(*) | +------+----------+ | 6 | 1152 | +------+----------+ 1 row in set (0.15 sec) +------+----------+ | i | count(*) | +------+----------+ | 7 | 2304 | +------+----------+ 1 row in set (0.20 sec) +------+----------+ | i | count(*) | +------+----------+ | 8 | 4608 | +------+----------+ 1 row in set (0.31 sec) +------+----------+ | i | count(*) | +------+----------+ | 9 | 9216 | +------+----------+ 1 row in set (0.51 sec) +------+----------+ | i | count(*) | +------+----------+ | 10 | 18432 | +------+----------+ 1 row in set (0.82 sec) +------+----------+ | i | count(*) | +------+----------+ | 11 | 36864 | +------+----------+ 1 row in set (1.57 sec) +------+----------+ | i | count(*) | +------+----------+ | 12 | 73728 | +------+----------+ 1 row in set (4.68 sec) Query OK, 0 rows affected (4.68 sec) mysql> INSERT INTO T1(b,c,d,e,f,g,h) SELECT b,NOW(),d,e,f,g,h FROM T1 LIMIT 26272; Query OK, 26272 rows affected (1.12 sec) Records: 26272 Duplicates: 0 Warnings: 0 mysql> -- for 900k records insert to complete 1 million record mysql> CALL InsertData3(9); +------+----------+ | i | count(*) | +------+----------+ | 0 | 200000 | +------+----------+ 1 row in set (5.73 sec) +------+----------+ | i | count(*) | +------+----------+ | 1 | 300000 | +------+----------+ 1 row in set (14.79 sec) +------+----------+ | i | count(*) | +------+----------+ | 2 | 400000 | +------+----------+ 1 row in set (19.58 sec) +------+----------+ | i | count(*) | +------+----------+ | 3 | 500000 | +------+----------+ 1 row in set (24.50 sec) +------+----------+ | i | count(*) | +------+----------+ | 4 | 600000 | +------+----------+ 1 row in set (33.92 sec) +------+----------+ | i | count(*) | +------+----------+ | 5 | 700000 | +------+----------+ 1 row in set (38.81 sec) +------+----------+ | i | count(*) | +------+----------+ | 6 | 800000 | +------+----------+ 1 row in set (44.66 sec) +------+----------+ | i | count(*) | +------+----------+ | 7 | 900000 | +------+----------+ 1 row in set (49.42 sec) +------+----------+ | i | count(*) | +------+----------+ | 8 | 1000000 | +------+----------+ 1 row in set (54.37 sec) Query OK, 0 rows affected (54.37 sec) mysql> SELECT @@version, @@version_comment; +------------+------------------------------+ | @@version | @@version_comment | +------------+------------------------------+ | 5.7.44-log | MySQL Community Server (GPL) | +------------+------------------------------+ 1 row in set (0.00 sec) mysql> SET PROFILING = ON; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> SELECT COUNT(*) FROM T1 WHERE c > 0; +----------+ | COUNT(*) | +----------+ | 1000000 | +----------+ 1 row in set (0.17 sec) mysql> SELECT COUNT(*) FROM T1; +----------+ | COUNT(*) | +----------+ | 1000000 | +----------+ 1 row in set (0.11 sec) mysql> SHOW PROFILES; +----------+------------+-------------------------------------+ | Query_ID | Duration | Query | +----------+------------+-------------------------------------+ | 1 | 0.16949825 | SELECT COUNT(*) FROM T1 WHERE c > 0 | | 2 | 0.10194300 | SELECT COUNT(*) FROM T1 | +----------+------------+-------------------------------------+ 2 rows in set, 1 warning (0.00 sec) mysql> EXPLAIN SELECT COUNT(*) FROM T1 WHERE c > 0; +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+--------------------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+--------------------------+ | 1 | SIMPLE | T1 | NULL | range | IX_c | IX_c | 5 | NULL | 416670 | 100.00 | Using where; Using index | +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+--------------------------+ 1 row in set, 1 warning (0.00 sec) mysql> EXPLAIN SELECT COUNT(*) FROM T1; +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+-------------+ | 1 | SIMPLE | T1 | NULL | index | NULL | IX_c | 5 | NULL | 833340 | 100.00 | Using index | +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+-------------+ 1 row in set, 1 warning (0.00 sec) mysql> SELECT database_name, table_name, index_name, SUM(stat_value) pages, -> SUM(stat_value)*@@innodb_page_size/(1024*1024) size_MB -> FROM mysql.innodb_index_stats -> WHERE stat_name = 'size' -> AND database_name = 'test' -> GROUP BY database_name, table_name, index_name; +---------------+------------+------------+--------+-----------+ | database_name | table_name | index_name | pages | size_MB | +---------------+------------+------------+--------+-----------+ | test | T1 | IDX_b | 4083 | 63.7969 | | test | T1 | IX_c | 1188 | 18.5625 | | test | T1 | PRIMARY | 166912 | 2608.0000 | +---------------+------------+------------+--------+-----------+ 3 rows in set (0.00 sec) ####################################### 8.0 ####################################### -- Conf file provided by reporter rm -rf 112824/ bin/mysqld --defaults-file=./my.cnf --initialize-insecure --basedir=$PWD --datadir=$PWD/112824 --log-error-verbosity=3 bin/mysqld_safe --defaults-file=./my.cnf --mysqld-version='' --basedir=$PWD --datadir=$PWD/112824 --core-file --socket=/tmp/mysql.sock --port=3306 --log-error=$PWD/112824/log.err --mysqlx-port=33330 --mysqlx-socket=/tmp/mysql_x_ushastry.sock --log-error-verbosity=3 --secure-file-priv="" --local-infile=1 2>&1 & bin/mysql -uroot -S /tmp/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.35 MySQL Community Server - GPL Copyright (c) 2000, 2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE DATABASE test; Query OK, 1 row affected (0.00 sec) mysql> use test; Database changed mysql> mysql> CREATE TABLE `T1` ( -> `a` bigint(20) NOT NULL AUTO_INCREMENT, -> `b` varchar(50) DEFAULT NULL, -> `c` datetime NOT NULL, -> `d` json DEFAULT NULL, -> `e` json DEFAULT NULL, -> `f` varchar(15) DEFAULT NULL, -> `g` varchar(50) DEFAULT NULL, -> `h` varchar(10) DEFAULT NULL, -> PRIMARY KEY (`a`), -> KEY `IDX_b` (`b`), -> KEY `IX_c` (`c`) -> ) ENGINE=InnoDB ; Query OK, 0 rows affected, 1 warning (0.03 sec) mysql> show warnings; +---------+------+------------------------------------------------------------------------------+ | Level | Code | Message | +---------+------+------------------------------------------------------------------------------+ | Warning | 1681 | Integer display width is deprecated and will be removed in a future release. | +---------+------+------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> DROP PROCEDURE IF EXISTS InsertData2; DELIMITER // CREATE PROCEDURE InsertData2(IN N INT, IN M BIGINT) BEGIN DECLARE i BIGINT DEFAULT M; WHILE i < M + N DO INSERT INTO T1 (b,c,d,e,f,g,h) VALUES ( RPAD('a', 50, 'a'), NOW(), CONCAT('{"key1":"', RPAD('a', 250, 'a'), '","key2":"', RPAD('a', 250, 'a'), '"}'), CONCAT('{"key1":"', RPAD('a', 750, 'a'), '","key2":"', RPAD('a', 750, 'a'), '"}'), RPAD('a', 15, 'a'), RPAD('a', 50, 'a'), 'Active' ); Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> DELIMITER // mysql> CREATE PROCEDURE InsertData2(IN N INT, IN M BIGINT) -> BEGIN -> DECLARE i BIGINT DEFAULT M; -> -> WHILE i < M + N DO -> INSERT INTO T1 (b,c,d,e,f,g,h) VALUES ( -> RPAD('a', 50, 'a'), -> NOW(), -> CONCAT('{"key1":"', RPAD('a', 250, 'a'), '","key2":"', RPAD('a', 250, 'a'), '"}'), -> CONCAT('{"key1":"', RPAD('a', 750, 'a'), '","key2":"', RPAD('a', 750, 'a'), '"}'), -> RPAD('a', 15, 'a'), -> RPAD('a', 50, 'a'), -> 'Active' -> ); -> -> SET i = i + 1; -> END WHILE; -> END // Query OK, 0 rows affected (0.00 sec) mysql> DELIMITER ; mysql> mysql> DROP PROCEDURE IF EXISTS InsertData3; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> DELIMITER // mysql> CREATE PROCEDURE InsertData3(IN N INT) -> BEGIN -> DECLARE i INT DEFAULT 0; -> -> WHILE i < N DO -> INSERT INTO T1(b,c,d,e,f,g,h) SELECT b,NOW(),d,e,f,g,h FROM T1 LIMIT 100000; -> SELECT i, count(*) from T1; -> SET i = i + 1; -> END WHILE; -> END // Query OK, 0 rows affected (0.01 sec) mysql> DELIMITER ; mysql> mysql> -- initial data insert mysql> CALL InsertData2(9, 0); Query OK, 1 row affected (0.04 sec) mysql> -- for 100k records insert mysql> CALL InsertData3(13); +------+----------+ | i | count(*) | +------+----------+ | 0 | 18 | +------+----------+ 1 row in set (0.00 sec) +------+----------+ | i | count(*) | +------+----------+ | 1 | 36 | +------+----------+ 1 row in set (0.02 sec) +------+----------+ | i | count(*) | +------+----------+ | 2 | 72 | +------+----------+ 1 row in set (0.03 sec) +------+----------+ | i | count(*) | +------+----------+ | 3 | 144 | +------+----------+ 1 row in set (0.06 sec) +------+----------+ | i | count(*) | +------+----------+ | 4 | 288 | +------+----------+ 1 row in set (0.13 sec) +------+----------+ | i | count(*) | +------+----------+ | 5 | 576 | +------+----------+ 1 row in set (0.14 sec) +------+----------+ | i | count(*) | +------+----------+ | 6 | 1152 | +------+----------+ 1 row in set (0.18 sec) +------+----------+ | i | count(*) | +------+----------+ | 7 | 2304 | +------+----------+ 1 row in set (0.24 sec) +------+----------+ | i | count(*) | +------+----------+ | 8 | 4608 | +------+----------+ 1 row in set (0.36 sec) +------+----------+ | i | count(*) | +------+----------+ | 9 | 9216 | +------+----------+ 1 row in set (0.56 sec) +------+----------+ | i | count(*) | +------+----------+ | 10 | 18432 | +------+----------+ 1 row in set (0.91 sec) +------+----------+ | i | count(*) | +------+----------+ | 11 | 36864 | +------+----------+ 1 row in set (2.25 sec) +------+----------+ | i | count(*) | +------+----------+ | 12 | 73728 | +------+----------+ 1 row in set (8.23 sec) Query OK, 0 rows affected (8.23 sec) mysql> INSERT INTO T1(b,c,d,e,f,g,h) SELECT b,NOW(),d,e,f,g,h FROM T1 LIMIT 26272; Query OK, 26272 rows affected (3.69 sec) Records: 26272 Duplicates: 0 Warnings: 0 mysql> -- for 900k records insert to complete 1 million record mysql> CALL InsertData3(9); +------+----------+ | i | count(*) | +------+----------+ | 0 | 200000 | +------+----------+ 1 row in set (13.02 sec) +------+----------+ | i | count(*) | +------+----------+ | 1 | 300000 | +------+----------+ 1 row in set (25.96 sec) +------+----------+ | i | count(*) | +------+----------+ | 2 | 400000 | +------+----------+ 1 row in set (37.85 sec) +------+----------+ | i | count(*) | +------+----------+ | 3 | 500000 | +------+----------+ 1 row in set (49.80 sec) +------+----------+ | i | count(*) | +------+----------+ | 4 | 600000 | +------+----------+ 1 row in set (1 min 2.12 sec) +------+----------+ | i | count(*) | +------+----------+ | 5 | 700000 | +------+----------+ 1 row in set (1 min 13.31 sec) +------+----------+ | i | count(*) | +------+----------+ | 6 | 800000 | +------+----------+ 1 row in set (1 min 24.99 sec) +------+----------+ | i | count(*) | +------+----------+ | 7 | 900000 | +------+----------+ 1 row in set (1 min 36.58 sec) +------+----------+ | i | count(*) | +------+----------+ | 8 | 1000000 | +------+----------+ 1 row in set (1 min 47.28 sec) Query OK, 0 rows affected (1 min 47.28 sec) mysql> SELECT @@version, @@version_comment; +-----------+------------------------------+ | @@version | @@version_comment | +-----------+------------------------------+ | 8.0.35 | MySQL Community Server - GPL | +-----------+------------------------------+ 1 row in set (0.00 sec) mysql> SET PROFILING = ON; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> SELECT COUNT(*) FROM T1 WHERE c > 0; +----------+ | COUNT(*) | +----------+ | 1000000 | +----------+ 1 row in set (0.18 sec) mysql> SELECT COUNT(*) FROM T1; +----------+ | COUNT(*) | +----------+ | 1000000 | +----------+ 1 row in set (0.77 sec) mysql> SHOW PROFILES; +----------+------------+-------------------------------------+ | Query_ID | Duration | Query | +----------+------------+-------------------------------------+ | 1 | 0.17890300 | SELECT COUNT(*) FROM T1 WHERE c > 0 | | 2 | 0.77011775 | SELECT COUNT(*) FROM T1 | +----------+------------+-------------------------------------+ 2 rows in set, 1 warning (0.00 sec) mysql> EXPLAIN SELECT COUNT(*) FROM T1 WHERE c > 0; +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+--------------------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+--------------------------+ | 1 | SIMPLE | T1 | NULL | range | IX_c | IX_c | 5 | NULL | 422146 | 100.00 | Using where; Using index | +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+--------------------------+ 1 row in set, 1 warning (0.00 sec) mysql> EXPLAIN SELECT COUNT(*) FROM T1; +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+-------------+ | 1 | SIMPLE | T1 | NULL | index | NULL | IX_c | 5 | NULL | 844293 | 100.00 | Using index | +----+-------------+-------+------------+-------+---------------+------+---------+------+--------+----------+-------------+ 1 row in set, 1 warning (0.00 sec) mysql> SELECT database_name, table_name, index_name, SUM(stat_value) pages, -> SUM(stat_value)*@@innodb_page_size/(1024*1024) size_MB -> FROM mysql.innodb_index_stats -> WHERE stat_name = 'size' -> AND database_name = 'test' -> GROUP BY database_name, table_name, index_name; +---------------+------------+------------+--------+-----------+ | database_name | table_name | index_name | pages | size_MB | +---------------+------------+------------+--------+-----------+ | test | T1 | IDX_b | 3826 | 59.7813 | | test | T1 | IX_c | 1123 | 17.5469 | | test | T1 | PRIMARY | 156096 | 2439.0000 | +---------------+------------+------------+--------+-----------+ 3 rows in set (0.00 sec) mysql> ############################ Captured data at least 5 times each 5.7 ======== +----------+------------+-------------------------------------+ | Query_ID | Duration | Query | +----------+------------+-------------------------------------+ | 1 | 0.16949825 | SELECT COUNT(*) FROM T1 WHERE c > 0 | | 2 | 0.10194300 | SELECT COUNT(*) FROM T1 | +----------+------------+-------------------------------------+ 2 rows in set, 1 warning (0.00 sec) 8.0.11 ======== mysql> SHOW PROFILES; +----------+------------+-------------------------------------+ | Query_ID | Duration | Query | +----------+------------+-------------------------------------+ | 6 | 0.13369275 | SELECT COUNT(*) FROM T1 WHERE c > 0 | | 7 | 0.84893100 | SELECT COUNT(*) FROM T1 | +----------+------------+-------------------------------------+ 8.0.35 ======== +----------+------------+-------------------------------------+ | Query_ID | Duration | Query | +----------+------------+-------------------------------------+ | 1 | 0.17890300 | SELECT COUNT(*) FROM T1 WHERE c > 0 | | 2 | 0.77011775 | SELECT COUNT(*) FROM T1 | +----------+------------+-------------------------------------+ 8.1.0 ======== mysql> SHOW PROFILES; +----------+------------+-------------------------------------+ | Query_ID | Duration | Query | +----------+------------+-------------------------------------+ | 1 | 0.19672550 | SELECT COUNT(*) FROM T1 WHERE c > 0 | | 2 | 0.74843625 | SELECT COUNT(*) FROM T1 | +----------+------------+-------------------------------------+