From: Christopher Kings-L. <ch...@us...> - 2004-03-07 06:54:34
|
Update of /cvsroot/phppgadmin/webdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2563 Modified Files: Tag: REL_3-3 HISTORY info.php Log Message: backpatches for 3.3.1 release Index: HISTORY =================================================================== RCS file: /cvsroot/phppgadmin/webdb/HISTORY,v retrieving revision 1.140 retrieving revision 1.140.2.1 diff -C2 -d -r1.140 -r1.140.2.1 *** HISTORY 25 Feb 2004 01:17:41 -0000 1.140 --- HISTORY 7 Mar 2004 06:39:05 -0000 1.140.2.1 *************** *** 2,5 **** --- 2,14 ---- ------------------ + Version 3.3.1 + ------------- + + Bugs + * Fix table stats for <= 7.2 + + Translations + * Spanish from Martin + Version 3.3 ----------- Index: info.php =================================================================== RCS file: /cvsroot/phppgadmin/webdb/info.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** info.php 2 Jan 2004 12:53:36 -0000 1.5 --- info.php 7 Mar 2004 06:39:05 -0000 1.5.2.1 *************** *** 28,41 **** $parents = &$data->getTableParents($_REQUEST['table']); $children = &$data->getTableChildren($_REQUEST['table']); ! $tablestatstups = &$data->getStatsTableTuples($_REQUEST['table']); ! $tablestatsio = &$data->getStatsTableIO($_REQUEST['table']); ! $indexstatstups = &$data->getStatsIndexTuples($_REQUEST['table']); ! $indexstatsio = &$data->getStatsIndexIO($_REQUEST['table']); ! // Check that there is some info if (($referrers === -99 || ($referrers !== -99 && $referrers->recordCount() == 0)) && $parents->recordCount() == 0 && $children->recordCount() == 0 ! && $tablestatstups->recordCount() == 0 && $tablestatsio->recordCount() == 0 ! && $indexstatstups->recordCount() == 0 && $indexstatsio->recordCount() == 0) { $misc->printMsg($lang['strnoinfo']); } --- 28,44 ---- $parents = &$data->getTableParents($_REQUEST['table']); $children = &$data->getTableChildren($_REQUEST['table']); ! if ($data->hasStatsCollector()) { ! $tablestatstups = &$data->getStatsTableTuples($_REQUEST['table']); ! $tablestatsio = &$data->getStatsTableIO($_REQUEST['table']); ! $indexstatstups = &$data->getStatsIndexTuples($_REQUEST['table']); ! $indexstatsio = &$data->getStatsIndexIO($_REQUEST['table']); ! } ! // Check that there is some info if (($referrers === -99 || ($referrers !== -99 && $referrers->recordCount() == 0)) && $parents->recordCount() == 0 && $children->recordCount() == 0 ! && (!$data->hasStatsCollector() || ! ($tablestatstups->recordCount() == 0 && $tablestatsio->recordCount() == 0 ! && $indexstatstups->recordCount() == 0 && $indexstatsio->recordCount() == 0))) { $misc->printMsg($lang['strnoinfo']); } *************** *** 137,303 **** } ! // Row performance ! if ($tablestatstups->recordCount() > 0) { ! echo "<h3>{$lang['strrowperf']}</h3>\n"; ! ! echo "<table>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\" colspan=\"2\">{$lang['strsequential']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"2\">{$lang['strindex']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strrows2']}</th>\n"; ! echo "\t</tr>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\">{$lang['strscan']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strread']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strscan']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strfetch']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strinsert']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strupdate']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdelete']}</th>\n"; ! echo "\t</tr>\n"; ! $i = 0; ! ! while (!$tablestatstups->EOF) { ! $id = ( ($i % 2 ) == 0 ? '1' : '2' ); ! echo "\t<tr>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['seq_scan'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['seq_tup_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['idx_scan'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['idx_tup_fetch'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['n_tup_ins'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['n_tup_upd'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['n_tup_del'], true, 'int4'), "</td>\n"; ! echo "\t</tr>\n"; ! $tablestatstups->movenext(); ! $i++; ! } ! ! echo "</table>\n"; ! } ! ! // I/O performance ! if ($tablestatsio->recordCount() > 0) { ! echo "<h3>{$lang['strioperf']}</h3>\n"; ! ! echo "<table>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strheap']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strindex']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strtoast']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strtoastindex']}</th>\n"; ! echo "\t</tr>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t</tr>\n"; ! $i = 0; ! ! while (!$tablestatsio->EOF) { ! $id = ( ($i % 2 ) == 0 ? '1' : '2' ); ! echo "\t<tr>\n"; ! ! $total = $tablestatsio->f['heap_blks_hit'] + $tablestatsio->f['heap_blks_read']; ! if ($total > 0) $percentage = round(($tablestatsio->f['heap_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['heap_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['heap_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! ! $total = $tablestatsio->f['idx_blks_hit'] + $tablestatsio->f['idx_blks_read']; ! if ($total > 0) $percentage = round(($tablestatsio->f['idx_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['idx_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['idx_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! ! $total = $tablestatsio->f['toast_blks_hit'] + $tablestatsio->f['toast_blks_read']; ! if ($total > 0) $percentage = round(($tablestatsio->f['toast_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['toast_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['toast_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! ! $total = $tablestatsio->f['tidx_blks_hit'] + $tablestatsio->f['tidx_blks_read']; ! if ($total > 0) $percentage = round(($tablestatsio->f['tidx_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['tidx_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['tidx_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! echo "\t</tr>\n"; ! $tablestatsio->movenext(); ! $i++; ! } ! ! echo "</table>\n"; ! } ! ! // Index row performance ! if ($indexstatstups->recordCount() > 0) { ! echo "<h3>{$lang['stridxrowperf']}</h3>\n"; ! ! echo "<table>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\">{$lang['strindex']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strscan']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strread']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strfetch']}</th>\n"; ! echo "\t</tr>\n"; ! $i = 0; ! ! while (!$indexstatstups->EOF) { ! $id = ( ($i % 2 ) == 0 ? '1' : '2' ); ! echo "\t<tr>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatstups->f['indexrelname']), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatstups->f['idx_scan'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatstups->f['idx_tup_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatstups->f['idx_tup_fetch'], true, 'int4'), "</td>\n"; ! echo "\t</tr>\n"; ! $indexstatstups->movenext(); ! $i++; ! } ! ! echo "</table>\n"; ! } ! ! // Index I/0 performance ! if ($indexstatsio->recordCount() > 0) { ! echo "<h3>{$lang['stridxioperf']}</h3>\n"; ! ! echo "<table>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\">{$lang['strindex']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t</tr>\n"; ! $i = 0; ! ! while (!$indexstatsio->EOF) { ! $id = ( ($i % 2 ) == 0 ? '1' : '2' ); ! echo "\t<tr>\n"; ! $total = $indexstatsio->f['idx_blks_hit'] + $indexstatsio->f['idx_blks_read']; ! if ($total > 0) $percentage = round(($indexstatsio->f['idx_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatsio->f['indexrelname']), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatsio->f['idx_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatsio->f['idx_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! echo "\t</tr>\n"; ! $indexstatsio->movenext(); ! $i++; ! } ! ! echo "</table>\n"; ! } } } --- 140,308 ---- } ! if ($data->hasStatsCollector()) { ! // Row performance ! if ($tablestatstups->recordCount() > 0) { ! echo "<h3>{$lang['strrowperf']}</h3>\n"; ! ! echo "<table>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\" colspan=\"2\">{$lang['strsequential']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"2\">{$lang['strindex']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strrows2']}</th>\n"; ! echo "\t</tr>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\">{$lang['strscan']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strread']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strscan']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strfetch']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strinsert']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strupdate']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdelete']}</th>\n"; ! echo "\t</tr>\n"; ! $i = 0; ! ! while (!$tablestatstups->EOF) { ! $id = ( ($i % 2 ) == 0 ? '1' : '2' ); ! echo "\t<tr>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['seq_scan'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['seq_tup_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['idx_scan'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['idx_tup_fetch'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['n_tup_ins'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['n_tup_upd'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatstups->f['n_tup_del'], true, 'int4'), "</td>\n"; ! echo "\t</tr>\n"; ! $tablestatstups->movenext(); ! $i++; ! } ! ! echo "</table>\n"; ! } ! ! // I/O performance ! if ($tablestatsio->recordCount() > 0) { ! echo "<h3>{$lang['strioperf']}</h3>\n"; ! ! echo "<table>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strheap']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strindex']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strtoast']}</th>\n"; ! echo "\t\t<th class=\"data\" colspan=\"3\">{$lang['strtoastindex']}</th>\n"; ! echo "\t</tr>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t</tr>\n"; ! $i = 0; ! ! while (!$tablestatsio->EOF) { ! $id = ( ($i % 2 ) == 0 ? '1' : '2' ); ! echo "\t<tr>\n"; ! ! $total = $tablestatsio->f['heap_blks_hit'] + $tablestatsio->f['heap_blks_read']; ! if ($total > 0) $percentage = round(($tablestatsio->f['heap_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['heap_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['heap_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! ! $total = $tablestatsio->f['idx_blks_hit'] + $tablestatsio->f['idx_blks_read']; ! if ($total > 0) $percentage = round(($tablestatsio->f['idx_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['idx_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['idx_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! ! $total = $tablestatsio->f['toast_blks_hit'] + $tablestatsio->f['toast_blks_read']; ! if ($total > 0) $percentage = round(($tablestatsio->f['toast_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['toast_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['toast_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! ! $total = $tablestatsio->f['tidx_blks_hit'] + $tablestatsio->f['tidx_blks_read']; ! if ($total > 0) $percentage = round(($tablestatsio->f['tidx_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['tidx_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($tablestatsio->f['tidx_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! echo "\t</tr>\n"; ! $tablestatsio->movenext(); ! $i++; ! } ! ! echo "</table>\n"; ! } ! ! // Index row performance ! if ($indexstatstups->recordCount() > 0) { ! echo "<h3>{$lang['stridxrowperf']}</h3>\n"; ! ! echo "<table>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\">{$lang['strindex']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strscan']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strread']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strfetch']}</th>\n"; ! echo "\t</tr>\n"; ! $i = 0; ! ! while (!$indexstatstups->EOF) { ! $id = ( ($i % 2 ) == 0 ? '1' : '2' ); ! echo "\t<tr>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatstups->f['indexrelname']), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatstups->f['idx_scan'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatstups->f['idx_tup_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatstups->f['idx_tup_fetch'], true, 'int4'), "</td>\n"; ! echo "\t</tr>\n"; ! $indexstatstups->movenext(); ! $i++; ! } ! ! echo "</table>\n"; ! } ! ! // Index I/0 performance ! if ($indexstatsio->recordCount() > 0) { ! echo "<h3>{$lang['stridxioperf']}</h3>\n"; ! ! echo "<table>\n"; ! echo "\t<tr>\n"; ! echo "\t\t<th class=\"data\">{$lang['strindex']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strdisk']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strcache']}</th>\n"; ! echo "\t\t<th class=\"data\">{$lang['strpercent']}</th>\n"; ! echo "\t</tr>\n"; ! $i = 0; ! ! while (!$indexstatsio->EOF) { ! $id = ( ($i % 2 ) == 0 ? '1' : '2' ); ! echo "\t<tr>\n"; ! $total = $indexstatsio->f['idx_blks_hit'] + $indexstatsio->f['idx_blks_read']; ! if ($total > 0) $percentage = round(($indexstatsio->f['idx_blks_hit'] / $total) * 100); ! else $percentage = 0; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatsio->f['indexrelname']), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatsio->f['idx_blks_read'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">", $misc->printVal($indexstatsio->f['idx_blks_hit'], true, 'int4'), "</td>\n"; ! echo "\t\t<td class=\"data{$id}\">({$percentage}{$lang['strpercent']})</td>\n"; ! echo "\t</tr>\n"; ! $indexstatsio->movenext(); ! $i++; ! } ! ! echo "</table>\n"; ! } ! } } } |