主頁 > 資料庫 > PostgreSQL一站式插件推薦 -- pg_enterprise_views

PostgreSQL一站式插件推薦 -- pg_enterprise_views

2023-05-16 22:12:18 資料庫

    近日發現PG官方插件串列中新收錄了一款插件 pg_enterprise_views,因為官方已經數年未添新的插件了很是新奇,找了臺設備測驗過后果斷上了生產,得空分享給大家,

    該插件提供了數十張系統表及一個GUI工具,用以監控從作業系統到資料庫方方面面的性能情況,并支持對任意時段歷史資料的回溯,基本等同于以往所有監控類插件整合后的超集,

1. 系統表

本質上而言,官方有意提供GUI工具意在降低學習成本,一般運維人員無需關注系統表內容,了解GUI工具的使用即可,在此僅作簡要說明,

    完成安裝后,所有相關結構會被安放在 postgres 庫下,這正是其優秀之處,PG的資料庫之間是相對獨立的,并不提供跨庫的資料訪問,因此大部分的插件作用域僅為單庫,而 PEV(即 pg_enterprise_views,后文簡稱 PEV)從單庫即可完成對整個資料庫簇的實體級監控,先來看看提供了哪些表與視圖,由名稱可見其內容應包含負載指標、活躍會話、等待事件、超時鎖、長事務、SQL及執行計劃、SQL統計資訊、資料庫、表、索引、序列、函式、后臺寫行程及歸檔行程,可以說是相當全面的,

postgres=# \dt pev.*
                 List of relations
 Schema |          Name          | Type  |  Owner   
--------+------------------------+-------+----------
 pev    | pev_active_session_his | table | postgres
 pev    | pev_archiver_his       | table | postgres
 pev    | pev_bgwriter_his       | table | postgres
 pev    | pev_database_his       | table | postgres
 pev    | pev_functions_his      | table | postgres
 pev    | pev_indexes_his        | table | postgres
 pev    | pev_long_locks_his     | table | postgres
 pev    | pev_long_trxs_his      | table | postgres
 pev    | pev_metrics_his        | table | postgres
 pev    | pev_sequences_his      | table | postgres
 pev    | pev_setting            | table | postgres
 pev    | pev_sql                | table | postgres
 pev    | pev_sql_plan           | table | postgres
 pev    | pev_sql_stats_his      | table | postgres
 pev    | pev_tables_his         | table | postgres
 pev    | pev_wait_events_his    | table | postgres
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 postgres=# \dv pev.*
               List of relations
 Schema |        Name        | Type |  Owner   
--------+--------------------+------+----------
 pev    | pev_active_session | view | postgres
 pev    | pev_long_locks     | view | postgres
 pev    | pev_long_trxs      | view | postgres
 pev    | pev_metrics        | view | postgres
 pev    | pev_sql_stats      | view | postgres
 pev    | pev_wait_events    | view | postgres

1.1. pev_metrics && pev_metrics_his

  視圖 pev_metrics 提供數十項從作業系統到資料庫的實時負載指標,表 pev_metrics_his 周期性拍攝指標快照并計算增量,

  這極大的彌補了 PG 在這方面的缺陷,如 Oracle、SQL Server 等商業資料庫甚至是 MySQL 這種同樣的開源產品都內置有豐富的性能視圖,而 PG 迭代的側重點可能更多的聚焦于功能層面,

postgres=# \d pev.pev_metrics
              View "pev.pev_metrics"
    Column    |          Type          | Modifiers 
--------------+------------------------+-----------
 metric_group | text                   | 
 metric_id    | text                   | 
 metric_name  | text                   | 
 value        | character varying(200) | 
 units        | text                   | 
 desp         | text                   | 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
postgres=# \d pev.pev_metrics_his
              Table "pev.pev_metrics_his"
    Column    |            Type             | Modifiers 
--------------+-----------------------------+-----------
 snap_id      | bigint                      | 
 sample_time  | timestamp without time zone | 
 metric_group | character varying(2000)     | 
 metric_id    | integer                     | 
 metric_name  | character varying(2000)     | 
 value        | character varying(2000)     | 
 value_ps     | double precision            | 
 units        | character varying(2000)     | 
 desp         | character varying(2000)     | 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
postgres=# select * from pev.pev_metrics;
 metric_group | metric_id |     metric_name      |                   value                   | units  |                                                     desp                                                     
--------------+-----------+----------------------+-------------------------------------------+--------+--------------------------------------------------------------------------------------------------------------
 OS(CPU)      | 1001      | CPU_USER_NORMAL_PCT  | 0                                         | %      | Percentage of CPU time spent processing user-mode processes
 OS(CPU)      | 1002      | CPU_USER_NICED_PCT   | 0                                         | %      | Percentage of time spent by CPU processing the priority of user-mode scheduling process
 OS(CPU)      | 1003      | CPU_KERNEL_PCT       | 0                                         | %      | Percentage of CPU time spent processing kernel processes
 OS(CPU)      | 1004      | CPU_IDLE_PCT         | 100                                       | %      | Percentage of CPU idle time
 OS(CPU)      | 1005      | CPU_IO_PCT           | 0                                         | %      | Percentage of time spent by CPU processing I/O
 OS(CPU)      | 1006      | CPU_MODEL            | Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz | -      | CPU model name
 OS(CPU)      | 1007      | CPU_PRO_LOGICAL_CNT  | 0                                         | number | Number of CPU logical processors
 OS(CPU)      | 1008      | CPU_PRO_PHYSICAL_CNT | 8                                         | number | Number of CPU physical processors
 OS(CPU)      | 1009      | CPU_CORE_CNT         | 1                                         | number | Number of CPU cores
 OS(CPU)      | 1010      | CPU_ARCH             | x86_64                                    | -      | CPU architecture
 OS(CPU)      | 1011      | CPU_L1D_CACHE_SIZE   | 32                                        | KB     | CPU L1 data cache size
 OS(CPU)      | 1012      | CPU_L1I_CACHE_SIZE   | 32                                        | KB     | CPU L1 instruction cache size
 OS(CPU)      | 1013      | CPU_L2_CACHE_SIZE    | 256                                       | KB     | CPU L2 cache size
 OS(CPU)      | 1014      | CPU_L3_CACHE_SIZE    | 25600                                     | KB     | CPU L3 cache size
 OS(MEMORY)   | 1015      | MEM_TOTAL_MB         | 15773.6                                   | MB     | Total memory capacity size
 OS(MEMORY)   | 1016      | MEM_USED_MB          | 798.37                                    | MB     | Current memory capacity usage
 OS(MEMORY)   | 1017      | MEM_FREE_MB          | 14975.2                                   | MB     | Current memory capacity free size
 OS(MEMORY)   | 1018      | MEM_SWAP_TOTAL_MB    | 32768                                     | MB     | Swap partition size
 OS(MEMORY)   | 1019      | MEM_SWAP_USED_MB     | 0                                         | MB     | Used size of swap partition
 OS(MEMORY)   | 1020      | MEM_SWAP_FREE_MB     | 32768                                     | MB     | Free size of swap partition
 OS(DISK)     | 1021      | DISK_TOTAL_MB        | 205714                                    | MB     | Total disk capacity
 OS(DISK)     | 1022      | DISK_USED_MB         | 17995.5                                   | MB     | Disk used size
 OS(DISK)     | 1023      | DISK_FREE_MB         | 187719                                    | MB     | Disk free size
 OS(DISK)     | 1024      | DISK_RD_CNT          | 90                                        | number | Number of disk reads, ps means per seconed of delta
 OS(DISK)     | 1025      | DISK_WT_CNT          | 0                                         | number | Number of disk writes, ps means per seconed of delta
 OS(DISK)     | 1026      | DISK_RD_KB           | 544249                                    | KB     | Disk read data size, ps means per seconed of delta
 OS(DISK)     | 1027      | DISK_WT_KB           | 55032636                                  | KB     | Disk write data size, ps means per seconed of delta
 OS(PROCESS)  | 1028      | PRO_TOTAL_CNT        | 230                                       | number | Total number of current processes
 OS(PROCESS)  | 1029      | PRO_ACTIVE_CNT       | 1                                         | number | Total number of current active processes
 OS(PROCESS)  | 1030      | PRO_SLEEP_CNT        | 115                                       | number | Total number of current sleep processes
 OS(PROCESS)  | 1031      | PRO_STOPPED_CNT      | 0                                         | number | Total number of current stopped processes
 OS(PROCESS)  | 1032      | PRO_ZOMBIE_CNT       | 0                                         | number | Total number of current zombiz processes
 OS(NETWORK)  | 1033      | NET_DATA_SEND_KB     | 0                                         | KB     | Network data transmission size, ps means per seconed of delta
 OS(NETWORK)  | 1034      | NET_PACKAGES_SEND    | 0                                         | number | Number of network packets sent, ps means per seconed of delta
 OS(NETWORK)  | 1035      | NET_ERR_SEND         | 0                                         | number | Number of network data transmission errors, ps means per seconed of delta
 OS(NETWORK)  | 1036      | NET_PACKAGES_SDROP   | 0                                         | number | Number of packets lost in network data transmission, ps means per seconed of delta
 OS(NETWORK)  | 1037      | NET_DATA_RECEIVE_KB  | 0                                         | KB     | Network data receive size, ps means per seconed of delta
 OS(NETWORK)  | 1038      | NET_PACKAGES_RECEIVE | 0                                         | number | Number of network packets receive, ps means per seconed of delta
 OS(NETWORK)  | 1039      | NET_ERR_RECEIVE      | 0                                         | number | Number of network data receive errors, ps means per seconed of delta
 OS(NETWORK)  | 1040      | NET_PACKAGES_RDROP   | 0                                         | number | Number of packets lost in network data receive, ps means per seconed of delta
 DB           | 2001      | CONN_TOTAL           | 4                                         | number | Total current connections
 DB           | 2002      | CONN_ACTIVE          | 1                                         | number | Current active connections
 DB           | 2003      | SESS_BG_TOTAL        | 3                                         | number | Number of current background sessions
 DB           | 2004      | SESS_BG_ACTIVE       | 1                                         | number | Number of current background active sessions
 DB           | 2005      | TX_CNT               | 2581359                                   | number | Total number of transactions since the server was started, ps means per seconed of delta
 DB           | 2006      | TX_COMMIT_CNT        | 2581321                                   | number | Total number of transactions submitted since the server was started, ps means per seconed of delta
 DB           | 2007      | TX_ROLLBACK_CNT      | 38                                        | number | Total number of transactions rollbacked since the server was started, ps means per seconed of delta
 DB           | 2008      | TEMP_KB              | 0.00                                      | KB     | Total size of temporary space occupation size since the server was started
 DB           | 2009      | FETCHED_CNT          | 16423761                                  | number | Total number of rows scanned since the server was started, ps means per seconed of delta
 DB           | 2010      | INSERT_CNT           | 3081659                                   | number | Total number of rows inserted since the server was started, ps means per seconed of delta
 DB           | 2011      | UPDATE_CNT           | 411174                                    | number | Total number of rows updated since the server was started, ps means per seconed of delta
 DB           | 2012      | DELETE_CNT           | 3092713                                   | number | Total number of rows deleted since the server was started, ps means per seconed of delta
 DB           | 2013      | WAL_KB               | 81920.00                                  | KB     | The size of the WAL generated since the server was started, ps means per seconed of delta
 DB           | 2014      | LOGICAL_RD_CNT       | 66268944                                  | number | Number of logical reads since server startup, ps means per seconed of delta
 DB           | 2015      | PHYSICAL_RD_CNT      | 14919                                     | number | Number of physical reads since server startup, ps means per seconed of delta
 DB           | 2016      | DBSIZE_MB            | 144.70                                    | MB     | Total size of the current databases
 DB           | 2017      | CONFLICTS_CNT        | 0                                         | number | The number of queries cancelled in this database due to conflicts with recovery since the server was started
 DB           | 2018      | DEADLOCKS_CNT        | 0                                         | number | Number of deadlocks since the server was started

 1.2. pev_active_session && pev_active_session_his

  視圖 pev_active_session 提供實時的會話資訊,表 pev_active_session_his 周期性拍攝會話快照,

  其結構大致等同與內置視圖 pg_stat_activity 但附加了 queryid、planid 及 ssl 資訊,這也就意味著對于系統內的任意會話都可實時獲取其 SQL 及執行計劃文本,并支持在對任意時段進行故障溯源時定位到具體的 SQL、執行計劃、客戶端等,

postgres=# \d pev.pev_active_session
              View "pev.pev_active_session"
      Column      |           Type           | Modifiers 
------------------+--------------------------+-----------
 datid            | oid                      | 
 datname          | name                     | 
 pid              | integer                  | 
 usesysid         | oid                      | 
 application_name | text                     | 
 backend_type     | text                     | 
 backend_start    | timestamp with time zone | 
 state            | text                     | 
 state_change     | timestamp with time zone | 
 backend_xid      | xid                      | 
 backend_xmin     | xid                      | 
 queryid          | bigint                   | 
 planid           | bigint                   | 
 query            | text                     | 
 query_start      | timestamp with time zone | 
 xact_start       | timestamp with time zone | 
 wait_event_type  | text                     | 
 wait_event       | text                     | 
 client_addr      | inet                     | 
 client_port      | bigint                   | 
 client_hostname  | text                     | 
 ssl              | boolean                  | 
 sslcompression   | boolean                  | 
 sslversion       | text                     | 
 sslcipher        | text                     | 
 sslbits          | bigint                   | 
 sslclientdn      | text                     | 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
postgres=# \d pev.pev_active_session_his
             Table "pev.pev_active_session_his"
      Column      |            Type             | Modifiers 
------------------+-----------------------------+-----------
 snap_id          | bigint                      | 
 sample_time      | timestamp without time zone | 
 datid            | oid                         | 
 datname          | character varying(2000)     | 
 pid              | integer                     | 
 usesysid         | oid                         | 
 application_name | character varying(2000)     | 
 client_addr      | character varying(2000)     | 
 client_hostname  | character varying(2000)     | 
 client_port      | integer                     | 
 backend_type     | character varying(2000)     | 
 backend_start    | timestamp with time zone    | 
 backend_xid      | xid                         | 
 backend_xmin     | xid                         | 
 xact_start       | timestamp with time zone    | 
 query_start      | timestamp with time zone    | 
 queryid          | bigint                      | 
 planid           | bigint                      | 
 state            | character varying(2000)     | 
 state_change     | timestamp with time zone    | 
 wait_event_type  | character varying(2000)     | 
 wait_event       | character varying(2000)     | 
 ssl              | boolean                     | 
 sslcompression   | boolean                     | 
 sslversion       | text                        | 
 sslcipher        | text                        | 
 sslbits          | bigint                      | 
 sslclientdn      | text                        | 

1.3. pev_wait_events && pev_wait_events_his 

  視圖 pev_wait_events 提供實時的等待事件匯總資訊,表 pev_wait_events_his 周期性拍攝等待事件快照,

  使運維人員或DBA能清晰的觀測到資料庫實時及歷史的時間分配情況,

postgres=# \d pev.pev_wait_events
      View "pev.pev_wait_events"
     Column      |  Type   | Modifiers 
-----------------+---------+-----------
 wait_event_type | text    | 
 wait_event      | text    | 
 wait_count      | bigint  | 
 dura_ms         | numeric | 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
postgres=# \d pev.pev_wait_events_his
              Table "pev.pev_wait_events_his"
     Column      |            Type             | Modifiers 
-----------------+-----------------------------+-----------
 snap_id         | bigint                      | 
 sample_time     | timestamp without time zone | 
 wait_event_type | character varying(2000)     | 
 wait_event      | character varying(2000)     | 
 wait_count      | integer                     | 
 dura_ms         | bigint                      | 
 dura_ms_delta   | bigint                      | 

1.4. pev_sql_stats && pev_sql_stats_his

  視圖 pev_sql_stats 提供實時的 SQL 統計資訊,表 pev_sql_stats_his 周期性拍攝 SQL 統計資訊快照,

  能夠清晰的洞察任意 SQL 于指定時段內的統計資訊變化趨勢,而如原生拓展 pg_stat_statements 僅包含實時資訊其實并不直觀,也不具備很強的參考價值,

postgres=# \d pev.pev_sql_stats
         View "pev.pev_sql_stats"
       Column        |  Type   | Modifiers 
---------------------+---------+-----------
 userid              | oid     | 
 dbid                | oid     | 
 queryid             | bigint  | 
 calls               | bigint  | 
 total_time_ms       | numeric | 
 min_time_ms         | numeric | 
 max_time_ms         | numeric | 
 mean_time_ms        | numeric | 
 stddev_time_ms      | numeric | 
 rows                | bigint  | 
 shared_blks_hit     | bigint  | 
 shared_blks_read    | bigint  | 
 shared_blks_dirtied | bigint  | 
 shared_blks_written | bigint  | 
 local_blks_hit      | bigint  | 
 local_blks_read     | bigint  | 
 local_blks_dirtied  | bigint  | 
 local_blks_written  | bigint  | 
 temp_blks_read      | bigint  | 
 temp_blks_written   | bigint  | 
 blk_read_time_ms    | numeric | 
 blk_write_time_ms   | numeric | 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
postgres=# \d pev.pev_sql_stats_his
                    Table "pev.pev_sql_stats_his"
          Column           |            Type             | Modifiers 
---------------------------+-----------------------------+-----------
 snap_id                   | bigint                      | 
 sample_time               | timestamp without time zone | 
 userid                    | oid                         | 
 dbid                      | oid                         | 
 queryid                   | bigint                      | 
 calls                     | bigint                      | 
 total_time_ms             | double precision            | 
 min_time_ms               | double precision            | 
 max_time_ms               | double precision            | 
 mean_time_ms              | double precision            | 
 stddev_time_ms            | double precision            | 
 rows                      | bigint                      | 
 shared_blks_hit           | bigint                      | 
 shared_blks_read          | bigint                      | 
 shared_blks_dirtied       | bigint                      | 
 shared_blks_written       | bigint                      | 
 local_blks_hit            | bigint                      | 
 local_blks_read           | bigint                      | 
 local_blks_dirtied        | bigint                      | 
 local_blks_written        | bigint                      | 
 temp_blks_read            | bigint                      | 
 temp_blks_written         | bigint                      | 
 blk_read_time_ms          | double precision            | 
 blk_write_time_ms         | double precision            | 
 calls_delta               | bigint                      | 
 total_time_ms_delta       | double precision            | 
 min_time_ms_delta         | double precision            | 
 max_time_ms_delta         | double precision            | 
 mean_time_ms_delta        | double precision            | 
 stddev_time_ms_delta      | double precision            | 
 rows_delta                | bigint                      | 
 shared_blks_hit_delta     | bigint                      | 
 shared_blks_read_delta    | bigint                      | 
 shared_blks_dirtied_delta | bigint                      | 
 shared_blks_written_delta | bigint                      | 
 local_blks_hit_delta      | bigint                      | 
 local_blks_read_delta     | bigint                      | 
 local_blks_dirtied_delta  | bigint                      | 
 local_blks_written_delta  | bigint                      | 
 temp_blks_read_delta      | bigint                      | 
 temp_blks_written_delta   | bigint                      | 
 blk_read_time_ms_delta    | double precision            | 
 blk_write_time_ms_delta   | double precision            | 

