Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 3.4.3
-
Fix Version/s: 4.4.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
When I go to civicrm/contact/view?reset=1&cid=2715 over 90% of the query time on contact tab is going into CRM_Logging_Schema::_CONSTRUCT even though logging is not on on the site
From devel
Executed 191 queries in 4287.7 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted.
Of the 191 queries
4164.35 milliseconds
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test_wcan' AND TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME LIKE 'civicrm_%'
From
/**
- Populate $this->tables and $this->logs with current db state.
*/
function __construct()
{
require_once 'CRM/Contact/DAO/Contact.php';
$dao = new CRM_Contact_DAO_Contact( );
$civiDBName = $dao->_database;
$dao = CRM_Core_DAO::executeQuery("
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = '{$civiDBName}'
AND TABLE_TYPE = 'BASE TABLE'
AND TABLE_NAME LIKE 'civicrm_%'
");
There must be someway to cache / reduce the frequency of this?