Changeset 34 for trunk/phpgwapi/inc/adodb/perf/perf-postgres.inc.php
- Timestamp:
- 06/29/07 15:17:46 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/adodb/perf/perf-postgres.inc.php
r2 r34 2 2 3 3 /* 4 V4. 51 29 July 2004 (c) 2000-2004 John Lim (jlim@natsoft.com.my). All rights reserved.4 V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved. 5 5 Released under both BSD license and Lesser GPL library license. 6 6 Whenever there is any discrepancy between the two licenses, … … 43 43 'Value must be TRUE to enable hit ratio statistics (<i>stats_start_collector</i>,<i>stats_row_level</i> and <i>stats_block_level</i> must be set to true in postgresql.conf)'), 44 44 'data cache hit ratio' => array('RATIO', 45 "select case when blks_hit=0 then 0 else (1-blks_read::float/blks_hit)*100end from pg_stat_database where datname='\$DATABASE'",45 "select case when blks_hit=0 then 0 else round( ((1-blks_read::float/blks_hit)*100)::numeric, 2) end from pg_stat_database where datname='\$DATABASE'", 46 46 '=WarnCacheRatio'), 47 47 'IO', … … 50 50 ), 51 51 'data writes' => array('IO', 52 'select sum(n_tup_ins/4.0+n_tup_upd/8.0+n_tup_del/4.0)/16from pg_stat_user_tables',52 'select round((sum(n_tup_ins/4.0+n_tup_upd/8.0+n_tup_del/4.0)/16)::numeric,2) from pg_stat_user_tables', 53 53 'Count of inserts/updates/deletes * coef'), 54 54 … … 67 67 '(effective cache size)' ), 68 68 'Memory Usage', 69 'sort buffer size' => array('CACHE', 70 "select setting::integer*1024 from pg_settings where name='sort_mem'", 69 # Postgres 7.5 changelog: Rename server parameters SortMem and VacuumMem to work_mem and maintenance_work_mem; 70 'sort/work buffer size' => array('CACHE', 71 "select setting::integer*1024 from pg_settings where name='sort_mem' or name = 'work_mem' order by name", 71 72 'Size of sort buffer (per query)' ), 72 73 'Connections',
Note: See TracChangeset
for help on using the changeset viewer.