How to clean all the old objects versions

Author Message

Jean Gaudel

Thursday 07 December 2006 9:52:21 am

Hi,

My web site has more than 6000 objects and some of objects in the content subtree have more than 20 versions ! The size of the database increase dramaticly !

I'de like to know, if there's a script to delete all the old objects versions included image files.

Thx

kracker (the)

Friday 08 December 2006 4:56:48 am

My first suggestion would be to checkout the 'flatten.php' script (requires php-cli to run) <i>bin/php/flatten.php</i>

If you do not have php-cli enabled in your php installation you can get it very quickly,
<i>http://ezpedia.org/wiki/en/ez/solution_building_php_cli_for_ez_publish_command_line_scripts
http://ezpedia.org/wiki/en/ez/solution_building_php_cli_php_4_4_4_for_ez_publish</i>

This solution, the combination of php-cli and the flatten.php script should meet your needs.

Any other suggestions from the community on this topic?

I have created a node in eZpedia on this subject, please feel free to add to it!
<i>http://ezpedia.org/wiki/en/ez/solution_how_to_clean_all_the_old_objects_versions</i>

Cheers,
//kracker

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

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 18 2025 05:20:20
Script start
Timing: Jan 18 2025 05:20:20
Module start 'layout'
Timing: Jan 18 2025 05:20:20
Module start 'content'
Timing: Jan 18 2025 05:20:21
Module end 'content'
Timing: Jan 18 2025 05:20:21
Script end

Main resources:

Total runtime0.9089 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 588.0469152.6406
Module start 'layout' 0.00730.0031 740.687539.4766
Module start 'content' 0.01040.8972 780.1641527.7109
Module end 'content' 0.90760.0012 1,307.87508.1250
Script end 0.9088  1,316.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3476160.0002
Check MTime0.00130.1418160.0001
Mysql Total
Database connection0.00160.181210.0016
Mysqli_queries0.864795.1432540.0160
Looping result0.00050.0536520.0000
Template Total0.876696.520.4383
Template load0.00200.219220.0010
Template processing0.874696.230220.4373
Template load and register function0.00020.018610.0002
states
state_id_array0.00130.144310.0013
state_identifier_array0.00100.111720.0005
Override
Cache load0.00170.1830190.0001
Sytem overhead
Fetch class attribute can translate value0.00060.062020.0003
Fetch class attribute name0.00090.103130.0003
XML
Image XML parsing0.00090.097120.0004
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00080.0911180.0000
String conversion0.00000.001040.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs