• <bdo id='mawFk'></bdo><ul id='mawFk'></ul>

    <tfoot id='mawFk'></tfoot>

        <legend id='mawFk'><style id='mawFk'><dir id='mawFk'><q id='mawFk'></q></dir></style></legend>
      1. <small id='mawFk'></small><noframes id='mawFk'>

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

        批量插入 Oracle 数据库:哪个更好:FOR Cursor 循环还是简单的 Select?

        Bulk Insert into Oracle database: Which is better: FOR Cursor loop or a simple Select?(批量插入 Oracle 数据库:哪个更好:FOR Cursor 循环还是简单的 Select?)

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

            <tbody id='O9DhI'></tbody>

                  <bdo id='O9DhI'></bdo><ul id='O9DhI'></ul>
                  <legend id='O9DhI'><style id='O9DhI'><dir id='O9DhI'><q id='O9DhI'></q></dir></style></legend>
                  <tfoot id='O9DhI'></tfoot>
                • <i id='O9DhI'><tr id='O9DhI'><dt id='O9DhI'><q id='O9DhI'><span id='O9DhI'><b id='O9DhI'><form id='O9DhI'><ins id='O9DhI'></ins><ul id='O9DhI'></ul><sub id='O9DhI'></sub></form><legend id='O9DhI'></legend><bdo id='O9DhI'><pre id='O9DhI'><center id='O9DhI'></center></pre></bdo></b><th id='O9DhI'></th></span></q></dt></tr></i><div id='O9DhI'><tfoot id='O9DhI'></tfoot><dl id='O9DhI'><fieldset id='O9DhI'></fieldset></dl></div>
                  本文介绍了批量插入 Oracle 数据库:哪个更好:FOR Cursor 循环还是简单的 Select?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  哪个是批量插入 Oracle 数据库的更好选择?一个 FOR 光标循环,如

                  Which would be a better option for bulk insert into an Oracle database ? A FOR Cursor loop like

                  DECLARE
                     CURSOR C1 IS SELECT * FROM FOO;
                  BEGIN
                     FOR C1_REC IN C1 LOOP
                     INSERT INTO BAR(A,
                                  B,
                                  C)
                            VALUES(C1.A,
                                   C1.B,
                                   C1.C);
                     END LOOP;
                  END
                  

                  或简单的选择,例如:

                  INSERT INTO BAR(A,
                                  B,
                                  C)
                          (SELECT A,
                                  B,
                                  C
                          FROM FOO);
                  

                  有什么具体原因,哪一个会更好?

                  Any specific reason either one would be better ?

                  推荐答案

                  我推荐选择选项,因为光标需要更长的时间.
                  对于必须修改查询的任何人来说,使用 Select 也更容易理解

                  I would recommend the Select option because cursors take longer.
                  Also using the Select is much easier to understand for anyone who has to modify your query

                  这篇关于批量插入 Oracle 数据库:哪个更好:FOR Cursor 循环还是简单的 Select?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to redirect the output of DBMS_OUTPUT.PUT_LINE to a file?(如何将 DBMS_OUTPUT.PUT_LINE 的输出重定向到文件?)
                  How do I get column datatype in Oracle with PL-SQL with low privileges?(如何使用低权限的 PL-SQL 在 Oracle 中获取列数据类型?)
                  Get a list of all functions and procedures in an Oracle database(获取 Oracle 数据库中所有函数和过程的列表)
                  Why cannot I create triggers on objects owned by SYS?(为什么我不能在 SYS 拥有的对象上创建触发器?)
                  Returning result even for elements in IN list that don#39;t exist in table(即使对于表中不存在的 IN 列表中的元素也返回结果)
                  Reset Sequence in oracle 11g(oracle 11g 中的重置序列)

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

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

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

                          <bdo id='jtsAA'></bdo><ul id='jtsAA'></ul>