<legend id='3rk13'><style id='3rk13'><dir id='3rk13'><q id='3rk13'></q></dir></style></legend>

      <bdo id='3rk13'></bdo><ul id='3rk13'></ul>
    1. <tfoot id='3rk13'></tfoot>

      <small id='3rk13'></small><noframes id='3rk13'>

      <i id='3rk13'><tr id='3rk13'><dt id='3rk13'><q id='3rk13'><span id='3rk13'><b id='3rk13'><form id='3rk13'><ins id='3rk13'></ins><ul id='3rk13'></ul><sub id='3rk13'></sub></form><legend id='3rk13'></legend><bdo id='3rk13'><pre id='3rk13'><center id='3rk13'></center></pre></bdo></b><th id='3rk13'></th></span></q></dt></tr></i><div id='3rk13'><tfoot id='3rk13'></tfoot><dl id='3rk13'><fieldset id='3rk13'></fieldset></dl></div>

        MySQL 临时表是共享资源吗?

        Is MySQL Temporary table a shared resource?(MySQL 临时表是共享资源吗?)
      1. <i id='AGOT1'><tr id='AGOT1'><dt id='AGOT1'><q id='AGOT1'><span id='AGOT1'><b id='AGOT1'><form id='AGOT1'><ins id='AGOT1'></ins><ul id='AGOT1'></ul><sub id='AGOT1'></sub></form><legend id='AGOT1'></legend><bdo id='AGOT1'><pre id='AGOT1'><center id='AGOT1'></center></pre></bdo></b><th id='AGOT1'></th></span></q></dt></tr></i><div id='AGOT1'><tfoot id='AGOT1'></tfoot><dl id='AGOT1'><fieldset id='AGOT1'></fieldset></dl></div>

              • <tfoot id='AGOT1'></tfoot>
                  <bdo id='AGOT1'></bdo><ul id='AGOT1'></ul>

                  <small id='AGOT1'></small><noframes id='AGOT1'>

                    <tbody id='AGOT1'></tbody>

                  <legend id='AGOT1'><style id='AGOT1'><dir id='AGOT1'><q id='AGOT1'></q></dir></style></legend>
                  本文介绍了MySQL 临时表是共享资源吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个使用临时表的 MySQL 存储过程.假设我的表名是temp",我用它来存储一些中间数据.它会在程序开始时创建,并在程序结束时删除.

                  I have a MySQL stored procedure that uses a temporary table. Assume that my table name is 'temp' and I use it to store some middle data. It will create at the beginning of procedure, and will drop at the end.

                  CREATE PROCEDURE p()
                  BEGIN
                  
                  CREATE TEMPORARY TABLE `temp`(...);
                  
                  INSERT INTO `temp` VALUES(...);
                  
                  DROP TEMPORARY TABLE `temp`;
                  
                  END;
                  

                  问题是这个存储过程可能被不同的用户同时使用,所以我想知道这是否会导致任何问题(即临时表中插入数据的任何冲突).换句话说,临时表是对同一 SP 的不同调用中的共享资源吗?

                  The problem is that this stored procedure may be used by different users concurrently, so I want to know if this can cause any problems (i.e. any conflict in inserted data in temp table). In other word is temp table a shared resource within different calls to the same SP?

                  推荐答案

                  不,临时表仅限于您的数据库连接范围.在同一个数据库连接期间,您可以在对过程的后续调用中使用临时表,但其他连接无法访问它.他们可以创建一个同名的表,但每个临时表都是独立的.当您关闭连接时,临时表会消失.

                  No, a temp table is limited to the scope of your database connection. You can use the temp table in subsequent calls to the procedure during the same database connection, but other connections cannot access it. They can create a table by the same name, but each temp table will be independent. Temp tables go away when you close your connection.

                  这篇关于MySQL 临时表是共享资源吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                  MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)
                  MySQL cumulative sum grouped by date(按日期分组的 MySQL 累计总和)
                  • <i id='EqCD4'><tr id='EqCD4'><dt id='EqCD4'><q id='EqCD4'><span id='EqCD4'><b id='EqCD4'><form id='EqCD4'><ins id='EqCD4'></ins><ul id='EqCD4'></ul><sub id='EqCD4'></sub></form><legend id='EqCD4'></legend><bdo id='EqCD4'><pre id='EqCD4'><center id='EqCD4'></center></pre></bdo></b><th id='EqCD4'></th></span></q></dt></tr></i><div id='EqCD4'><tfoot id='EqCD4'></tfoot><dl id='EqCD4'><fieldset id='EqCD4'></fieldset></dl></div>

                      <small id='EqCD4'></small><noframes id='EqCD4'>

                        • <bdo id='EqCD4'></bdo><ul id='EqCD4'></ul>
                            <tbody id='EqCD4'></tbody>

                          • <tfoot id='EqCD4'></tfoot>
                            <legend id='EqCD4'><style id='EqCD4'><dir id='EqCD4'><q id='EqCD4'></q></dir></style></legend>