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

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

      <tfoot id='owba0'></tfoot>

        <legend id='owba0'><style id='owba0'><dir id='owba0'><q id='owba0'></q></dir></style></legend>
        <i id='owba0'><tr id='owba0'><dt id='owba0'><q id='owba0'><span id='owba0'><b id='owba0'><form id='owba0'><ins id='owba0'></ins><ul id='owba0'></ul><sub id='owba0'></sub></form><legend id='owba0'></legend><bdo id='owba0'><pre id='owba0'><center id='owba0'></center></pre></bdo></b><th id='owba0'></th></span></q></dt></tr></i><div id='owba0'><tfoot id='owba0'></tfoot><dl id='owba0'><fieldset id='owba0'></fieldset></dl></div>
      1. SQL Server 中的 PAGEIOLATCH_SH 等待类型是什么?

        What is PAGEIOLATCH_SH wait type in SQL Server?(SQL Server 中的 PAGEIOLATCH_SH 等待类型是什么?)

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

            1. <small id='I3m6p'></small><noframes id='I3m6p'>

              <tfoot id='I3m6p'></tfoot>
                  <tbody id='I3m6p'></tbody>
                  本文介绍了SQL Server 中的 PAGEIOLATCH_SH 等待类型是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个查询在交易过程中花费了很长时间.当我得到进程的 wait_type 时,它是 PAGEIOLATCH_SH.

                  I have a query that is taking a long time in the middle of a transaction. When I get the wait_type of the process it is PAGEIOLATCH_SH.

                  这种等待类型是什么意思,如何解决?

                  What does this wait type mean and how can this be resolved?

                  推荐答案

                  来自 Microsoft 文档:

                  PAGEIOLATCH_SH

                  当任务正在等待 I/O 请求中的缓冲区的闩锁时发生.锁存请求处于共享模式.长时间等待可能表明磁盘子系统有问题.

                  Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Shared mode. Long waits may indicate problems with the disk subsystem.

                  在实践中,这几乎总是由于对大表的大量扫描而发生.在高效使用索引的查询中几乎不会发生这种情况.

                  In practice, this almost always happens due to large scans over big tables. It almost never happens in queries that use indexes efficiently.

                  如果您的查询是这样的:

                  If your query is like this:

                  Select * from <table> where <col1> = <value> order by <PrimaryKey>
                  

                  ,检查您在 (col1, col_primary_key) 上是否有复合索引.

                  , check that you have a composite index on (col1, col_primary_key).

                  如果你没有,那么你需要一个完整的INDEX SCAN(如果选择了PRIMARY KEY),或者一个SORTcode> 如果选择了 col1 上的索引.

                  If you don't have one, then you'll need either a full INDEX SCAN if the PRIMARY KEY is chosen, or a SORT if an index on col1 is chosen.

                  它们都是对大型表的I/O 消耗大量磁盘的操作.

                  Both of them are very disk I/O consuming operations on large tables.

                  这篇关于SQL Server 中的 PAGEIOLATCH_SH 等待类型是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)(超出最大存储过程、函数、触发器或视图嵌套级别(限制 32))
                  How to debug stored procedure in VS 2015?(如何在 VS 2015 中调试存储过程?)
                  How to find a text inside SQL Server procedures / triggers?(如何在 SQL Server 程序/触发器中查找文本?)
                  SQL Server stored procedure return code oddity(SQL Server 存储过程返回码奇怪)
                  Conditional SQL ORDER BY ASC/DESC for alpha columns(alpha 列的条件 SQL ORDER BY ASC/DESC)
                  Export stored procedure result set to Excel in SSMS(在SSMS中将存储过程结果集导出到Excel)
                  • <legend id='Ibuif'><style id='Ibuif'><dir id='Ibuif'><q id='Ibuif'></q></dir></style></legend>
                      <tbody id='Ibuif'></tbody>

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

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

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