Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-9254

eZ publish crashes because of missing database index on ezsearch_return_count

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.9.0rc2
    • 3.6.10, 3.6.11, 3.6.9, 3.7.7, 3.7.8, 3.7.9, 3.8.2, 3.8.3, 3.8.4, 3.8.6, 3.9.0alpha1, 3.9.0rc1
    • None
    • Operating System: Linux
      PHP Version: 4.4
      Database and version:

    Description

      If you add this index:

      alter table ezsearch_return_count add key ( phrase_id, count );
      

      search stats will speed up significantly.

      For example the search stats based on the ez.no database (more than 2 million queries) will speed up to around 55 seconds instead of crashing after maximum execution time (300 seconds) (both values on my local machine).

      Denormalisation of the database (saving the search count and perhaps added result count) should be even much faster. A patch shouldn't be that much:

      • database schema alteration of ezsearch_search_phrase
      • some small changes of sql statements in classes/ezsearchlog.php
      • update script for search stat tables
      • ezsearch_return_count and related code could be deleted as the additional time information is not used (of course the table and functionality can be kept for BC)

      If such a patch would go into 3.9/trunc, I would provide it till tomorrow.

      Have a nice day

      Thomas

      Attachments

        Activity

          People

            a29ca475-2ac3-469b-95ea-e37ca79eae29@accounts.ibexa.co Sergiy Pushchin
            to_nu to_nu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: