关于npm:arraysize什么意思

44次阅读

共计 1714 个字符,预计需要花费 5 分钟才能阅读完成。

在发送给客户端。与之相干的另一个参数就是 SDU(session data unit),预抓取在 PGA 所占的内存大小和 SDU 大小相干,默认是 8K.

    SQL> show arraysize         
    arraysize 15
    SQL> create table jason as select * from dba_objects;
    Table created.
    SQL>
    SQL>
    SQL> select count(1) from dba_objects;
      COUNT(1)
    ———-
         50042
    SQL>
    SQL>
    SQL> set autot trace
    SQL>
    SQL>
    SQL>
    SQL> select * from jason;
    50042 rows selected.
    Execution Plan
    ———————————————————-
    Plan hash value: 1258222954
    —————————————————————————
    | Id  | Operation         | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    —————————————————————————
    |   0 | SELECT STATEMENT  |       | 44426 |  7679K|   155   (2)| 00:00:02 |
    |   1 |  TABLE ACCESS FULL| JASON | 44426 |  7679K|   155   (2)| 00:00:02 |
    —————————————————————————
    Note
    —–
       – dynamic sampling used for this statement
    Statistics
    ———————————————————-
              0  recursive calls
              0  db block gets
           3992  consistent gets
              0  physical reads
              0  redo size
        2544199  bytes sent via SQLwww.pizei.com*Net to client
          37188  bytes received via SQL*Net from client
           3338  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          50042  rows processed
    SQL> set arraysize 400
    SQL>
    SQL>
    SQL>
    SQL> /
    SQL> /
    50042 rows selected.
    Execution Plan
    ———————————————————-
    Plan hash value: 1258222954
    —————————————————————————
    | Id  | Operation         | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    —————————————————————————
    |   0 | SELECT STATEMENT  |       | 44426 |  7679K|   155   (2)| 00:00:02 |
    |   1 |  TABLE ACCESS FULL| JASON | 44426 |  7679K|   155   (2)| 00:00:02 |
    —————————————————————————
    Note
    —–
       – dynamic sampling used for this statement
    Statistics
    ———————————————————-
              0  recursive calls
              0  db block gets
            817  consistent gets
              0  physical reads
              0  redo size
        1956586  bytes sent via SQL*Net to client
           1867  bytes received via SQL*Net from client
            127  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          50042  rows processed

能够看到当咱们把 arraysize 从默认的 15 调整到 400 后 consistent gets 逻辑读从原来的 3992 降落到 817,bytes received via SQL*Net from client 相干的页游的值也有显著的降落。

    arraysize 参数的设置对大数据的范畴比方全表扫性能进步还是比拟大的,所以在网络带宽容许的状况下适当调大 arraysize 和估算 SDU 的值,对缩小
    逻辑读,缩小网络交互性,从而介绍 CPU 的耗费帮忙还是比拟大的。

正文完
 0