Index: branches/RC/core/install/install_schema.sql =================================================================== diff -u -N -r10399 -r10494 --- branches/RC/core/install/install_schema.sql (.../install_schema.sql) (revision 10399) +++ branches/RC/core/install/install_schema.sql (.../install_schema.sql) (revision 10494) @@ -537,3 +537,47 @@ KEY `Status` (`Status`), KEY PortalUserId (PortalUserId) ); + +CREATE TABLE StatisticsCapture ( + StatisticsId int(10) unsigned NOT NULL auto_increment, + TemplateName varchar(255) NOT NULL default '', + Hits int(10) unsigned NOT NULL default '0', + ScriptTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + ScriptTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + ScriptTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlCountMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlCountAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlCountMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + PRIMARY KEY (StatisticsId), + KEY TemplateName (TemplateName), + KEY Hits (Hits), + KEY ScriptTimeMin (ScriptTimeMin), + KEY ScriptTimeAvg (ScriptTimeAvg), + KEY ScriptTimeMax (ScriptTimeMax), + KEY SqlTimeMin (SqlTimeMin), + KEY SqlTimeAvg (SqlTimeAvg), + KEY SqlTimeMax (SqlTimeMax), + KEY SqlCountMin (SqlCountMin), + KEY SqlCountAvg (SqlCountAvg), + KEY SqlCountMax (SqlCountMax) +); + +CREATE TABLE SlowSqlCapture ( + CaptureId int(10) unsigned NOT NULL auto_increment, + TemplateNames text, + Hits int(10) unsigned NOT NULL default '0', + SqlQuery text, + TimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + TimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + TimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + QueryCrc int(11) NOT NULL default '0', + PRIMARY KEY (CaptureId), + KEY Hits (Hits), + KEY TimeMin (TimeMin), + KEY TimeAvg (TimeAvg), + KEY TimeMax (TimeMax), + KEY QueryCrc (QueryCrc) +); \ No newline at end of file Index: branches/RC/core/install/upgrades.sql =================================================================== diff -u -N -r10448 -r10494 --- branches/RC/core/install/upgrades.sql (.../upgrades.sql) (revision 10448) +++ branches/RC/core/install/upgrades.sql (.../upgrades.sql) (revision 10494) @@ -248,3 +248,47 @@ # ===== v 4.3.1 ===== INSERT INTO ConfigurationAdmin VALUES ('RememberLastAdminTemplate', 'la_Text_General', 'la_config_RememberLastAdminTemplate', 'checkbox', '', '', 10.13, 0, 0); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RememberLastAdminTemplate', '', 'In-Portal:Users', 'in-portal:configure_users'); + +CREATE TABLE StatisticsCapture ( + StatisticsId int(10) unsigned NOT NULL auto_increment, + TemplateName varchar(255) NOT NULL default '', + Hits int(10) unsigned NOT NULL default '0', + ScriptTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + ScriptTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + ScriptTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlCountMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlCountAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + SqlCountMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + PRIMARY KEY (StatisticsId), + KEY TemplateName (TemplateName), + KEY Hits (Hits), + KEY ScriptTimeMin (ScriptTimeMin), + KEY ScriptTimeAvg (ScriptTimeAvg), + KEY ScriptTimeMax (ScriptTimeMax), + KEY SqlTimeMin (SqlTimeMin), + KEY SqlTimeAvg (SqlTimeAvg), + KEY SqlTimeMax (SqlTimeMax), + KEY SqlCountMin (SqlCountMin), + KEY SqlCountAvg (SqlCountAvg), + KEY SqlCountMax (SqlCountMax) +); + +CREATE TABLE SlowSqlCapture ( + CaptureId int(10) unsigned NOT NULL auto_increment, + TemplateNames text, + Hits int(10) unsigned NOT NULL default '0', + SqlQuery text, + TimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + TimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + TimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', + QueryCrc int(11) NOT NULL default '0', + PRIMARY KEY (CaptureId), + KEY Hits (Hits), + KEY TimeMin (TimeMin), + KEY TimeAvg (TimeAvg), + KEY TimeMax (TimeMax), + KEY QueryCrc (QueryCrc) +); \ No newline at end of file Index: branches/RC/core/kernel/db/db_connection.php =================================================================== diff -u -N -r10491 -r10494 --- branches/RC/core/kernel/db/db_connection.php (.../db_connection.php) (revision 10491) +++ branches/RC/core/kernel/db/db_connection.php (.../db_connection.php) (revision 10494) @@ -7,6 +7,14 @@ class kDBConnection { /** + * Holds reference to global KernelApplication instance + * @access public + * @var kApplication + */ + var $Application; + + + /** * Current database type * * @var string @@ -72,6 +80,13 @@ var $debugMode = false; /** + * Save query execution statistics + * + * @var bool + */ + var $_captureStatistics = false; + + /** * Last query to database * * @var string @@ -85,7 +100,12 @@ */ var $_queryCount = 0; -// var $_queryLog = Array (); + /** + * Total time, used for serving queries + * + * @var Array + */ + var $_queryTime = 0; /** * Initializes connection class with @@ -97,6 +117,8 @@ */ function kDBConnection($dbType, $errorHandler = '') { + $this->Application =& kApplication::Instance(); + $this->dbType = $dbType; // $this->initMetaFunctions(); if (!$errorHandler) { @@ -105,6 +127,8 @@ else { $this->errorHandler = $errorHandler; } + + $this->_captureStatistics = defined('DBG_CAPTURE_STATISTICS') && DBG_CAPTURE_STATISTICS && !(defined('ADMIN') && ADMIN); } /** @@ -352,17 +376,17 @@ $this->_queryCount++; } - /*if (!array_key_exists($sql, $this->_queryLog)) { - $this->_queryLog[$sql] = 1; - } - else { - $this->_queryLog[$sql]++; - }*/ - if ($this->debugMode && !$no_debug) { return $this->debugQuery($sql,$key_field); } $query_func = $this->getMetaFunction('query'); + + // set 1st checkpoint: begin + if ($this->_captureStatistics) { + $start_time = getmicrotime(); + } + // set 1st checkpoint: end + $this->queryID = $query_func($sql,$this->connectionID); if (is_resource($this->queryID)) { $ret = Array(); @@ -377,9 +401,27 @@ $ret[] = $row; } } + + // set 2nd checkpoint: begin + if ($this->_captureStatistics) { + $query_time = getmicrotime() - $start_time; + if ($query_time > DBG_MAX_SQL_TIME && !$no_debug) { + $this->Application->logSlowQuery($sql, $query_time); + } + $this->_queryTime += $query_time; + } + // set 2nd checkpoint: end + $this->Destroy(); return $ret; } + else { + // set 2nd checkpoint: begin + if ($this->_captureStatistics) { + $this->_queryTime += getmicrotime() - $start_time; + } + // set 2nd checkpoint: end + } $this->showError($sql); return false; } @@ -423,14 +465,16 @@ $ret[] = $row; } } + // set 2nd checkpoint: begin $first_cell = count($ret) == 1 && count(current($ret)) == 1 ? current(current($ret)) : null; if ($profileSQLs) { $debugger->profileFinish('sql_'.$queryID, null, null, $this->getAffectedRows(), $first_cell, $this->_queryCount); $debugger->profilerAddTotal('sql', 'sql_'.$queryID); } - $this->Destroy(); // set 2nd checkpoint: end + + $this->Destroy(); return $ret; } else { @@ -617,5 +661,15 @@ return $table_found[$table_name]; } + + /** + * Returns query processing statistics + * + * @return Array + */ + function getQueryStatistics() + { + return Array ('time' => $this->_queryTime, 'count' => $this->_queryCount); + } } ?> \ No newline at end of file Index: branches/RC/core/units/categories/categories_config.php =================================================================== diff -u -N -r10455 -r10494 --- branches/RC/core/units/categories/categories_config.php (.../categories_config.php) (revision 10455) +++ branches/RC/core/units/categories/categories_config.php (.../categories_config.php) (revision 10494) @@ -244,6 +244,8 @@ ) ), + 'CacheModRewrite' => true, + 'Fields' => Array ( 'CategoryId' => Array('type' => 'int','not_null' => 1,'default' => 0), Index: branches/RC/admin/install/inportal_remove.sql =================================================================== diff -u -N -r10461 -r10494 --- branches/RC/admin/install/inportal_remove.sql (.../inportal_remove.sql) (revision 10461) +++ branches/RC/admin/install/inportal_remove.sql (.../inportal_remove.sql) (revision 10494) @@ -231,4 +231,8 @@ DROP TABLE LinkVisits # -------------------------------------------------------- DROP TABLE RelatedSearches +# -------------------------------------------------------- +DROP TABLE StatisticsCapture +# -------------------------------------------------------- +DROP TABLE SlowSqlCapture # \ No newline at end of file Index: branches/RC/core/kernel/nparser/nparser.php =================================================================== diff -u -N -r10027 -r10494 --- branches/RC/core/kernel/nparser/nparser.php (.../nparser.php) (revision 10027) +++ branches/RC/core/kernel/nparser/nparser.php (.../nparser.php) (revision 10494) @@ -31,7 +31,7 @@ $this->Buffers[0] = '\n"; // finding all the tags - $reg = '(.*?)(<[\\/]?)inp2:([^>]*?)([\\/]?>(\r\n){0,1})'; + $reg = '(.*?)(<[\\/]?)inp2:([^>]*?)([\\/]?>)(\r\n){0,1}'; preg_match_all('/'.$reg.'/s', $data, $results, PREG_SET_ORDER + PREG_OFFSET_CAPTURE); $this->InsideComment = false; Index: branches/RC/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r10356 -r10494 --- branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 10356) +++ branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 10494) @@ -496,8 +496,15 @@ $block_params['not_last'] = !$block_params['is_last']; // for front-end if ($cache_mod_rw) { - $this->Application->setCache('filenames', $this->Prefix.'_'.$list->GetDBField($id_field), $list->GetDBField('Filename')); - $this->Application->setCache('filenames', 'c_'.$list->GetDBField('CategoryId'), $list->GetDBField('CategoryFilename')); + if ($this->Prefix == 'c') { + // for listing subcategories in category + $this->Application->setCache('filenames', $this->Prefix.'_'.$list->GetDBField($id_field), $list->GetDBField('NamedParentPath')); + $this->Application->setCache('category_tree', $list->GetDBField($id_field), $list->GetDBField('TreeLeft') . ';' . $list->GetDBField('TreeRight')); + } else { + // for listing items in category + $this->Application->setCache('filenames', 'c_'.$list->GetDBField('CategoryId'), $list->GetDBField('CategoryFilename')); + $this->Application->setCache('filenames', $this->Prefix.'_'.$list->GetDBField($id_field), $list->GetDBField('Filename')); + } } if ($i % $columns == 0) { Index: branches/RC/admin/install/upgrades/inportal_upgrade_v4.3.1.sql =================================================================== diff -u -N -r10493 -r10494 --- branches/RC/admin/install/upgrades/inportal_upgrade_v4.3.1.sql (.../inportal_upgrade_v4.3.1.sql) (revision 10493) +++ branches/RC/admin/install/upgrades/inportal_upgrade_v4.3.1.sql (.../inportal_upgrade_v4.3.1.sql) (revision 10494) @@ -4,6 +4,9 @@ INSERT INTO ConfigurationAdmin VALUES ('RememberLastAdminTemplate', 'la_Text_General', 'la_config_RememberLastAdminTemplate', 'checkbox', '', '', 10.13, 0, 0); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RememberLastAdminTemplate', '', 'In-Portal:Users', 'in-portal:configure_users'); +CREATE TABLE StatisticsCapture (StatisticsId int(10) unsigned NOT NULL auto_increment, TemplateName varchar(255) NOT NULL default '', Hits int(10) unsigned NOT NULL default '0', ScriptTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', ScriptTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', ScriptTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', SqlTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', SqlTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', SqlTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', SqlCountMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', SqlCountAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', SqlCountMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', PRIMARY KEY (StatisticsId), KEY TemplateName (TemplateName), KEY Hits (Hits), KEY ScriptTimeMin (ScriptTimeMin), KEY ScriptTimeAvg (ScriptTimeAvg), KEY ScriptTimeMax (ScriptTimeMax), KEY SqlTimeMin (SqlTimeMin), KEY SqlTimeAvg (SqlTimeAvg), KEY SqlTimeMax (SqlTimeMax), KEY SqlCountMin (SqlCountMin), KEY SqlCountAvg (SqlCountAvg), KEY SqlCountMax (SqlCountMax)); +CREATE TABLE SlowSqlCapture (CaptureId int(10) unsigned NOT NULL auto_increment, TemplateNames text, Hits int(10) unsigned NOT NULL default '0', SqlQuery text, TimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', TimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', TimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000', QueryCrc int(11) NOT NULL default '0', PRIMARY KEY (CaptureId), KEY Hits (Hits), KEY TimeMin (TimeMin), KEY TimeAvg (TimeAvg), KEY TimeMax (TimeMax), KEY QueryCrc (QueryCrc)); + DELETE FROM Cache WHERE VarName = 'sections_parsed'; UPDATE Modules SET Version = '4.3.1' WHERE Name = 'Core'; Index: branches/RC/core/kernel/utility/cache.php =================================================================== diff -u -N -r8929 -r10494 --- branches/RC/core/kernel/utility/cache.php (.../cache.php) (revision 8929) +++ branches/RC/core/kernel/utility/cache.php (.../cache.php) (revision 10494) @@ -1,23 +1,23 @@ Conn =& $this->Application->GetADODBConnection(); + function kCache() { + parent::kBase(); $this->debugCache = $this->Application->isDebugMode() && constOn('DBG_CACHE'); + + $this->_storage = new CacheStorage(); } /** @@ -29,9 +29,7 @@ */ function setCache($cache_name, $key, $value) { - $cache = $this->Get($cache_name, Array()); - $cache[$key] = $value; - $this->Set($cache_name, $cache); + $this->_storage->set($cache_name, $key, $value); } /** @@ -43,8 +41,7 @@ */ function getCache($cache_name, $key) { - $cache = $this->Get($cache_name, Array()); - $ret = getArrayValue($cache, $key); + $ret = $this->_storage->get($cache_name, $key); $this->setStatistics($cache_name, $key, $ret); @@ -53,14 +50,16 @@ function setStatistics($cache_name, $key, $found) { - if (!$this->debugCache) return true; + if (!$this->debugCache) { + return true; + } - if (!isset($this->statistics[$cache_name])) { - $this->statistics[$cache_name] = Array(); + if (!array_key_exists($cache_name, $this->statistics)) { + $this->statistics[$cache_name] = Array (); } - if (!isset($this->statistics[$cache_name][$key])) { - $this->statistics[$cache_name][$key] = Array(); + if (!array_key_exists($key, $this->statistics[$cache_name])) { + $this->statistics[$cache_name][$key] = Array (); } $status_key = $found ? 'found' : 'not_found'; @@ -73,17 +72,40 @@ function printStatistics() { + $cache_size = strlen(serialize($this->_storage)); + + $this->Application->Debugger->appendHTML('Cache Size: ' . formatSize($cache_size) . ' (' . $cache_size . ')'); + foreach ($this->statistics as $cache_name => $cache_data) { foreach ($cache_data as $key => $value) { - if (!isset($value['found']) || $value['found'] == 1) { + if (!array_key_exists('found', $value) || $value['found'] == 1) { // remove cached records, that were used only 1 or 2 times unset($this->statistics[$cache_name][$key]); } } } - print_pre($this->statistics); + print_pre($this->statistics, 'Cache Statistics:'); } } + class CacheStorage extends Params { + + function set($cache_name, $key, $value) + { + $cache = parent::Get($cache_name, Array()); + $cache[$key] = $value; + + parent::Set($cache_name, $cache); + } + + function get($cache_name, $key) + { + $cache = parent::Get($cache_name, Array()); + $ret = array_key_exists($key, $cache) ? $cache[$key] : false; + + return $ret; + } + } + ?> \ No newline at end of file Index: branches/RC/core/kernel/application.php =================================================================== diff -u -N -r10459 -r10494 --- branches/RC/core/kernel/application.php (.../application.php) (revision 10459) +++ branches/RC/core/kernel/application.php (.../application.php) (revision 10494) @@ -593,12 +593,14 @@ } // this allows to save 2 sql queries for each category - $sql = 'SELECT NamedParentPath, CachedCategoryTemplate + $sql = 'SELECT NamedParentPath, CachedCategoryTemplate, TreeLeft, TreeRight FROM '.$table.' WHERE '.$id_field.' = '.$this->Conn->qstr($id); $category_data = $this->Conn->GetRow($sql); $filename = $category_data['NamedParentPath']; $this->setCache('category_templates', $id, $category_data['CachedCategoryTemplate']); + $this->setCache('category_tree', $id, $category_data['TreeLeft'] . ';' . $category_data['TreeRight']); + // $this->setCache('item_templates', $id, $category_data['CachedItemTemplate']); } else { @@ -633,6 +635,8 @@ function setCache($cache_name, $key, $value) { $cache =& $this->recallObject('Cache'); + /* @var $cache kCache */ + $cache->setCache($cache_name, $key, $value); } @@ -799,20 +803,6 @@ $this->Debugger->appendMemoryUsage('Application before Done:'); } - - /*$dupe_queries = Array (); - foreach ($this->Conn->_queryLog as $sql => $repeat_count) { - if ($repeat_count > 1) { - $dupe_queries[] = Array ( - 'sql' => $this->Debugger->formatSQL($sql), - 'dupe_count' => $repeat_count - 1, - ); - } - } - - print_pre($dupe_queries, 'Duplicate SQLs', true);*/ - - if ($this->GetVar('admin')) { $reg = '/('.preg_quote(BASE_PATH, '/').'.*\.html)(#.*){0,1}(")/sU'; $this->HTML = preg_replace($reg, "$1?admin=1$2$3", $this->HTML); @@ -824,6 +814,11 @@ $this->EventManager->RunRegularEvents(reAFTER); $this->Session->SaveData(); + if (constOn('DBG_CACHE')) { + $cache =& $this->recallObject('Cache'); + $cache->printStatistics(); + } + $this->HTML = ob_get_clean() . $this->HTML . $this->Debugger->printReport(true); } else { @@ -844,16 +839,101 @@ flush(); - if ($this->isDebugMode() && constOn('DBG_CACHE')) { - $cache =& $this->recallObject('Cache'); - $cache->printStatistics(); - } - $this->EventManager->RunRegularEvents(reAFTER); $this->Session->SaveData(); + + if (defined('DBG_CAPTURE_STATISTICS') && DBG_CAPTURE_STATISTICS && !$this->IsAdmin()) { + $this->_storeStatistics(); + } } /** + * Stores script execution statistics to database + * + */ + function _storeStatistics() + { + global $start; + + $script_time = getmicrotime() - $start; + $query_statistics = $this->Conn->getQueryStatistics(); // time & count + + $sql = 'SELECT * + FROM ' . TABLE_PREFIX . 'StatisticsCapture + WHERE TemplateName = "' . $this->GetVar('t') . '"'; + $data = $this->Conn->GetRow($sql); + + if ($data) { + $this->_updateAverageStatistics($data, 'ScriptTime', $script_time); + $this->_updateAverageStatistics($data, 'SqlTime', $query_statistics['time']); + $this->_updateAverageStatistics($data, 'SqlCount', $query_statistics['count']); + + $data['Hits']++; + + $this->Conn->doUpdate($data, TABLE_PREFIX . 'StatisticsCapture', 'StatisticsId = ' . $data['StatisticsId']); + } + else { + $data['ScriptTimeMin'] = $data['ScriptTimeAvg'] = $data['ScriptTimeMax'] = $script_time; + $data['SqlTimeMin'] = $data['SqlTimeAvg'] = $data['SqlTimeMax'] = $query_statistics['time']; + $data['SqlCountMin'] = $data['SqlCountAvg'] = $data['SqlCountMax'] = $query_statistics['count']; + $data['TemplateName'] = $this->GetVar('t'); + $data['Hits'] = 1; + $this->Conn->doInsert($data, TABLE_PREFIX . 'StatisticsCapture'); + } + } + + /** + * Calculates average time for statistics + * + * @param Array $data + * @param string $field_prefix + * @param float $current_value + */ + function _updateAverageStatistics(&$data, $field_prefix, $current_value) + { + $data[$field_prefix . 'Avg'] = (($data['Hits'] * $data[$field_prefix . 'Avg']) + $current_value) / ($data['Hits'] + 1); + + if ($current_value < $data[$field_prefix . 'Min']) { + $data[$field_prefix . 'Min'] = $current_value; + } + + if ($current_value > $data[$field_prefix . 'Max']) { + $data[$field_prefix . 'Max'] = $current_value; + } + } + + function logSlowQuery($slow_sql, $time) + { + $query_crc = crc32($slow_sql); + + $sql = 'SELECT * + FROM ' . TABLE_PREFIX . 'SlowSqlCapture + WHERE QueryCrc = ' . $query_crc; + $data = $this->Conn->Query($sql, null, true); + + if ($data) { + $this->_updateAverageStatistics($data, 'Time', $time); + + $template_names = explode(',', $data['TemplateNames']); + array_push($template_names, $this->GetVar('t')); + $data['TemplateNames'] = implode(',', array_unique($template_names)); + + $data['Hits']++; + + $this->Conn->doUpdate($data, TABLE_PREFIX . 'SlowSqlCapture', 'CaptureId = ' . $data['CaptureId']); + } + else { + $data['TimeMin'] = $data['TimeAvg'] = $data['TimeMax'] = $time; + $data['SqlQuery'] = $slow_sql; + $data['QueryCrc'] = $query_crc; + $data['TemplateNames'] = $this->GetVar('t'); + $data['Hits'] = 1; + + $this->Conn->doInsert($data, TABLE_PREFIX . 'SlowSqlCapture'); + } + } + + /** * Checks if output compression options is available * * @return string