File: slow_log_extra-big.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (37 lines) | stat: -rw-r--r-- 2,733 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
SET @my_slow_logname = @@global.slow_query_log_file;
SET @my_lqt = @@global.long_query_time;
SET GLOBAL slow_query_log_file= '.../my_extra_big.log';
SET SESSION long_query_time = 20;
SET GLOBAL long_query_time = 0;
SELECT COUNT(*) FROM big_table_slow;
COUNT(*)
200
SELECT COUNT(*) FROM big_table_slow;
COUNT(*)
200
SELECT COUNT(*) FROM big_table_slow WHERE id>100 AND id<200;
COUNT(*)
49
SELECT * FROM big_table_slow WHERE id=2;
id	v	t
2	v	bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbba
SELECT COUNT(*) FROM big_table_slow WHERE id>100;
COUNT(*)
150
SELECT COUNT(*) FROM big_table_slow WHERE id<100;
COUNT(*)
49
# Cleanup
SET GLOBAL long_query_time=@my_lqt;
SET GLOBAL slow_query_log_file = @my_slow_logname;
DROP TABLE big_table_slow;
#
# This is a hack to check the log result.
# We strip off time related fields (non-deterministic) and verify the rest are correct.
#
Rows_sent: 1  Rows_examined: 0 Errno: 0 Killed: 0 Bytes_received: 42 Bytes_sent: 58 Read_first: 0 Read_last: 0 Read_key: 0 Read_next: 0 Read_prev: 0 Read_rnd: 0 Read_rnd_next: 0 Sort_merge_passes: 0 Sort_range_count: 0 Sort_rows: 0 Sort_scan_count: 0 Created_tmp_disk_tables: 0 Created_tmp_tables: 0
Rows_sent: 1  Rows_examined: 0 Errno: 0 Killed: 0 Bytes_received: 42 Bytes_sent: 58 Read_first: 0 Read_last: 0 Read_key: 0 Read_next: 0 Read_prev: 0 Read_rnd: 0 Read_rnd_next: 0 Sort_merge_passes: 0 Sort_range_count: 0 Sort_rows: 0 Sort_scan_count: 0 Created_tmp_disk_tables: 0 Created_tmp_tables: 0
Rows_sent: 1  Rows_examined: 49 Errno: 0 Killed: 0 Bytes_received: 66 Bytes_sent: 57 Read_first: 0 Read_last: 0 Read_key: 1 Read_next: 49 Read_prev: 0 Read_rnd: 0 Read_rnd_next: 0 Sort_merge_passes: 0 Sort_range_count: 0 Sort_rows: 0 Sort_scan_count: 0 Created_tmp_disk_tables: 0 Created_tmp_tables: 0
Rows_sent: 1  Rows_examined: 1 Errno: 0 Killed: 0 Bytes_received: 46 Bytes_sent: 307 Read_first: 0 Read_last: 0 Read_key: 1 Read_next: 0 Read_prev: 0 Read_rnd: 0 Read_rnd_next: 0 Sort_merge_passes: 0 Sort_range_count: 0 Sort_rows: 0 Sort_scan_count: 0 Created_tmp_disk_tables: 0 Created_tmp_tables: 0
Rows_sent: 1  Rows_examined: 150 Errno: 0 Killed: 0 Bytes_received: 55 Bytes_sent: 58 Read_first: 0 Read_last: 0 Read_key: 1 Read_next: 150 Read_prev: 0 Read_rnd: 0 Read_rnd_next: 0 Sort_merge_passes: 0 Sort_range_count: 0 Sort_rows: 0 Sort_scan_count: 0 Created_tmp_disk_tables: 0 Created_tmp_tables: 0
Rows_sent: 1  Rows_examined: 49 Errno: 0 Killed: 0 Bytes_received: 55 Bytes_sent: 57 Read_first: 1 Read_last: 0 Read_key: 1 Read_next: 49 Read_prev: 0 Read_rnd: 0 Read_rnd_next: 0 Sort_merge_passes: 0 Sort_range_count: 0 Sort_rows: 0 Sort_scan_count: 0 Created_tmp_disk_tables: 0 Created_tmp_tables: 0