Aggressive Under-Indexing and no data for missing index





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3















I know that there are lot of blocking on my database and have tried my best to get this sorted by vendor as this application is supported by them and hasn't produced any successful result yet. Every now and then, we get issue of blocking and this blocking gets so severe and their design is so poor that the whole portal goes down unless and until I kill few SPIDs which is holding exclusive lock(mostly).



I have been using sp_blitzindex from almost an year now and a big fan of First Responder Kit provided by Mr. Brent Ozar and Team. When I execute sp_blitzindex against this database where blocking takes place, it says - "Aggressive Under-Indexing: Total lock wait time > 5 minutes (row + page) with long average waits" with the priority of 10. I checked the URL column and also checked other related pages however couldn't get much assistance.



I know that the tables listed here are under indexed and some more indexes need to be created however when I run the same procedure i.e. sp_blitzindex for these objects individually at table level by using below command:



EXEC dbo.sp_BlitzIndex @DatabaseName='db1', @SchemaName='sch', @TableName='tab1';


I don't get any missing index details at all. All the existing indexes are utilized and read count is lesser than write count, only issue which is highlighted here are in the "Lock Waits" column for Primary key.



I have no clue on which column index needs to be created. I also checked sp_blitzlock to see if I could gather some more info which would help however all I see there is lot of deadlocks and same objects are listed which is figured in aggressive under-indexing.



Also checked output of sp_blitzcache by passing sortorder as "reads" and "duration" in this particular database however no missing index request. There are warnings saying "Unparameterized Query" and "Unparameterized Query, non-SARGables" and these plans involve different set of tables.



Any help is highly appreciated.



Version: Microsoft SQL Server 2014 (SP3) (KB4022619) - 12.0.6024.0 (X64) Sep 7 2018 01:37:51 Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)









share|improve this question































    3















    I know that there are lot of blocking on my database and have tried my best to get this sorted by vendor as this application is supported by them and hasn't produced any successful result yet. Every now and then, we get issue of blocking and this blocking gets so severe and their design is so poor that the whole portal goes down unless and until I kill few SPIDs which is holding exclusive lock(mostly).



    I have been using sp_blitzindex from almost an year now and a big fan of First Responder Kit provided by Mr. Brent Ozar and Team. When I execute sp_blitzindex against this database where blocking takes place, it says - "Aggressive Under-Indexing: Total lock wait time > 5 minutes (row + page) with long average waits" with the priority of 10. I checked the URL column and also checked other related pages however couldn't get much assistance.



    I know that the tables listed here are under indexed and some more indexes need to be created however when I run the same procedure i.e. sp_blitzindex for these objects individually at table level by using below command:



    EXEC dbo.sp_BlitzIndex @DatabaseName='db1', @SchemaName='sch', @TableName='tab1';


    I don't get any missing index details at all. All the existing indexes are utilized and read count is lesser than write count, only issue which is highlighted here are in the "Lock Waits" column for Primary key.



    I have no clue on which column index needs to be created. I also checked sp_blitzlock to see if I could gather some more info which would help however all I see there is lot of deadlocks and same objects are listed which is figured in aggressive under-indexing.



    Also checked output of sp_blitzcache by passing sortorder as "reads" and "duration" in this particular database however no missing index request. There are warnings saying "Unparameterized Query" and "Unparameterized Query, non-SARGables" and these plans involve different set of tables.



    Any help is highly appreciated.



    Version: Microsoft SQL Server 2014 (SP3) (KB4022619) - 12.0.6024.0 (X64) Sep 7 2018 01:37:51 Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)









    share|improve this question



























      3












      3








      3


      3






      I know that there are lot of blocking on my database and have tried my best to get this sorted by vendor as this application is supported by them and hasn't produced any successful result yet. Every now and then, we get issue of blocking and this blocking gets so severe and their design is so poor that the whole portal goes down unless and until I kill few SPIDs which is holding exclusive lock(mostly).



      I have been using sp_blitzindex from almost an year now and a big fan of First Responder Kit provided by Mr. Brent Ozar and Team. When I execute sp_blitzindex against this database where blocking takes place, it says - "Aggressive Under-Indexing: Total lock wait time > 5 minutes (row + page) with long average waits" with the priority of 10. I checked the URL column and also checked other related pages however couldn't get much assistance.



      I know that the tables listed here are under indexed and some more indexes need to be created however when I run the same procedure i.e. sp_blitzindex for these objects individually at table level by using below command:



      EXEC dbo.sp_BlitzIndex @DatabaseName='db1', @SchemaName='sch', @TableName='tab1';


      I don't get any missing index details at all. All the existing indexes are utilized and read count is lesser than write count, only issue which is highlighted here are in the "Lock Waits" column for Primary key.



      I have no clue on which column index needs to be created. I also checked sp_blitzlock to see if I could gather some more info which would help however all I see there is lot of deadlocks and same objects are listed which is figured in aggressive under-indexing.



      Also checked output of sp_blitzcache by passing sortorder as "reads" and "duration" in this particular database however no missing index request. There are warnings saying "Unparameterized Query" and "Unparameterized Query, non-SARGables" and these plans involve different set of tables.



      Any help is highly appreciated.



      Version: Microsoft SQL Server 2014 (SP3) (KB4022619) - 12.0.6024.0 (X64) Sep 7 2018 01:37:51 Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)









      share|improve this question
















      I know that there are lot of blocking on my database and have tried my best to get this sorted by vendor as this application is supported by them and hasn't produced any successful result yet. Every now and then, we get issue of blocking and this blocking gets so severe and their design is so poor that the whole portal goes down unless and until I kill few SPIDs which is holding exclusive lock(mostly).



      I have been using sp_blitzindex from almost an year now and a big fan of First Responder Kit provided by Mr. Brent Ozar and Team. When I execute sp_blitzindex against this database where blocking takes place, it says - "Aggressive Under-Indexing: Total lock wait time > 5 minutes (row + page) with long average waits" with the priority of 10. I checked the URL column and also checked other related pages however couldn't get much assistance.



      I know that the tables listed here are under indexed and some more indexes need to be created however when I run the same procedure i.e. sp_blitzindex for these objects individually at table level by using below command:



      EXEC dbo.sp_BlitzIndex @DatabaseName='db1', @SchemaName='sch', @TableName='tab1';


      I don't get any missing index details at all. All the existing indexes are utilized and read count is lesser than write count, only issue which is highlighted here are in the "Lock Waits" column for Primary key.



      I have no clue on which column index needs to be created. I also checked sp_blitzlock to see if I could gather some more info which would help however all I see there is lot of deadlocks and same objects are listed which is figured in aggressive under-indexing.



      Also checked output of sp_blitzcache by passing sortorder as "reads" and "duration" in this particular database however no missing index request. There are warnings saying "Unparameterized Query" and "Unparameterized Query, non-SARGables" and these plans involve different set of tables.



      Any help is highly appreciated.



      Version: Microsoft SQL Server 2014 (SP3) (KB4022619) - 12.0.6024.0 (X64) Sep 7 2018 01:37:51 Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)






      sql-server index blocking sp-blitzindex






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 31 at 12:27







      Learning_DBAdmin

















      asked Mar 31 at 12:06









      Learning_DBAdminLearning_DBAdmin

      535214




      535214






















          1 Answer
          1






          active

          oldest

          votes


















          12














          Free Unit



          Since you're using the First Responder Kit, I'll stick to using it in my examples to teach you how to diagnose this further.



          No Missing Indexes?



          Why doesn't SQL Server have any missing index requests in the DMVs or Query Plans?



          First, Wait



          Use sp_BlitzFirst @SinceStartup = 1;, and check out your wait stats.



          If LCK_ waits aren't near the top of your list (top 10 or so), and if the Avg ms Per Wait column isn't showing values over 1-2 seconds for the LCK_ waits, the situation might not be so dire. I'd probably switch my focus elsewhere.



          NUTS



          Modifiers



          Rather than using sp_BlitzCache to look at Reads or Duration, use it to look at these:



          EXEC sp_BlitzCache @SortOrder = 'writes';
          EXEC sp_BlitzCache @SortOrder = 'avg writes';


          You may find queries that modify a lot of data at once. If you do, changing them to batch modifications can reduce the locking overhead.



          The problem with this approach is that it relies on execution plans being in the cache when you're looking for them. They may not be, for various reasons.



          Since you're running sp_BlitzCache, pay attention to the line in the Warnings rollup (second output);



          NUTS



          Common Problems



          Long locks can come from places that end users may not notice, like index maintenance.



          If this is the source, you may want to consider scaling back the fragmentation level you perform maintenance at (50-80%), the frequency of the maintenance (weekly or monthly), or just not doing it at all and updating statistics only (much less invasive and less prone to blocking).



          Look for code patterns that use BEGIN TRAN, then do a ton of work before committing. This requires you do a code review. There's no shortcut here, and it's typically the kind of thing you want a monitoring tool to do.



          Look in sp_BlitzIndex for foreign keys with cascading actions. These can cause a dramatic amount of locking.



          Hope this helps!






          share|improve this answer
























          • @Learning_DBAdmin I'm not trying to be dismissive, but this really isn't a good use of site comments. If you have a new question, please ask it as one.

            – Erik Darling
            Apr 1 at 13:38












          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f233601%2faggressive-under-indexing-and-no-data-for-missing-index%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          12














          Free Unit



          Since you're using the First Responder Kit, I'll stick to using it in my examples to teach you how to diagnose this further.



          No Missing Indexes?



          Why doesn't SQL Server have any missing index requests in the DMVs or Query Plans?



          First, Wait



          Use sp_BlitzFirst @SinceStartup = 1;, and check out your wait stats.



          If LCK_ waits aren't near the top of your list (top 10 or so), and if the Avg ms Per Wait column isn't showing values over 1-2 seconds for the LCK_ waits, the situation might not be so dire. I'd probably switch my focus elsewhere.



          NUTS



          Modifiers



          Rather than using sp_BlitzCache to look at Reads or Duration, use it to look at these:



          EXEC sp_BlitzCache @SortOrder = 'writes';
          EXEC sp_BlitzCache @SortOrder = 'avg writes';


          You may find queries that modify a lot of data at once. If you do, changing them to batch modifications can reduce the locking overhead.



          The problem with this approach is that it relies on execution plans being in the cache when you're looking for them. They may not be, for various reasons.



          Since you're running sp_BlitzCache, pay attention to the line in the Warnings rollup (second output);



          NUTS



          Common Problems



          Long locks can come from places that end users may not notice, like index maintenance.



          If this is the source, you may want to consider scaling back the fragmentation level you perform maintenance at (50-80%), the frequency of the maintenance (weekly or monthly), or just not doing it at all and updating statistics only (much less invasive and less prone to blocking).



          Look for code patterns that use BEGIN TRAN, then do a ton of work before committing. This requires you do a code review. There's no shortcut here, and it's typically the kind of thing you want a monitoring tool to do.



          Look in sp_BlitzIndex for foreign keys with cascading actions. These can cause a dramatic amount of locking.



          Hope this helps!






          share|improve this answer
























          • @Learning_DBAdmin I'm not trying to be dismissive, but this really isn't a good use of site comments. If you have a new question, please ask it as one.

            – Erik Darling
            Apr 1 at 13:38
















          12














          Free Unit



          Since you're using the First Responder Kit, I'll stick to using it in my examples to teach you how to diagnose this further.



          No Missing Indexes?



          Why doesn't SQL Server have any missing index requests in the DMVs or Query Plans?



          First, Wait



          Use sp_BlitzFirst @SinceStartup = 1;, and check out your wait stats.



          If LCK_ waits aren't near the top of your list (top 10 or so), and if the Avg ms Per Wait column isn't showing values over 1-2 seconds for the LCK_ waits, the situation might not be so dire. I'd probably switch my focus elsewhere.



          NUTS



          Modifiers



          Rather than using sp_BlitzCache to look at Reads or Duration, use it to look at these:



          EXEC sp_BlitzCache @SortOrder = 'writes';
          EXEC sp_BlitzCache @SortOrder = 'avg writes';


          You may find queries that modify a lot of data at once. If you do, changing them to batch modifications can reduce the locking overhead.



          The problem with this approach is that it relies on execution plans being in the cache when you're looking for them. They may not be, for various reasons.



          Since you're running sp_BlitzCache, pay attention to the line in the Warnings rollup (second output);



          NUTS



          Common Problems



          Long locks can come from places that end users may not notice, like index maintenance.



          If this is the source, you may want to consider scaling back the fragmentation level you perform maintenance at (50-80%), the frequency of the maintenance (weekly or monthly), or just not doing it at all and updating statistics only (much less invasive and less prone to blocking).



          Look for code patterns that use BEGIN TRAN, then do a ton of work before committing. This requires you do a code review. There's no shortcut here, and it's typically the kind of thing you want a monitoring tool to do.



          Look in sp_BlitzIndex for foreign keys with cascading actions. These can cause a dramatic amount of locking.



          Hope this helps!






          share|improve this answer
























          • @Learning_DBAdmin I'm not trying to be dismissive, but this really isn't a good use of site comments. If you have a new question, please ask it as one.

            – Erik Darling
            Apr 1 at 13:38














          12












          12








          12







          Free Unit



          Since you're using the First Responder Kit, I'll stick to using it in my examples to teach you how to diagnose this further.



          No Missing Indexes?



          Why doesn't SQL Server have any missing index requests in the DMVs or Query Plans?



          First, Wait



          Use sp_BlitzFirst @SinceStartup = 1;, and check out your wait stats.



          If LCK_ waits aren't near the top of your list (top 10 or so), and if the Avg ms Per Wait column isn't showing values over 1-2 seconds for the LCK_ waits, the situation might not be so dire. I'd probably switch my focus elsewhere.



          NUTS



          Modifiers



          Rather than using sp_BlitzCache to look at Reads or Duration, use it to look at these:



          EXEC sp_BlitzCache @SortOrder = 'writes';
          EXEC sp_BlitzCache @SortOrder = 'avg writes';


          You may find queries that modify a lot of data at once. If you do, changing them to batch modifications can reduce the locking overhead.



          The problem with this approach is that it relies on execution plans being in the cache when you're looking for them. They may not be, for various reasons.



          Since you're running sp_BlitzCache, pay attention to the line in the Warnings rollup (second output);



          NUTS



          Common Problems



          Long locks can come from places that end users may not notice, like index maintenance.



          If this is the source, you may want to consider scaling back the fragmentation level you perform maintenance at (50-80%), the frequency of the maintenance (weekly or monthly), or just not doing it at all and updating statistics only (much less invasive and less prone to blocking).



          Look for code patterns that use BEGIN TRAN, then do a ton of work before committing. This requires you do a code review. There's no shortcut here, and it's typically the kind of thing you want a monitoring tool to do.



          Look in sp_BlitzIndex for foreign keys with cascading actions. These can cause a dramatic amount of locking.



          Hope this helps!






          share|improve this answer













          Free Unit



          Since you're using the First Responder Kit, I'll stick to using it in my examples to teach you how to diagnose this further.



          No Missing Indexes?



          Why doesn't SQL Server have any missing index requests in the DMVs or Query Plans?



          First, Wait



          Use sp_BlitzFirst @SinceStartup = 1;, and check out your wait stats.



          If LCK_ waits aren't near the top of your list (top 10 or so), and if the Avg ms Per Wait column isn't showing values over 1-2 seconds for the LCK_ waits, the situation might not be so dire. I'd probably switch my focus elsewhere.



          NUTS



          Modifiers



          Rather than using sp_BlitzCache to look at Reads or Duration, use it to look at these:



          EXEC sp_BlitzCache @SortOrder = 'writes';
          EXEC sp_BlitzCache @SortOrder = 'avg writes';


          You may find queries that modify a lot of data at once. If you do, changing them to batch modifications can reduce the locking overhead.



          The problem with this approach is that it relies on execution plans being in the cache when you're looking for them. They may not be, for various reasons.



          Since you're running sp_BlitzCache, pay attention to the line in the Warnings rollup (second output);



          NUTS



          Common Problems



          Long locks can come from places that end users may not notice, like index maintenance.



          If this is the source, you may want to consider scaling back the fragmentation level you perform maintenance at (50-80%), the frequency of the maintenance (weekly or monthly), or just not doing it at all and updating statistics only (much less invasive and less prone to blocking).



          Look for code patterns that use BEGIN TRAN, then do a ton of work before committing. This requires you do a code review. There's no shortcut here, and it's typically the kind of thing you want a monitoring tool to do.



          Look in sp_BlitzIndex for foreign keys with cascading actions. These can cause a dramatic amount of locking.



          Hope this helps!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 31 at 13:36









          Erik DarlingErik Darling

          22.8k1269113




          22.8k1269113













          • @Learning_DBAdmin I'm not trying to be dismissive, but this really isn't a good use of site comments. If you have a new question, please ask it as one.

            – Erik Darling
            Apr 1 at 13:38



















          • @Learning_DBAdmin I'm not trying to be dismissive, but this really isn't a good use of site comments. If you have a new question, please ask it as one.

            – Erik Darling
            Apr 1 at 13:38

















          @Learning_DBAdmin I'm not trying to be dismissive, but this really isn't a good use of site comments. If you have a new question, please ask it as one.

          – Erik Darling
          Apr 1 at 13:38





          @Learning_DBAdmin I'm not trying to be dismissive, but this really isn't a good use of site comments. If you have a new question, please ask it as one.

          – Erik Darling
          Apr 1 at 13:38


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f233601%2faggressive-under-indexing-and-no-data-for-missing-index%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          Origin of the phrase “under your belt”?