SQL Server - Bulk load blocking queries on heaps

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
3
down vote

favorite












SQL Server books online say in SET TRANSACTION ISOLATION LEVEL:




"Optimized bulk load operations on heaps block queries that are running under the following isolation levels:



SNAPSHOT



READ UNCOMMITTED



READ COMMITTED using row versioning".




What does optimized bulk load mean here exactly?










share|improve this question









New contributor




yurish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    up vote
    3
    down vote

    favorite












    SQL Server books online say in SET TRANSACTION ISOLATION LEVEL:




    "Optimized bulk load operations on heaps block queries that are running under the following isolation levels:



    SNAPSHOT



    READ UNCOMMITTED



    READ COMMITTED using row versioning".




    What does optimized bulk load mean here exactly?










    share|improve this question









    New contributor




    yurish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      SQL Server books online say in SET TRANSACTION ISOLATION LEVEL:




      "Optimized bulk load operations on heaps block queries that are running under the following isolation levels:



      SNAPSHOT



      READ UNCOMMITTED



      READ COMMITTED using row versioning".




      What does optimized bulk load mean here exactly?










      share|improve this question









      New contributor




      yurish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      SQL Server books online say in SET TRANSACTION ISOLATION LEVEL:




      "Optimized bulk load operations on heaps block queries that are running under the following isolation levels:



      SNAPSHOT



      READ UNCOMMITTED



      READ COMMITTED using row versioning".




      What does optimized bulk load mean here exactly?







      sql-server






      share|improve this question









      New contributor




      yurish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      yurish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 1 hour ago









      Kin

      51.8k479185




      51.8k479185






      New contributor




      yurish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 hours ago









      yurish

      1184




      1184




      New contributor




      yurish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      yurish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      yurish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          Optimized bulk load means SQL Server is using a special bulk load code path (fast load) and minimal logging.



          These concepts are described in:



          • SQL Server 2016, Minimal logging and Impact of the Batchsize in bulk load operations

          • Prerequisites for Minimal Logging in Bulk Import

          • The Data Loading Performance Guide

          From that last link:




          Although readers under RCSI are not affected by X locks, there are two bulk load situations that will block RCSI queries (as well as NOLOCK queries) in SQL Server 2008:



          • When populating a heap with TABLOCK using BULK INSERT, INSERT-SELECT, or other bulk load operations. This is because the heap load acquires a BULK OPERATION intent exclusive (IX) lock and the NOLOCK or RCSI readers acquire a BULK OPERATION shared (S) lock. To bulk load a heap and permit concurrent readers even using RCSI or NOLOCK, you must eliminate the TABLOCK hint and thus give up minimal logging.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "182"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            yurish is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f220570%2fsql-server-bulk-load-blocking-queries-on-heaps%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote



            accepted










            Optimized bulk load means SQL Server is using a special bulk load code path (fast load) and minimal logging.



            These concepts are described in:



            • SQL Server 2016, Minimal logging and Impact of the Batchsize in bulk load operations

            • Prerequisites for Minimal Logging in Bulk Import

            • The Data Loading Performance Guide

            From that last link:




            Although readers under RCSI are not affected by X locks, there are two bulk load situations that will block RCSI queries (as well as NOLOCK queries) in SQL Server 2008:



            • When populating a heap with TABLOCK using BULK INSERT, INSERT-SELECT, or other bulk load operations. This is because the heap load acquires a BULK OPERATION intent exclusive (IX) lock and the NOLOCK or RCSI readers acquire a BULK OPERATION shared (S) lock. To bulk load a heap and permit concurrent readers even using RCSI or NOLOCK, you must eliminate the TABLOCK hint and thus give up minimal logging.






            share|improve this answer
























              up vote
              5
              down vote



              accepted










              Optimized bulk load means SQL Server is using a special bulk load code path (fast load) and minimal logging.



              These concepts are described in:



              • SQL Server 2016, Minimal logging and Impact of the Batchsize in bulk load operations

              • Prerequisites for Minimal Logging in Bulk Import

              • The Data Loading Performance Guide

              From that last link:




              Although readers under RCSI are not affected by X locks, there are two bulk load situations that will block RCSI queries (as well as NOLOCK queries) in SQL Server 2008:



              • When populating a heap with TABLOCK using BULK INSERT, INSERT-SELECT, or other bulk load operations. This is because the heap load acquires a BULK OPERATION intent exclusive (IX) lock and the NOLOCK or RCSI readers acquire a BULK OPERATION shared (S) lock. To bulk load a heap and permit concurrent readers even using RCSI or NOLOCK, you must eliminate the TABLOCK hint and thus give up minimal logging.






              share|improve this answer






















                up vote
                5
                down vote



                accepted







                up vote
                5
                down vote



                accepted






                Optimized bulk load means SQL Server is using a special bulk load code path (fast load) and minimal logging.



                These concepts are described in:



                • SQL Server 2016, Minimal logging and Impact of the Batchsize in bulk load operations

                • Prerequisites for Minimal Logging in Bulk Import

                • The Data Loading Performance Guide

                From that last link:




                Although readers under RCSI are not affected by X locks, there are two bulk load situations that will block RCSI queries (as well as NOLOCK queries) in SQL Server 2008:



                • When populating a heap with TABLOCK using BULK INSERT, INSERT-SELECT, or other bulk load operations. This is because the heap load acquires a BULK OPERATION intent exclusive (IX) lock and the NOLOCK or RCSI readers acquire a BULK OPERATION shared (S) lock. To bulk load a heap and permit concurrent readers even using RCSI or NOLOCK, you must eliminate the TABLOCK hint and thus give up minimal logging.






                share|improve this answer












                Optimized bulk load means SQL Server is using a special bulk load code path (fast load) and minimal logging.



                These concepts are described in:



                • SQL Server 2016, Minimal logging and Impact of the Batchsize in bulk load operations

                • Prerequisites for Minimal Logging in Bulk Import

                • The Data Loading Performance Guide

                From that last link:




                Although readers under RCSI are not affected by X locks, there are two bulk load situations that will block RCSI queries (as well as NOLOCK queries) in SQL Server 2008:



                • When populating a heap with TABLOCK using BULK INSERT, INSERT-SELECT, or other bulk load operations. This is because the heap load acquires a BULK OPERATION intent exclusive (IX) lock and the NOLOCK or RCSI readers acquire a BULK OPERATION shared (S) lock. To bulk load a heap and permit concurrent readers even using RCSI or NOLOCK, you must eliminate the TABLOCK hint and thus give up minimal logging.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 19 mins ago









                Paul White♦

                47.5k14256405




                47.5k14256405




















                    yurish is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    yurish is a new contributor. Be nice, and check out our Code of Conduct.












                    yurish is a new contributor. Be nice, and check out our Code of Conduct.











                    yurish is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f220570%2fsql-server-bulk-load-blocking-queries-on-heaps%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                    Confectionery