| 1 |
select OBJECT_INSTANCE_BEGIN, THREAD_ID, SOCKET_ID, IP, PORT |
| 2 |
from performance_schema.socket_instances |
| 3 |
limit 1 |
| 4 |
into @oib, @tid, @sid, @ip, @port; |
| 5 |
|
| 6 |
==================================================================== |
| 7 |
Testing index for columns OBJECT_INSTANCE_BEGIN |
| 8 |
==================================================================== |
| 9 |
############ Explain for Query #################################### |
| 10 |
explain select COUNT(*) |
| 11 |
from performance_schema.socket_instances |
| 12 |
where OBJECT_INSTANCE_BEGIN = "impossible"; |
| 13 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 14 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL # NULL no matching row in const table |
| 15 |
############ Explain for Query #################################### |
| 16 |
explain select COUNT(*) |
| 17 |
from performance_schema.socket_instances |
| 18 |
where OBJECT_INSTANCE_BEGIN > "impossible"; |
| 19 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 20 |
1 SIMPLE socket_instances NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where |
| 21 |
############ Explain for Query #################################### |
| 22 |
explain select COUNT(*) |
| 23 |
from performance_schema.socket_instances |
| 24 |
where OBJECT_INSTANCE_BEGIN < "2"; |
| 25 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 26 |
1 SIMPLE socket_instances NULL ALL PRIMARY NULL NULL NULL # 33.33 Using where |
| 27 |
############ Explain for Query #################################### |
| 28 |
explain select COUNT(*) |
| 29 |
from performance_schema.socket_instances |
| 30 |
where OBJECT_INSTANCE_BEGIN = @oib; |
| 31 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 32 |
1 SIMPLE socket_instances NULL const PRIMARY PRIMARY 8 const # 100.00 NULL |
| 33 |
############# Explain End ######################################### |
| 34 |
flush status; |
| 35 |
select COUNT(*) |
| 36 |
from performance_schema.socket_instances |
| 37 |
where OBJECT_INSTANCE_BEGIN = @oib; |
| 38 |
COUNT(*) |
| 39 |
# |
| 40 |
OK: handler_read_key incremented |
| 41 |
|
| 42 |
==================================================================== |
| 43 |
Testing index for columns THREAD_ID |
| 44 |
==================================================================== |
| 45 |
############ Explain for Query #################################### |
| 46 |
explain select COUNT(*) |
| 47 |
from performance_schema.socket_instances |
| 48 |
where THREAD_ID = "impossible"; |
| 49 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 50 |
1 SIMPLE socket_instances NULL ref THREAD_ID THREAD_ID 9 const # 100.00 Using where |
| 51 |
############ Explain for Query #################################### |
| 52 |
explain select COUNT(*) |
| 53 |
from performance_schema.socket_instances |
| 54 |
where THREAD_ID > "impossible"; |
| 55 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 56 |
1 SIMPLE socket_instances NULL ALL THREAD_ID NULL NULL NULL # 33.33 Using where |
| 57 |
############ Explain for Query #################################### |
| 58 |
explain select COUNT(*) |
| 59 |
from performance_schema.socket_instances |
| 60 |
where THREAD_ID < "2"; |
| 61 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 62 |
1 SIMPLE socket_instances NULL ALL THREAD_ID NULL NULL NULL # 33.33 Using where |
| 63 |
############ Explain for Query #################################### |
| 64 |
explain select COUNT(*) |
| 65 |
from performance_schema.socket_instances |
| 66 |
where THREAD_ID = @tid; |
| 67 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 68 |
1 SIMPLE socket_instances NULL ref THREAD_ID THREAD_ID 9 const # 100.00 NULL |
| 69 |
############# Explain End ######################################### |
| 70 |
flush status; |
| 71 |
select COUNT(*) |
| 72 |
from performance_schema.socket_instances |
| 73 |
where THREAD_ID = @tid; |
| 74 |
COUNT(*) |
| 75 |
# |
| 76 |
OK: handler_read_key incremented |
| 77 |
|
| 78 |
==================================================================== |
| 79 |
Testing index for columns SOCKET_ID |
| 80 |
==================================================================== |
| 81 |
############ Explain for Query #################################### |
| 82 |
explain select COUNT(*) |
| 83 |
from performance_schema.socket_instances |
| 84 |
where SOCKET_ID = "impossible"; |
| 85 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 86 |
1 SIMPLE socket_instances NULL ref SOCKET_ID SOCKET_ID 4 const # 100.00 NULL |
| 87 |
############ Explain for Query #################################### |
| 88 |
explain select COUNT(*) |
| 89 |
from performance_schema.socket_instances |
| 90 |
where SOCKET_ID > "impossible"; |
| 91 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 92 |
1 SIMPLE socket_instances NULL ALL SOCKET_ID NULL NULL NULL # 33.33 Using where |
| 93 |
############ Explain for Query #################################### |
| 94 |
explain select COUNT(*) |
| 95 |
from performance_schema.socket_instances |
| 96 |
where SOCKET_ID < "2"; |
| 97 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 98 |
1 SIMPLE socket_instances NULL ALL SOCKET_ID NULL NULL NULL # 33.33 Using where |
| 99 |
############ Explain for Query #################################### |
| 100 |
explain select COUNT(*) |
| 101 |
from performance_schema.socket_instances |
| 102 |
where SOCKET_ID = @sid; |
| 103 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 104 |
1 SIMPLE socket_instances NULL ref SOCKET_ID SOCKET_ID 4 const # 100.00 NULL |
| 105 |
############# Explain End ######################################### |
| 106 |
flush status; |
| 107 |
select COUNT(*) |
| 108 |
from performance_schema.socket_instances |
| 109 |
where SOCKET_ID = @sid; |
| 110 |
COUNT(*) |
| 111 |
# |
| 112 |
OK: handler_read_key incremented |
| 113 |
|
| 114 |
==================================================================== |
| 115 |
Testing index for columns IP, PORT |
| 116 |
==================================================================== |
| 117 |
############ Explain for Query #################################### |
| 118 |
explain select COUNT(*) |
| 119 |
from performance_schema.socket_instances |
| 120 |
where IP = "impossible"; |
| 121 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 122 |
1 SIMPLE socket_instances NULL ref IP IP 258 const # 100.00 NULL |
| 123 |
############ Explain for Query #################################### |
| 124 |
explain select COUNT(*) |
| 125 |
from performance_schema.socket_instances |
| 126 |
where IP > "impossible"; |
| 127 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 128 |
1 SIMPLE socket_instances NULL ALL IP NULL NULL NULL # 33.33 Using where |
| 129 |
############ Explain for Query #################################### |
| 130 |
explain select COUNT(*) |
| 131 |
from performance_schema.socket_instances |
| 132 |
where IP < "2"; |
| 133 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 134 |
1 SIMPLE socket_instances NULL ALL IP NULL NULL NULL # 33.33 Using where |
| 135 |
############ Explain for Query #################################### |
| 136 |
explain select COUNT(*) |
| 137 |
from performance_schema.socket_instances |
| 138 |
where IP = @ip; |
| 139 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 140 |
1 SIMPLE socket_instances NULL ref IP IP 258 const # 100.00 NULL |
| 141 |
############ Explain for Query #################################### |
| 142 |
explain select COUNT(*) |
| 143 |
from performance_schema.socket_instances |
| 144 |
where IP = "impossible" |
| 145 |
and PORT = "impossible"; |
| 146 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 147 |
1 SIMPLE socket_instances NULL ref IP IP 262 const,const # 100.00 NULL |
| 148 |
############ Explain for Query #################################### |
| 149 |
explain select COUNT(*) |
| 150 |
from performance_schema.socket_instances |
| 151 |
where IP = @ip |
| 152 |
and PORT = "impossible"; |
| 153 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 154 |
1 SIMPLE socket_instances NULL ref IP IP 262 const,const # 100.00 NULL |
| 155 |
############ Explain for Query #################################### |
| 156 |
explain select COUNT(*) |
| 157 |
from performance_schema.socket_instances |
| 158 |
where IP = @ip |
| 159 |
and PORT > "impossible"; |
| 160 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 161 |
1 SIMPLE socket_instances NULL ref IP IP 258 const # 33.33 Using where |
| 162 |
############ Explain for Query #################################### |
| 163 |
explain select COUNT(*) |
| 164 |
from performance_schema.socket_instances |
| 165 |
where IP = @ip |
| 166 |
and PORT < "2"; |
| 167 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 168 |
1 SIMPLE socket_instances NULL ref IP IP 258 const # 33.33 Using where |
| 169 |
############ Explain for Query #################################### |
| 170 |
explain select COUNT(*) |
| 171 |
from performance_schema.socket_instances |
| 172 |
where IP = @ip |
| 173 |
and PORT = @port; |
| 174 |
id select_type table partitions type possible_keys key key_len ref rows filtered Extra |
| 175 |
1 SIMPLE socket_instances NULL ref IP IP 262 const,const # 100.00 NULL |
| 176 |
############# Explain End ######################################### |
| 177 |
flush status; |
| 178 |
select COUNT(*) |
| 179 |
from performance_schema.socket_instances |
| 180 |
where IP = @ip |
| 181 |
and PORT = @port; |
| 182 |
COUNT(*) |
| 183 |
# |
| 184 |
OK: handler_read_key incremented |