1.5. pev_long_locks & pev_long_locks_his

  視圖 pev_long_locks 提供實時的超20秒的鎖等待資訊,表 pev_long_locks_his 周期性拍攝超時鎖快照,

  PG原生的鎖資訊相關系統表非常晦澀,不具備易用性,而通過 PEV 的鎖等待視圖可以輕松查看到阻塞者以及被阻塞者的行程、客戶端、SQL、執行計劃、被鎖定的目標結構等等,更加貼合實際的運維需求,

postgres=# \d pev.pev_long_locks
        View "pev.pev_long_locks"
      Column      |   Type   | Modifiers 
------------------+----------+-----------
 blocker_pid      | integer  | 
 blocker_user     | name     | 
 blocker_client   | text     | 
 blocker_queryid  | bigint   | 
 blocker_planid   | bigint   | 
 blocker_state    | text     | 
 blocked_pid      | integer  | 
 blocked_user     | name     | 
 blocked_client   | text     | 
 blocked_queryid  | bigint   | 
 blocked_planid   | bigint   | 
 blocked_state    | text     | 
 blocked_dura_sec | bigint   | 
 lock_type        | text     | 
 lock_db          | name     | 
 lock_table       | regclass | 
 lock_row_num     | smallint | 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
postgres=# \d pev.pev_long_locks_his
               Table "pev.pev_long_locks_his"
      Column      |            Type             | Modifiers 
------------------+-----------------------------+-----------
 snap_id          | bigint                      | 
 sample_time      | timestamp without time zone | 
 blocker_pid      | integer                     | 
 blocker_user     | character varying(2000)     | 
 blocker_client   | character varying(2000)     | 
 blocker_queryid  | bigint                      | 
 blocker_planid   | bigint                      | 
 blocked_pid      | integer                     | 
 blocked_user     | character varying(2000)     | 
 blocked_client   | character varying(2000)     | 
 blocked_queryid  | bigint                      | 
 blocked_planid   | bigint                      | 
 blocked_dura_sec | bigint                      | 
 lock_type        | character varying(2000)     | 
 lock_db          | character varying(2000)     | 
 lock_table       | character varying(2000)     | 
 lock_row_num     | bigint                      | 

1.6. pev_long_trxs && pev_long_trxs_his

  視圖 pev_long_trxs 提供實時的超20秒的長事務資訊,表pev_long_trxs_his 周期性拍攝長事務快照,

  事務往往沒有鎖更加引人重視,因為所等待將直接導致業務阻塞,而事務則不會,其實不然,當事務長時間不釋放時將影響到 auto vacuum 行程回收元組,對系統的性能影響是潛移默化的,運維人員有必要實時關注超長事務并進行必要的處理,

postgres=# \d pev.pev_long_trxs
                  View "pev.pev_long_trxs"
      Column      |            Type             | Modifiers 
------------------+-----------------------------+-----------
 datname          | name                        | 
 pid              | integer                     | 
 usesysid         | oid                         | 
 application_name | text                        | 
 client_addr      | inet                        | 
 client_port      | bigint                      | 
 backend_start    | timestamp without time zone | 
 state            | text                        | 
 xact_start       | timestamp without time zone | 
 query_start      | timestamp without time zone | 
 state_dura_ms    | bigint                      | 
 trx_dura_ms      | bigint                      | 
 query_dura_ms    | bigint                      | 
 wait_event_type  | text                        | 
 wait_event       | text                        | 
 queryid          | bigint                      | 
 planid           | bigint                      | 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
postgres=# \d pev.pev_long_trxs_his
               Table "pev.pev_long_trxs_his"
      Column      |            Type             | Modifiers 
------------------+-----------------------------+-----------
 snap_id          | bigint                      | 
 sample_time      | timestamp without time zone | 
 datname          | character varying(2000)     | 
 pid              | integer                     | 
 usesysid         | oid                         | 
 application_name | character varying(2000)     | 
 client_addr      | character varying(2000)     | 
 client_port      | integer                     | 
 backend_start    | timestamp without time zone | 
 state            | character varying(2000)     | 
 xact_start       | timestamp without time zone | 
 query_start      | timestamp without time zone | 
 state_dura_ms    | bigint                      | 
 trx_dura_ms      | bigint                      | 
 query_dura_ms    | bigint                      | 
 wait_event_type  | character varying(2000)     | 
 wait_event       | character varying(2000)     | 
 queryid          | bigint                      | 
 planid           | bigint                      | 

1.7. pev_database_his

  表 pev_database_his 周期性拍攝全資料庫簇的資料庫統計資訊快照并進行增量計算,

postgres=# \d pev.pev_database_his
                   Table "pev.pev_database_his"
         Column          |            Type             | Modifiers 
-------------------------+-----------------------------+-----------
 snap_id                 | bigint                      | 
 sample_time             | timestamp without time zone | 
 database_oid            | oid                         | 
 database_name           | character varying(2000)     | 
 current_backends        | bigint                      | 
 xact_commit             | bigint                      | 
 xact_rollback           | bigint                      | 
 blks_read               | bigint                      | 
 blks_hit                | bigint                      | 
 tup_returned            | bigint                      | 
 tup_fetched             | bigint                      | 
 tup_inserted            | bigint                      | 
 tup_updated             | bigint                      | 
 tup_deleted             | bigint                      | 
 conflicts               | bigint                      | 
 temp_files              | bigint                      | 
 temp_bytes              | bigint                      | 
 deadlocks               | bigint                      | 
 blk_read_time_ms        | bigint                      | 
 blk_write_time_ms       | bigint                      | 
 current_backends_delta  | bigint                      | 
 xact_commit_delta       | bigint                      | 
 xact_rollback_delta     | bigint                      | 
 blks_read_delta         | bigint                      | 
 blks_hit_delta          | bigint                      | 
 tup_returned_delta      | bigint                      | 
 tup_fetched_delta       | bigint                      | 
 tup_inserted_delta      | bigint                      | 
 tup_updated_delta       | bigint                      | 
 tup_deleted_delta       | bigint                      | 
 conflicts_delta         | bigint                      | 
 temp_files_delta        | bigint                      | 
 temp_bytes_delta        | bigint                      | 
 deadlocks_delta         | bigint                      | 
 blk_read_time_ms_delta  | bigint                      | 
 blk_write_time_ms_delta | bigint                      | 

1.8. pev_tables_his

  表 pev_tables_his 周期性拍攝全資料庫簇的表統計資訊快照并進行增量計算,

postgres=# \d pev.pev_tables_his
                     Table "pev.pev_tables_his"
          Column           |            Type             | Modifiers 
---------------------------+-----------------------------+-----------
 snap_id                   | bigint                      | 
 sample_time               | timestamp without time zone | 
 dbname                    | character varying(2000)     | 
 table_oid                 | oid                         | 
 schema_name               | character varying(2000)     | 
 table_name                | character varying(2000)     | 
 seq_scan                  | bigint                      | 
 seq_tup_read              | bigint                      | 
 idx_scan                  | bigint                      | 
 idx_tup_fetch             | bigint                      | 
 n_tup_ins                 | bigint                      | 
 n_tup_upd                 | bigint                      | 
 n_tup_del                 | bigint                      | 
 n_tup_hot_upd             | bigint                      | 
 n_live_tup                | bigint                      | 
 n_dead_tup                | bigint                      | 
 n_mod_since_analyze       | bigint                      | 
 heap_blks_read            | bigint                      | 
 heap_blks_hit             | bigint                      | 
 idx_blks_read             | bigint                      | 
 idx_blks_hit              | bigint                      | 
 toast_blks_read           | bigint                      | 
 toast_blks_hit            | bigint                      | 
 tidx_blks_read            | bigint                      | 
 tidx_blks_hit             | bigint                      | 
 vacuum_count              | bigint                      | 
 autovacuum_count          | bigint                      | 
 analyze_count             | bigint                      | 
 autoanalyze_count         | bigint                      | 
 last_vacuum               | timestamp without time zone | 
 last_autovacuum           | timestamp without time zone | 
 last_analyze              | timestamp without time zone | 
 last_autoanalyze          | timestamp without time zone | 
 seq_scan_delta            | bigint                      | 
 seq_tup_read_delta        | bigint                      | 
 idx_scan_delta            | bigint                      | 
 idx_tup_fetch_delta       | bigint                      | 
 n_tup_ins_delta           | bigint                      | 
 n_tup_upd_delta           | bigint                      | 
 n_tup_del_delta           | bigint                      | 
 n_tup_hot_upd_delta       | bigint                      | 
 n_live_tup_delta          | bigint                      | 
 n_dead_tup_delta          | bigint                      | 
 n_mod_since_analyze_delta | bigint                      | 
 heap_blks_read_delta      | bigint                      | 
 heap_blks_hit_delta       | bigint                      | 
 idx_blks_read_delta       | bigint                      | 
 idx_blks_hit_delta        | bigint                      | 
 toast_blks_read_delta     | bigint                      | 
 toast_blks_hit_delta      | bigint                      | 
 tidx_blks_read_delta      | bigint                      | 
 tidx_blks_hit_delta       | bigint                      | 
 vacuum_count_delta        | bigint                      | 
 autovacuum_count_delta    | bigint                      | 
 analyze_count_delta       | bigint                      | 
 autoanalyze_count_delta   | bigint                      | 

1.9. pev_indexes_his

  表 pev_indexes_his 周期性拍攝全資料庫簇的索引統計資訊快照并進行增量計算,

postgres=# \d pev.pev_indexes_his
                  Table "pev.pev_indexes_his"
       Column        |            Type             | Modifiers 
---------------------+-----------------------------+-----------
 snap_id             | bigint                      | 
 sample_time         | timestamp without time zone | 
 table_oid           | oid                         | 
 index_oid           | oid                         | 
 schema_name         | character varying(2000)     | 
 table_name          | character varying(2000)     | 
 index_name          | character varying(2000)     | 
 idx_scan            | bigint                      | 
 idx_tup_read        | bigint                      | 
 idx_tup_fetch       | bigint                      | 
 idx_blks_read       | bigint                      | 
 idx_blks_hit        | bigint                      | 
 idx_scan_delta      | bigint                      | 
 idx_tup_read_delta  | bigint                      | 
 idx_tup_fetch_delta | bigint                      | 
 idx_blks_read_delta | bigint                      | 
 idx_blks_hit_delta  | bigint                      | 

1.10. pev_sequences_his

  表 pev_sequences_his 周期性拍攝全資料庫簇的序列統計資訊快照并進行增量計算,

postgres=# \d pev.pev_sequences_his
               Table "pev.pev_sequences_his"
     Column      |            Type             | Modifiers 
-----------------+-----------------------------+-----------
 snap_id         | bigint                      | 
 sample_time     | timestamp without time zone | 
 sequence_oid    | oid                         | 
 schema_name     | character varying(2000)     | 
 sequence_name   | character varying(2000)     | 
 blks_read       | bigint                      | 
 blks_hit        | bigint                      | 
 blks_read_delta | bigint                      | 
 blks_hit_delta  | bigint                      | 

1.11. pev_functions_his

  表 pev_functions_his 周期性拍攝全資料庫簇的函式統計資訊快照并進行增量計算,

postgres=# \d pev.pev_functions_his
                 Table "pev.pev_functions_his"
       Column        |            Type             | Modifiers 
---------------------+-----------------------------+-----------
 snap_id             | bigint                      | 
 sample_time         | timestamp without time zone | 
 function_oid        | oid                         | 
 schema_name         | character varying(2000)     | 
 function_name       | character varying(2000)     | 
 calls               | bigint                      | 
 total_time_ms       | bigint                      | 
 self_time_ms        | bigint                      | 
 calls_delta         | bigint                      | 
 total_time_ms_delta | bigint                      | 
 self_time_ms_delta  | bigint                      | 

