Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-7149

isDBMyISAM // DAO::getStorageValues takes a long time on large datasets

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2.5
    • Fix Version/s: 3.4.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      SHOW TABLE STATUS is a very expensive operation if you have large datasets, even if you use LIKE 'civicrm_%', it's sounds like it's the nature of the beast.
      therefor anything that calls this function will suffer a heavy delay.

      mysql> SHOW TABLE STATUS LIKE 'civicrm_%';
      .....
      177 rows in set (2.05 sec)
      mysql> Bye

      this doesnt seem to be able to be cached in mysql either.

      function getStorageValues( $tableName = null, $maxTablesToCheck = 10, $fieldName = 'Engine' )
      {
      $values = array( );
      $query = "SHOW TABLE STATUS LIKE %1";
      $params = array( );

      if ( isset($tableName) )

      { $params = array( 1 => array( $tableName, 'String' ) ); }

      else

      { $params = array( 1 => array( 'civicrm_%', 'String' ) ); }

      ...
      }

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              dgtlmoon leigh morresi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: