The sending data state in mysql contains a sample analysis using internal temporary tables
Editor to share with you the sending data status in mysql includes an example analysis of the use of internal temporary tables. I hope you will gain something after reading this article. Let's discuss it together.
The statement is as follows:
Mysql > desc select id,count (*) from t110 group by id +- -+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +- -+-+-- + | 1 | SIMPLE | T110 | NULL | ALL | NULL | 99395 | 100.00 | Using temporary Using filesort | +-+- -- + 1 row in set 1 warning (0.00 sec)
The operation to store the internal temporary table is also under 'sending data', as can be seen in the following debug trace
The operation is to get a piece of data handler::ha_rnd_next in the innodb layer and then query it in the internal temporary table
This line records hp_search, and if it exists, make corresponding changes to heap_update (such as count accumulation, sum bonus, etc.)
Use internal temporary table 1249 Troup3: | | > handler::ha_rnd_next 1250 Troup3: | > rnd_next 1251 Trou3: | > general_fetch 1252 Troup3: | > row_search_mvcc 1253 Troup3: | > row_sel_store_mysql_rec 1254 Troup3 | | > row_sel_store_mysql_field_func 1255 titled 3: | heap_rkey 1268 titled 3: | enter: info: 0x7ffe7caa74d0 inx: 0 1269 titled 3: | > hp_search 1270 titled 3: | | exit: hash: 0x105050504 1271 titled 3: | | exit: found key at 0x7ffe7ceb4880 1272 titled 3: | hp_extract_record 1274 titled 3: | hp_copy_record_data_to_chunks 1280 titled 3: |