1.12. pev_bgwriter_his

  表 pev_bgwriter_his 周期性拍攝后臺寫行程統計資訊快照并進行增量計算,

postgres=# \d pev.pev_bgwriter_his
                       Table "pev.pev_bgwriter_his"
             Column             |            Type             | Modifiers 
--------------------------------+-----------------------------+-----------
 snap_id                        | bigint                      | 
 sample_time                    | timestamp without time zone | 
 checkpoints_timed              | bigint                      | 
 checkpoints_req                | bigint                      | 
 checkpoint_write_time_ms       | bigint                      | 
 checkpoint_sync_time_ms        | bigint                      | 
 buffers_checkpoint             | bigint                      | 
 buffers_clean                  | bigint                      | 
 maxwritten_clean               | bigint                      | 
 buffers_backend                | bigint                      | 
 buffers_backend_fsync          | bigint                      | 
 buffers_alloc                  | bigint                      | 
 checkpoints_timed_delta        | bigint                      | 
 checkpoints_req_delta          | bigint                      | 
 checkpoint_write_time_ms_delta | bigint                      | 
 checkpoint_sync_time_ms_delta  | bigint                      | 
 buffers_checkpoint_delta       | bigint                      | 
 buffers_clean_delta            | bigint                      | 
 maxwritten_clean_delta         | bigint                      | 
 buffers_backend_delta          | bigint                      | 
 buffers_backend_fsync_delta    | bigint                      | 
 buffers_alloc_delta            | bigint                      | 

1.13. pev_archiver_his

  表 pev_archiver_his 周期性拍攝歸檔行程統計資訊快照并進行增量計算,

postgres=# \d pev.pev_archiver_his
                  Table "pev.pev_archiver_his"
        Column        |            Type             | Modifiers 
----------------------+-----------------------------+-----------
 snap_id              | bigint                      | 
 sample_time          | timestamp without time zone | 
 archived_count       | bigint                      | 
 last_archived_wal    | character varying(2000)     | 
 last_archived_time   | timestamp without time zone | 
 failed_count         | bigint                      | 
 last_failed_wal      | character varying(2000)     | 
 last_failed_time     | timestamp without time zone | 
 archived_count_delta | bigint                      | 
 failed_count_delta   | bigint                      | 

1.14. pev_sql && pev_sql_plan

  表 pev_sql 及 pev_sql_plan 記錄了所有執行過的 SQL 及其執行計劃資訊,用于關聯使用,

postgres=# \d pev.pev_sql
      Table "pev.pev_sql"
 Column  |  Type   | Modifiers 
---------+---------+-----------
 queryid | bigint  | 
 dbid    | integer | 
 query   | text    | 
 iftemp  | boolean | 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
postgres=# \d pev.pev_sql_plan
   Table "pev.pev_sql_plan"
 Column  |  Type  | Modifiers 
---------+--------+-----------
 queryid | bigint | 
 planid  | bigint | 
 plan    | text   | 

1.15. pev_setting

  表 pev_setting 用于進行整個模塊的引數配置,修改后10秒內自動生效,

postgres=# select * from pev.pev_setting;
           name            | value |  unit   |                                                                     desp                                                                      
---------------------------+-------+---------+-----------------------------------------------------------------------------------------------------------------------------------------------
 PEV_MAX_SQL               | 10000 | NUMBER  | Max sql stats info to hold, the value should not be less than 1000
 PEV_MAX_SIZE              |  5120 | MB      | Maximum data size held by pev module, automatic cleaning when exceeding, the value should not be less than 1024
 PEV_TRACK_UTILITY_SQL     |     0 | -       | Whether the PEV module tracks utility SQL, Non-0 means yes
 PEV_SQL_TRACK_LEVEL       |     1 | -       | PEV module track level of SQL statements, 0: no tracking, 1: track top level SQL, 2 track all SQL, including inner nested statements
 PEV_ASH_FREQUENCY         |    30 | SECONED | PEV_ACTIVE_SESSION_HIS gather interval, normal value should not be less than 10 when opening, -1 for close
 PEV_METRICS_FREQUENCY     |    60 | SECONED | PEV_METRICS_HIS gather interval, normal value should not be less than 10 when opening, -1 for close
 PEV_WAIT_EVENTS_FREQUENCY |    60 | SECONED | PEV_WAIT_EVENTS_HIS gather interval, normal value should not be less than 10 when opening, -1 for close
 PEV_LONG_TRXS_FREQUENCY   |    60 | SECONED | PEV_LONG_TRXS_HIS gather interval, normal value should not be less than 10 when opening, -1 for close
 PEV_LONG_LOCKS_FREQUENCY  |    60 | SECONED | PEV_LONG_LOCKS_HIS gather interval, normal value should not be less than 10 when opening, -1 for close
 PEV_DATABASE_FREQUENCY    |   600 | SECONED | PEV_DATABASE_HIS gather interval, normal value should not be less than 60 when opening, -1 for close
 PEV_TABLES_FREQUENCY      |   600 | SECONED | PEV_TABLES_HIS gather interval, normal value should not be less than 60 when opening, -1 for close
 PEV_INDEXES_FREQUENCY     |   600 | SECONED | PEV_INDEXES_HIS gather interval, normal value should not be less than 60 when opening, -1 for close
 PEV_SEQUENCES_FREQUENCY   |   600 | SECONED | PEV_SEQUENCES_HIS gather interval, normal value should not be less than 60 when opening, -1 for close
 PEV_FUNCTIONS_FREQUENCY   |   600 | SECONED | PEV_FUNCTIONS_HIS gather interval, normal value should not be less than 60 when opening, -1 for close
 PEV_BGWRITER_FREQUENCY    |   600 | SECONED | PEV_BGWRITER_HIS gather interval, normal value should not be less than 60 when opening, -1 for close
 PEV_ARCHIVER_FREQUENCY    |   600 | SECONED | PEV_ARCHIVER_HIS gather interval, normal value should not be less than 60 when opening, -1 for close
 PEV_SQL_STATS_FREQUENCY   |   600 | SECONED | PEV_SQL_STATS_HIS gather interval, normal value should not be less than 60 when opening, -1 for close
 PEV_MIN_TIME              |     1 | DAY     | Minimum data dwell time held by the PEV module, priority is higher than PEV_MAX_SIZE in garbage cleaning, the value should not be less than 1

2. GUI工具

  官方提供了名為 pev.exe 的客戶端 GUI 工具,對上述系統表的使用方法進行了封裝,這也是最方便快捷的使用方式,在一臺可連接到資料庫的 windows 設備上可直接運行使用,

  可見其涵蓋了所有需要關注的重點資訊,從上至下分別是:負載指標、歷史等待事件、實時等待事件、活躍行程資訊(可切換超時鎖、長事務、TOP SQL、TOP 客戶端、歷史超時鎖、歷史長事務、TOP 資料庫、TOP 表、TOP 索引、寫行程狀態、歸檔行程狀態等)以及曲線圖,

  • 雙擊 QUERYID 或 PLANID 進入 SQL 詳情頁,可查看其于指定時段所使用的執行計劃、等待事件、客戶端資訊,
  • 雙擊 PID 進入行程詳情頁,可查看其當前的具體動作及狀態,并可一鍵 KILL 該行程,
  • 雙擊任意藍色項可在底部曲線圖處顯示其在指定時間段內的變化曲線

3. 安裝方式

下載鏈接:

????官方通道:[email protected]

????PG官網通道:https://www.postgresql.org/download/products/6-postgresql-extensions/

安裝步驟:

????1. 下載對應自身PG版本的壓縮包并解壓(如 pg_enterprise_views_pg10.x_v20230423_linux_x64(64-bit).zip)

????2. 將 pg_enterprise_views.so 檔案放入PG安裝目錄的 lib 目錄下(一般為:/usr/local/pgsql/lib/)

????3. 將 pg_enterprise_views--1.0.sql 及 pg_enterprise_views.control 檔案放置于PG安裝目錄的 extension 目錄下(一般為:/usr/local/pgsql/share/extension)

????4. 修改組態檔 postgresql.conf:shared_preload_libraries = 'pg_enterprise_views'

????5. 重啟 PG 資料庫

????6. psql 執行命令(必須是 postgres 庫):create extension pg_enterprise_views;

免費許可:

????免費許可至2024年5月1日(支持24小時歷史資料回溯),

????查看許可資訊:select pev.pev_register_info();

????企業版激活(需激活碼):select pev.pev_register('Activation Code');

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/552636.html

標籤:PostgreSQL

上一篇:單表查詢

下一篇:返回列表

標籤雲
其他(159154) Python(38143) JavaScript(25431) Java(18048) C(15227) 區塊鏈(8267) C#(7972) AI(7469) 爪哇(7425) MySQL(7191) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5871) 数组(5741) R(5409) Linux(5340) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4572) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2433) ASP.NET(2403) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) .NET技术(1975) 功能(1967) Web開發(1951) HtmlCss(1937) python-3.x(1918) C++(1917) 弹簧靴(1913) xml(1889) PostgreSQL(1878) .NETCore(1861) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • GPU虛擬機創建時間深度優化

    **?桔妹導讀:**GPU虛擬機實體創建速度慢是公有云面臨的普遍問題,由于通常情況下創建虛擬機屬于低頻操作而未引起業界的重視,實際生產中還是存在對GPU實體創建時間有苛刻要求的業務場景。本文將介紹滴滴云在解決該問題時的思路、方法、并展示最終的優化成果。 從公有云服務商那里購買過虛擬主機的資深用戶,一 ......

    uj5u.com 2020-09-10 06:09:13 more
  • 可編程網卡芯片在滴滴云網路的應用實踐

    **?桔妹導讀:**隨著云規模不斷擴大以及業務層面對延遲、帶寬的要求越來越高,采用DPDK 加速網路報文處理的方式在橫向縱向擴展都出現了局限性。可編程芯片成為業界熱點。本文主要講述了可編程網卡芯片在滴滴云網路中的應用實踐,遇到的問題、帶來的收益以及開源社區貢獻。 #1. 資料中心面臨的問題 隨著滴滴 ......

    uj5u.com 2020-09-10 06:10:21 more
  • 滴滴資料通道服務演進之路

    **?桔妹導讀:**滴滴資料通道引擎承載著全公司的資料同步,為下游實時和離線場景提供了必不可少的源資料。隨著任務量的不斷增加,資料通道的整體架構也隨之發生改變。本文介紹了滴滴資料通道的發展歷程,遇到的問題以及今后的規劃。 #1. 背景 資料,對于任何一家互聯網公司來說都是非常重要的資產,公司的大資料 ......

    uj5u.com 2020-09-10 06:11:05 more
  • 滴滴AI Labs斬獲國際機器翻譯大賽中譯英方向世界第三

    **桔妹導讀:**深耕人工智能領域,致力于探索AI讓出行更美好的滴滴AI Labs再次斬獲國際大獎,這次獲獎的專案是什么呢?一起來看看詳細報道吧! 近日,由國際計算語言學協會ACL(The Association for Computational Linguistics)舉辦的世界最具影響力的機器 ......

    uj5u.com 2020-09-10 06:11:29 more
  • MPP (Massively Parallel Processing)大規模并行處理

    1、什么是mpp? MPP (Massively Parallel Processing),即大規模并行處理,在資料庫非共享集群中,每個節點都有獨立的磁盤存盤系統和記憶體系統,業務資料根據資料庫模型和應用特點劃分到各個節點上,每臺資料節點通過專用網路或者商業通用網路互相連接,彼此協同計算,作為整體提供 ......

    uj5u.com 2020-09-10 06:11:41 more
  • 滴滴資料倉庫指標體系建設實踐

    **桔妹導讀:**指標體系是什么?如何使用OSM模型和AARRR模型搭建指標體系?如何統一流程、規范化、工具化管理指標體系?本文會對建設的方法論結合滴滴資料指標體系建設實踐進行解答分析。 #1. 什么是指標體系 ##1.1 指標體系定義 指標體系是將零散單點的具有相互聯系的指標,系統化的組織起來,通 ......

    uj5u.com 2020-09-10 06:12:52 more
  • 單表千萬行資料庫 LIKE 搜索優化手記

    我們經常在資料庫中使用 LIKE 運算子來完成對資料的模糊搜索,LIKE 運算子用于在 WHERE 子句中搜索列中的指定模式。 如果需要查找客戶表中所有姓氏是“張”的資料,可以使用下面的 SQL 陳述句: SELECT * FROM Customer WHERE Name LIKE '張%' 如果需要 ......

    uj5u.com 2020-09-10 06:13:25 more
  • 滴滴Ceph分布式存盤系統優化之鎖優化

    **桔妹導讀:**Ceph是國際知名的開源分布式存盤系統,在工業界和學術界都有著重要的影響。Ceph的架構和演算法設計發表在國際系統領域頂級會議OSDI、SOSP、SC等上。Ceph社區得到Red Hat、SUSE、Intel等大公司的大力支持。Ceph是國際云計算領域應用最廣泛的開源分布式存盤系統, ......

    uj5u.com 2020-09-10 06:14:51 more
  • es~通過ElasticsearchTemplate進行聚合~嵌套聚合

    之前寫過《es~通過ElasticsearchTemplate進行聚合操作》的文章,這一次主要寫一個嵌套的聚合,例如先對sex集合,再對desc聚合,最后再對age求和,共三層嵌套。 Aggregations的部分特性類似于SQL語言中的group by,avg,sum等函式,Aggregation ......

    uj5u.com 2020-09-10 06:14:59 more
  • 爬蟲日志監控 -- Elastc Stack(ELK)部署

    傻瓜式部署,只需替換IP與用戶 導讀: 現ELK四大組件分別為:Elasticsearch(核心)、logstash(處理)、filebeat(采集)、kibana(可視化) 下載均在https://www.elastic.co/cn/downloads/下tar包,各組件版本最好一致,配合fdm會 ......

    uj5u.com 2020-09-10 06:15:05 more
最新发布
  • PostgreSQL一站式插件推薦 -- pg_enterprise_views

    近日發現PG官方插件串列中新收錄了一款插件 pg_enterprise_views,因為官方已經數年未添新的插件了很是新奇,找了臺設備測驗過后果斷上了生產,得空分享給大家。 該插件提供了數十張系統表及一個GUI工具,用以監控從作業系統到資料庫方方面面的性能情況,并支持對任意時段歷史資料的回溯,基本等 ......

    uj5u.com 2023-05-16 22:12:18 more
  • 單表查詢

    第一章 簡單查詢 1.1、select陳述句 mysql 中查詢資料的基本陳述句是select陳述句。 語法: select [distinct] 欄位1,欄位2,欄位3..... from 表名 [where 條件運算式] [group by 欄位名] [having 條件運算式] [order by ......

    uj5u.com 2023-05-16 22:10:09 more
  • hive 從入門到精通

    hive入門到精通 hive部署 啟動Hadoop # 啟動hadoop start-all.sh # 檢查hadoop行程 jps # 檢查各埠 netstat -aplnt | grep java 檢查MySQL是否啟動成功 ps -aux | grep mysql netstat -apln ......

    uj5u.com 2023-05-16 15:32:25 more
  • pg_enterprise_views偶然發現的PG神仙插件!

    一直從事資料庫相關的作業,對于PG而言最大的問題其實是在運維管理方面,其缺乏有效且直觀成體系的系統表,苦覓良久,今日在PG官網中發現了一款新收錄的免費插件,其提供了數十張系統表,內容涵蓋了從作業系統到資料庫的負載指標、等待事件、會話、客戶端、SQL、SQL執行計劃、超時鎖、長事務、資料庫物件、寫行程 ......

    uj5u.com 2023-05-16 15:32:13 more
  • MySQL 8.0不再擔心被垃圾SQL搞爆記憶體

    MySQL 8.0.28引入的新功能 MySQL 8.0.28開始,新增一個特性,支持監控統計并限制各個連接(會話)的記憶體消耗,避免大量用戶連接因為執行垃圾SQL消耗過多記憶體,造成可能被OOM kill的風險。 首先,需要先設定系統選項 global_connection_memory_tracki ......

    uj5u.com 2023-05-16 15:31:01 more
  • ClickHouse筆記: Ubuntu/Centos下的安裝, 配置和用戶管理

    ClickHouse 屬于 OLAP 資料庫, 與 OLTP (Transaction Process) 相比, 注重資料分析, 重點在查詢的性能. 在業務系統中, 往往使用 OLTP 資料庫做業務資料存盤, 用 OLAP 資料庫做查詢分析, 在一些場景下ClickHouse可以取代ES(Elast... ......

    uj5u.com 2023-05-16 15:30:55 more
  • Redis實戰解讀-初識Redis&Redis基本資料型別

    一.初識Redis
    1.什么是Redis
    ? Redis是一個速度非常快的非關系型資料庫(non-relational database),它可以存盤鍵(key)與五種不同型別的值的映射(mapping),可以將存盤在記憶體的鍵值對資料持久化到磁盤,可以使用復制特性來擴展讀性能,也可以采用客戶端分片來... ......

    uj5u.com 2023-05-16 15:30:43 more
  • 06~12-Esp8266物聯網芯片的使用(一)-part02/03-ESP8266開發環境、

    上一章主要作了芯片介紹,這一章主要作對開發環境的介紹。 認識Arduino Arduino是一款便捷靈活、方便上手的開源電子原型平臺。包含硬體(各種型號的Arduino板)和軟體(ArduinoIDE)。它構建于開放原始碼simple I/O介面版,并且具有使用類似Java、C語言的Processi ......

    uj5u.com 2023-05-16 15:30:35 more
  • Redis資料結構二之SDS和雙向鏈表

    本文首發于公眾號:Hunter后端 原文鏈接:Redis資料結構二之SDS和雙向鏈表 這一篇筆記介紹一下 SDS(simple dynamic string)和雙向鏈表。 以下是本篇筆記目錄: SDS 常數復雜度獲取字串長度 杜絕緩沖區溢位 減少修改字串帶來的記憶體重分配次數 二進制安全 兼容C字 ......

    uj5u.com 2023-05-16 15:30:27 more
  • Apache Arrow DataFusion原理與架構

    本篇主要介紹了一種使用Rust語言撰寫的查詢引擎——DataFusion,其使用了基于Arrow格式的記憶體模型,結合Rust語言本身的優勢,達成了非常優秀的性能指標 DataFusion是一個查詢引擎而非資料庫,因此其本身不具備存盤資料的能力。但正因為不依賴底層存盤的格式,使其成為了一個靈活可擴展的 ......

    uj5u.com 2023-05-16 15:30:16 more