<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pg_test_timing是評測操作系統計時效率和開銷的工具,并確認系統時間永不倒退。收集時間數據速度慢的系統可能會導致EXPLAIN ANALYZE結果不準確。 **命令格式:** pg_test_timing [-d DURATION] > **option:** > * **-d duration**:指定測試的持續時間,以秒計。更長的持續時間會給出更好一些的精確度,并且更可能發現系統時鐘回退的問題。默認的測試持續時間是 3 秒。 > * **-v --version**:打印pg_test_timing版本并退出 > * **-? --help**:顯示有關pg_test_timing的命令行參數,然后退出 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;測試SQL執行時間經常使用兩種方法`\timing` 和 `explain analyze SQL`。但是通常explain analyze SQL統計的執行時間長,其中一個原因是`explain analyze SQL`會為執行的每一個步驟添加計時信息,會有額外的計時開銷。以下例子顯示`explain analyze`比`\timing`耗時多一倍時長。 ``` postgres=# \timing Timing is on. postgres=# select count(*) from test; count --------- 1000000 (1 row) Time: 82.678 ms postgres=# explain analyze select count(*) from test; QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Finalize Aggregate (cost=14388.97..14388.98 rows=1 width=8) (actual time=214.159..214.388 rows=1 loops=1) -> Gather (cost=14388.76..14388.97 rows=2 width=8) (actual time=205.368..214.372 rows=3 loops=1) Workers Planned: 2 Workers Launched: 2 -> Partial Aggregate (cost=13388.76..13388.77 rows=1 width=8) (actual time=187.791..187.792 rows=1 loops=3) -> Parallel Index Only Scan using index_attack_alarm_reliability on alerts (cost=0.42..12347.09 rows=416667 width=0) (actual time=0.039..115.580 rows=333333 loops=3) Heap Fetches: 0 Planning Time: 0.173 ms Execution Time: 214.453 ms (9 rows) Time: 215.056 ms ``` **pg_test_timing 結果解析** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每次循環時間和柱狀圖用的單位是不同的。循環的解析度可以在幾個納秒(ns),而單個計時調用只能解析到一個微秒(us)。好的機器應該顯示90%的調用都在1微秒(100納秒)內完成。 ``` [postgres@izwz91quxhnlkan8kjak5hz /]$ pg_test_timing -d 3 Testing timing overhead for 3 seconds. Per loop time including overhead: 58.59 ns # 平均每次循環開銷(納秒) Histogram of timing durations: < us % of total count 1 96.16743 49237227 # 顯示96%的循環在1微秒(100納秒)內完成 2 3.82164 1956660 4 0.00042 215 8 0.00367 1880 16 0.00566 2896 32 0.00051 263 64 0.00026 133 128 0.00010 52 256 0.00006 30 512 0.00005 24 1024 0.00002 12 2048 0.00003 15 4096 0.00004 19 8192 0.00005 26 16384 0.00003 17 32768 0.00002 12 65536 0.00000 1 131072 0.00000 0 262144 0.00000 1 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看