Forums / General / upgrade to 3.5.1 : deleting takes 10 minutes?...

upgrade to 3.5.1 : deleting takes 10 minutes?...

Author Message

Gioele Agostinelli

Saturday 05 March 2005 8:34:55 pm

Hi folks,

i just upgrade from 3.2.3 to 3.5.1. Everything seems fine but when i try to delete something (an article for example) it takes around 10 minutes! After investigation i always have a query similar to this one running when deleting:

| Query | 569 | Copying to tmp table | INSERT INTO eznode_count
SELECT
count( ezcot.main_node_id ) AS count
FROM
ezcontentobject_tree ezcot RIGHT JOIN
ezcontentobject_tree ezcot_all ON ezcot.main_node_id = ezcot_all.main_node_id
WHERE
ezcot.path_string like '/1/2/13540/%' and
ezcot.node_id != 13540
GROUP BY ezcot_all.main_node_id |

I'm on mysql 3.23.58. I have a large site with a lot of articles but i think that 10 minutes isn't normal... Thanks for the help and have a nice day!

Gioele

Raymond Bosman

Wednesday 09 March 2005 4:52:37 am

Ten minutes is not normal indeed. Can you check whether the main_node_id field of the ezcontentobject_tree table has an index?

If not create one on the main_node_id, this will definitely save a lot of time.

Raymond

Gioele Agostinelli

Wednesday 09 March 2005 1:10:08 pm

Hi Raymond,

Thank you for your suggestion, I added an index on main_node_id and now deletion of an object takes less then a second. The index isn't part of the sql schema by default; I think it should be a good idea to add it by default in next version of ez.

I also have another suggestion, I don't know if it is 100% bullet-proof but here it is anyway....

If I understood correctly, the query that was taking for ever is in subtreeSoleNodeCount(). This function is called by removeSubtrees() in kernel/classes/ezcontentobjecttreenode.php. If the object you are trying to delete isn't a container there shouldn't be any subtree and therefore no need to call the function subtreeSoleNodeCount() since it should always return 0. So I replaced the call of subtreeSoleNodeCount() in removeSubtrees() by :

if ( !$class->attribute( 'is_container' ) )
{
$soleNodeCount =0;
}
else
{
$soleNodeCount = $node->subtreeSoleNodeCount();
}

Since the only objects that I delete are articles which are not container on my site, deletion time returned to normal.

The modification is a bit dirty since the verification should be done in subtreeSoleNodeCount() and not in removeSubtrees()... but I was in a hurry... I'm sure you get the idea... there is no need to run the query if the object is not a container.

If I'm correct maybe it would be a good idea to add this kind of verification in next version of ez also.

Thank you again for your suggestion and have nice day!

Gioele

Jan Borsodi

Friday 11 March 2005 1:45:25 am

The <i>is_container</i> flag is merely meant as a user-interface hint than a strict rule for objects. This means that it is quite possible for an object to have children (e.g comments).

The reason why we check for children for all objects is to give the user feedback on how many children are going to be deleted. If we add this check children may be accidently removed.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Ekkehard Dörre

Monday 29 August 2005 5:59:58 am

Same Problem with 3.5.3
MySQL 3.23.49-log debian 40 sec., creating index didn't help, same istallation on testserver xp with MySQL 4.0.20a in 3 sec

Deleting 1 Object. Any Ideas?

SOLVED, it is voodoo, tried it again after 10 minutes, now it works.

Thanks, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

eZ debug

Timing: Jan 18 2025 11:40:14
Script start
Timing: Jan 18 2025 11:40:14
Module start 'content'
Timing: Jan 18 2025 11:40:15
Module end 'content'
Timing: Jan 18 2025 11:40:15
Script end

Main resources:

Total runtime0.7813 sec
Peak memory usage4,096.0000 KB
Database Queries204

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 587.8359180.8203
Module start 'content' 0.00900.5721 768.6563642.4688
Module end 'content' 0.58110.2000 1,411.1250337.0625
Script end 0.7812  1,748.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.5630210.0002
Check MTime0.00150.1959210.0001
Mysql Total
Database connection0.00090.115810.0009
Mysqli_queries0.690788.41092040.0034
Looping result0.00500.63862020.0000
Template Total0.743695.220.3718
Template load0.00230.300520.0012
Template processing0.741394.879920.3706
Template load and register function0.00010.017510.0001
states
state_id_array0.00100.132910.0010
state_identifier_array0.00190.242420.0009
Override
Cache load0.00210.2715500.0000
Sytem overhead
Fetch class attribute can translate value0.00170.214350.0003
Fetch class attribute name0.00150.192370.0002
XML
Image XML parsing0.00210.272050.0004
class_abstraction
Instantiating content class attribute0.00000.001470.0000
General
dbfile0.00230.2957340.0001
String conversion0.00000.001130.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
5content/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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs