Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
perf_informix Class Reference
Inheritance diagram for perf_informix:
adodb_perf

Public Member Functions

 __construct (&$conn)
 
 _CPULoad ()
 
 _DBParameter ($sql)
 
 _ExpensiveSQL ($numsql=10)
 
 _SuspiciousSQL ($numsql=10)
 
 CheckMemory ()
 
 clearsql ()
 
 CPULoad ()
 
 CreateLogTable ()
 
 DBParameter ($param)
 
 DoSQLForm ()
 
 ExpensiveSQL ($numsql=10)
 
 Explain ($sql, $partial=false)
 
 HealthCheck ($cli=false)
 
 HealthCheckCLI ()
 
 InvalidSQL ($numsql=10)
 
 MemInfo ()
 
 optimizeDatabase ()
 Reorganise current database.
 
 OptimizeTable ( $table, $mode=ADODB_OPT_LOW)
 Reorganise the table-indices/statistics/.
 
 OptimizeTables ()
 
 Poll ($secs=5)
 
 PollParameters ()
 
 SplitSQL ($sql)
 
 SuspiciousSQL ($numsql=10)
 
 Tables ($orderby='1')
 
 Tracer ($sql)
 
 UI ($pollsecs=5)
 
 WarnCacheRatio ($val)
 

Static Public Member Functions

static table ($newtable=false)
 

Public Attributes

 $_lastLoad
 
 $cliFormat = "%32s => %s r\n"
 
 $color = '#F0F0F0'
 
 $conn
 
 $createTableSQL
 
 $explain = true
 
 $helpurl = '<a href="https://adodb.org/dokuwiki/doku.php?id=v5:performance:logsql">LogSQL help</a>'
 
 $maxLength = 2000
 
 $settings
 
 $sql1 = 'sql1'
 
 $table = '<table border=1 bgcolor=white>'
 
 $tablesSQL = "select a.tabname tablename, ti_nptotal*2 size_in_k, ti_nextns extents, ti_nrows records from systables c, sysmaster:systabnames a, sysmaster:systabinfo b where c.tabname not matches 'sys*' and c.partnum = a.partnum and c.partnum = b.ti_partnum"
 
 $titles = '<tr><td><b>Parameter</b></td><td><b>Value</b></td><td><b>Description</b></td></tr>'
 
 $warnRatio = 90
 

Member Function Documentation

◆ optimizeDatabase()

adodb_perf::optimizeDatabase ( )
inherited

Reorganise current database.

Default implementation loops over all MetaTables() and optimize each using optmizeTable()

Author
Markus Staab
Return values
Returnstrue on success and false on error
Examples
/home/runner/work/phpdoc/phpdoc/.moodle/lib/adodb/adodb-perf.inc.php.

◆ OptimizeTable()

adodb_perf::OptimizeTable ( $table,
$mode = ADODB_OPT_LOW )
inherited

Reorganise the table-indices/statistics/.

. depending on the given mode. Default Implementation throws an error.

Parameters
stringtable name of the table to optimize
intmode optimization-mode ADODB_OPT_HIGH for full optimization ADODB_OPT_LOW for CPU-less optimization Default is LOW ADODB_OPT_LOW
Author
Markus Staab
Return values
Returnstrue on success and false on error
Examples
/home/runner/work/phpdoc/phpdoc/.moodle/lib/adodb/adodb-perf.inc.php.

◆ Tables()

adodb_perf::Tables ( $orderby = '1')
inherited

Reimplemented in perf_db2.

Member Data Documentation

◆ $createTableSQL

perf_informix::$createTableSQL
Initial value:
= "CREATE TABLE adodb_logsql (
created datetime year to second NOT NULL,
sql0 varchar(250) NOT NULL,
sql1 varchar(255) NOT NULL,
params varchar(255) NOT NULL,
tracer varchar(255) NOT NULL,
timer decimal(16,6) NOT NULL
)"

◆ $settings

perf_informix::$settings
Initial value:
= array(
'Ratios',
'data cache hit ratio' => array('RATIOH',
"select round((1-(wt.value / (rd.value + wr.value)))*100,2)
from sysmaster:sysprofile wr, sysmaster:sysprofile rd, sysmaster:sysprofile wt
where rd.name = 'pagreads' and
wr.name = 'pagwrites' and
wt.name = 'buffwts'",
'=WarnCacheRatio'),
'IO',
'data reads' => array('IO',
"select value from sysmaster:sysprofile where name='pagreads'",
'Page reads'),
'data writes' => array('IO',
"select value from sysmaster:sysprofile where name='pagwrites'",
'Page writes'),
'Connections',
'current connections' => array('SESS',
'select count(*) from sysmaster:syssessions',
'Number of sessions'),
false
)

The documentation for this class was generated from the following file: