Search Query in eZSearchEngine

Author Message

Maxime Thomas

Monday 16 January 2006 8:15:49 am

Hi everybody,

Looking for some information on ez search engine, I've studied the mecanism of the ez engine and I did'nt understand what is doing this query in the seach function of the eZSearchEngine :

if ( $searchPartsArray == null )
            {
                 $db->createTempTable( "CREATE TEMPORARY TABLE ezsearch_tmp_0 ( contentobject_id int primary key not null, published int )" );
                 $db->query( "INSERT INTO ezsearch_tmp_0 SELECT DISTINCT ezsearch_object_word_link.contentobject_id, ezsearch_object_word_link.published
                                     FROM ezcontentobject,
                                          ezsearch_object_word_link
                                          $subTreeTable,
                                          ezcontentclass,
                                          ezcontentobject_tree
                                     WHERE
                                          $searchDateQuery
                                          $sectionQuery
                                          $classQuery
                                          $classAttributeQuery
                                          $subTreeSQL
                                          ezcontentobject.id=ezsearch_object_word_link.contentobject_id and
                                          ezcontentobject.contentclass_id = ezcontentclass.id and
                                          ezcontentclass.version = '0' and
                                          ezcontentobject.id = ezcontentobject_tree.contentobject_id and
                                          ezcontentobject_tree.node_id = ezcontentobject_tree.main_node_id
                                          $sqlPermissionCheckingString" );
                 $this->TempTablesCount = 1;
                 $i = $this->TempTablesCount;
            }

This means that this query is executed meanwhile there are no wordlinks in the ezsearch_object_word_link table. So, index are not used and mysql browses the whole table...

I think it is related to this bug.

http://ez.no/community/bugs/query_very_slow_in_ezsearch

Does anybody have an answer ?

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:16:13
Script start
Timing: Jan 31 2025 06:16:13
Module start 'layout'
Timing: Jan 31 2025 06:16:13
Module start 'content'
Timing: Jan 31 2025 06:16:14
Module end 'content'
Timing: Jan 31 2025 06:16:14
Script end

Main resources:

Total runtime1.1530 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 588.1328151.2109
Module start 'layout' 0.00820.0031 739.343836.6484
Module start 'content' 0.01131.1408 775.9922871.0469
Module end 'content' 1.15210.0009 1,647.03917.8516
Script end 1.1530  1,654.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2932160.0002
Check MTime0.00140.1174160.0001
Mysql Total
Database connection0.00080.068510.0008
Mysqli_queries1.099395.3398460.0239
Looping result0.00050.0472440.0000
Template Total1.091994.720.5460
Template load0.00240.208320.0012
Template processing1.089594.491020.5448
Template load and register function0.00110.095110.0011
states
state_id_array0.00530.458210.0053
state_identifier_array0.00240.210520.0012
Override
Cache load0.00190.1670110.0002
Sytem overhead
Fetch class attribute can translate value0.00120.102310.0012
Fetch class attribute name0.00170.150220.0009
XML
Image XML parsing0.00170.149910.0017
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00730.6292160.0005
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs