• Модуль: perfmon
  • Путь к файлу: ~/bitrix/modules/perfmon/classes/general/query_stat.php
  • Класс: CPerfQueryStat
  • Вызов: CPerfQueryStat::GatherTableStat
static function GatherTableStat($table)
{
	global $DB;
	$table = trim($table, "`");

	$arStat = CPerfQueryStat::_get_stat($table);
	if (!$arStat)
	{
		$rs = $DB->Query("show table status like '".$DB->ForSQL($table)."'");
		$arDBStat = $rs->Fetch();
		$DB->Add("b_perf_tab_stat", $arStat = array(
			"TABLE_NAME" => $table,
			"TABLE_SIZE" => $arDBStat["Data_length"],
			"TABLE_ROWS" => $arDBStat["Rows"],
		));
	}
	return $arStat;
}