Forums / Suggestions / eZKeyword optimization

eZKeyword optimization

Author Message

Piotrek Karaś

Friday 19 December 2008 6:26:26 am

Has anyone tried optimizing the ezkeyword queries (those that are generated while accessing content/keyword/... view)? It get's incredibly slow with only few thousands of relations, it practically eliminates it from any tagging-like use...

SELECT ezkeyword.keyword,ezcontentobject_tree.node_id FROM ezkeyword, ezkeyword_attribute_link,ezcontentobject_tree,ezcontentobject,ezcontentclass, ezcontentobject_attribute a1
WHERE
a1.version=ezcontentobject.current_version
AND a1.contentobject_id=ezcontentobject.id AND
ezkeyword.keyword LIKE 'whatever%'
AND ezcontentobject_tree.is_invisible = 0
AND ((ezcontentobject.section_id in (1, 2))

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Denitsa M.

Tuesday 12 May 2009 8:15:49 am

Hi,

anyone optimized the ezkeyword? it brings up index speed problem with sorl indexation for both ezfind and ezfind2 - the index time difference is huge when we have objects with ezkeyword attributes and when we do not have such objects (remove the ezkeyword attributes from the same objects). With ezkeywords server start to swap, mysql gets slow queries log filled up with calls to ezkeyword tables and index time is like up to 5-7 times greater than time when no ezkeyword attributes are used in classes. Also index size for the same objects with and without ezkeywords is enormous. In one case we have XXX BG of index data (with ezkeywords) and in the other case we have like under 100MB.

Iguana IT - http://www.iguanait.com

André R.

Tuesday 12 May 2009 10:11:55 am

Denitsa M.: Might help to set KeywordNodesCacheClearLimit setting in viewcache.ini, its a 4.1 feature though.

http://pubsvn.ez.no/nextgen/stable/4.1/settings/viewcache.ini

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Denitsa M.

Tuesday 12 May 2009 11:23:05 pm

Thanks, André,

still at 4.0 here, but I will look into that anyway, it will come the time to use :)

Denitsa

Iguana IT - http://www.iguanait.com

Piotrek Karaś

Sunday 27 September 2009 2:49:27 am

Denitsa M.: Might help to set KeywordNodesCacheClearLimit setting in viewcache.ini, its a 4.1 feature though.

Was that the major ezkeywords performance problem, Andre?

Cheers,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Marko Žmak

Tuesday 27 October 2009 11:28:46 am

I had the same problem on a site with more than 90.000 objects, most of them (90%) having 4 keywords attributes. To sullution was to switch to ezfind, but than we got another problem, the updatesearchindexsolr.php script takes a lot of time (about 6h) and crashes during indexing. I think it's related to this problem:

http://ez.no/developer/forum/extensions/ez_find/ezfind2_indexing_speed_incredibly_low_er/

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

eZ debug

Timing: Jan 15 2025 03:39:10
Script start
Timing: Jan 15 2025 03:39:10
Module start 'content'
Timing: Jan 15 2025 03:39:11
Module end 'content'
Timing: Jan 15 2025 03:39:11
Script end

Main resources:

Total runtime1.0504 sec
Peak memory usage6,144.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0092 685.5547214.8047
Module start 'content' 0.00920.9094 900.35941,943.8828
Module end 'content' 0.91860.1318 2,844.2422641.3047
Script end 1.0504  3,485.5469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00760.7256210.0004
Check MTime0.00160.1518210.0001
Mysql Total
Database connection0.00080.078510.0008
Mysqli_queries0.945289.98032000.0047
Looping result0.00220.21361970.0000
Template Total1.013496.520.5067
Template load0.00450.426320.0022
Template processing1.008996.049220.5045
Template load and register function0.00190.180010.0019
states
state_id_array0.00160.152910.0016
state_identifier_array0.00130.124720.0007
Override
Cache load0.00410.3912270.0002
Sytem overhead
Fetch class attribute can translate value0.00150.145150.0003
Fetch class attribute name0.00210.195390.0002
XML
Image XML parsing0.00210.202250.0004
class_abstraction
Instantiating content class attribute0.00000.0020100.0000
General
dbfile0.00120.1188370.0000
String conversion0.00000.003030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs