iis服务器助手广告
返回顶部
首页 > 资讯 > 数据库 >RR模式下insert..selcet sending data状态是怎样的
  • 522
分享到

RR模式下insert..selcet sending data状态是怎样的

2024-04-02 19:04:59 522人浏览 泡泡鱼
摘要

RR模式下insert..selcet sending data状态是怎样的,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。例如:其中的se

RR模式下insert..selcet sending data状态是怎样的,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。

例如:
RR模式下insert..selcet sending data状态是怎样的

其中的sending data是什么意思。隔离级别为RR,语句为insert..select。

二、关于sending data

以前就说过这个问题,实际上sending data可能包含如下:

  • Innodb 层数据的定位返回给Mysql

  • Innodb 层数据的查询返回给mysql

  • Innodb 层数据的修改(如果是insert..select)

  • Innodb 层加以及等待

  • 等待进入Innodb层(innodb_thread_concurrency参数)

  • Mysql 层发送数据给客户端

三、RR模式下对于insert..selcet 处于 sending data的原因总结

  • RR模式下insert..select的select表会上S行锁,如果这行处于X锁则会出现 sending data状态
    RR模式下insert..selcet sending data状态是怎样的
    RR模式下insert..selcet sending data状态是怎样的

  • insert..selcet中insert记录如果处于堵塞(唯一性检查)状态会处于 sending data状态
    RR模式下insert..selcet sending data状态是怎样的

RR模式下insert..selcet sending data状态是怎样的

  • 整个过程如果需要操作的数据量较大,处于sending data状态。

四、每行数据处理方式

    929 T@4: | | | | | | THD::enter_stage: 'Sending data' /cdh/mysqldebug/percona-server-5.7.29-32/sql/sql_executor.cc:202
    930 T@4: | | | | | | >PROFILING::status_change
    931 T@4: | | | | | | <PROFILING::status_change 391
    932 T@4: | | | | | | info: Sending data
    933 T@4: | | | | | | >do_select
    934 T@4: | | | | | | | >sub_select
    935 T@4: | | | | | | | | >init_read_record
    936 T@4: | | | | | | | | | info: using rr_sequential
    937 T@4: | | | | | | | | | >ha_rnd_init
    938 T@4: | | | | | | | | | | >change_active_index
    939 T@4: | | | | | | | | | | | >innobase_get_index
    940 T@4: | | | | | | | | | | | <innobase_get_index 10117
    941 T@4: | | | | | | | | | | <change_active_index 10241
    942 T@4: | | | | | | | | | <ha_rnd_init 3111
    943 T@4: | | | | | | | | | >innobase_trx_init
    944 T@4: | | | | | | | | | <innobase_trx_init 3109
    945 T@4: | | | | | | | | <init_read_record 349
    946 T@4: | | | | | | | | >handler::ha_rnd_next
    947 T@4: | | | | | | | | | >rnd_next
    948 T@4: | | | | | | | | | | >index_first
    949 T@4: | | | | | | | | | | | >index_read
    950 T@4: | | | | | | | | | | | | >row_search_mvcc
    951 T@4: | | | | | | | | | | | | | >row_sel_store_mysql_rec
    952 T@4: | | | | | | | | | | | | | | >row_sel_store_mysql_field_func
    953 T@4: | | | | | | | | | | | | | | <row_sel_store_mysql_field_func 3275
    954 T@4: | | | | | | | | | | | | | | >row_sel_store_mysql_field_func
    955 T@4: | | | | | | | | | | | | | | <row_sel_store_mysql_field_func 3275
    956 T@4: | | | | | | | | | | | | | <row_sel_store_mysql_rec 3465
    957 T@4: | | | | | | | | | | | | <row_search_mvcc 6574
    958 T@4: | | | | | | | | | | | <index_read 10042
    959 T@4: | | | | | | | | | | <index_first 10430
    960 T@4: | | | | | | | | | <rnd_next 10531
    961 T@4: | | | | | | | | <handler::ha_rnd_next 3172
    962 T@4: | | | | | | | | >evaluate_join_record
    963 T@4: | | | | | | | | | enter: join: 0x7ffef8019970 join_tab index: 0 table: testlock cond: 0x0
    964 T@4: | | | | | | | | | counts: evaluate_join_record join->examined_rows++: 1
    965 T@4: | | | | | | | | | >end_send
    966 T@4: | | | | | | | | | | >Query_result_insert::send_data
    967 T@4: | | | | | | | | | | | >fill_record
    968 T@4: | | | | | | | | | | | | >Item_field::save_in_field_inner
    969 T@4: | | | | | | | | | | | | <Item_field::save_in_field_inner 6720
    970 T@4: | | | | | | | | | | | | >Item_field::save_in_field_inner
    971 T@4: | | | | | | | | | | | | <Item_field::save_in_field_inner 6720
    972 T@4: | | | | | | | | | | | <fill_record 9801
    973 T@4: | | | | | | | | | | | >write_record
    974 T@4: | | | | | | | | | | | | >init_alloc_root
    975 T@4: | | | | | | | | | | | | | enter: root: 0x7fffe8e48c20
    976 T@4: | | | | | | | | | | | | <init_alloc_root 100
    977 T@4: | | | | | | | | | | | | >COPY_INFO::set_function_defaults
    978 T@4: | | | | | | | | | | | | <COPY_INFO::set_function_defaults 135
    979 T@4: | | | | | | | | | | | | >handler::ha_write_row
    980 T@4: | | | | | | | | | | | | | >ha_innobase::write_row
    981 T@4: | | | | | | | | | | | | | | >row_ins
    982 T@4: | | | | | | | | | | | | | | | row_ins: table: test/testbb
    983 T@4: | | | | | | | | | | | | | | | >row_ins_index_entry_step
    984 T@4: | | | | | | | | | | | | | | | | >row_ins_clust_index_entry
    985 T@4: | | | | | | | | | | | | | | | | | >row_ins_clust_index_entry_low
    986 T@4: | | | | | | | | | | | | | | | | | | >btr_cur_search_to_nth_level
    987 T@4: | | | | | | | | | | | | | | | | | | <btr_cur_search_to_nth_level 2092
    988 T@4: | | | | | | | | | | | | | | | | | | >thd_report_row_lock_wait
    989 T@4: | | | | | | | | | | | | | | | | | | <thd_report_row_lock_wait 4280
    990 T@4: | | | | | | | | | | | | | | | | | <row_ins_clust_index_entry_low 2692
    991 T@4: | | | | | | | | | | | | | | | | <row_ins_clust_index_entry 3337
    992 T@4: | | | | | | | | | | | | | | | <row_ins_index_entry_step 3619
    993 T@4: | | | | | | | | | | | | | | <row_ins 3763
    994 T@4: | | | | | | | | | | | | | | >thd_mark_transaction_to_rollback
    995 T@4: | | | | | | | | | | | | | | <thd_mark_transaction_to_rollback 4147
    996 T@4: | | | | | | | | | | | | | <ha_innobase::write_row 8895
    997 T@4: | | | | | | | | | | | | <handler::ha_write_row 8565

及RR模式下insert select的逻辑大概为查询一行加锁(RC下没有加锁步骤)一行插入一行,直到所有行处理完成。整个过程处于’Sending data’状态下面。因此insert select和普通的insert操作有较大的区别。

关于RR模式下insert..selcet sending data状态是怎样的问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注编程网数据库频道了解更多相关知识。

您可能感兴趣的文档:

--结束END--

本文标题: RR模式下insert..selcet sending data状态是怎样的

本文链接: https://www.lsjlt.com/news/60267.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • RR模式下insert..selcet sending data状态是怎样的
    RR模式下insert..selcet sending data状态是怎样的,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。例如:其中的se...
    99+
    2024-04-02
  • Android沉浸式状态栏的实现流程是怎样的
    本篇内容主要讲解“Android沉浸式状态栏的实现流程是怎样的”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Android沉浸式状态栏的实现流程是怎样的”吧!Android—沉浸式状态栏我们的征...
    99+
    2023-06-25
  • ASP.NET的HTTP模块和处理程序对话状态是怎样的
    这篇文章主要介绍“ASP.NET的HTTP模块和处理程序对话状态是怎样的”,在日常操作中,相信很多人在ASP.NET的HTTP模块和处理程序对话状态是怎样的问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”ASP...
    99+
    2023-06-17
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作