Clustering database id column sizes too small

Author Message

Bruce Morrison

Monday 12 March 2007 6:59:30 pm

I've been running a clustered site for about six months and found that the use of mediumInt(8) for the id & masterid columns is too small.

The issue was noticed when the client could no longer upload images and the cause was tracked back to the auto increment values being the max possible values for the column defination (16777215)

I've changed the columns to bigints (max value 18446744073709551615) with the following sql:

ALTER TABLE `ezdbfile_data` CHANGE `id` `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `ezdbfile_data` CHANGE `masterid` `masterid` BIGINT UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `ezdbfile` CHANGE `id` `id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT;

http://issues.ez.no/IssueView.php?Id=10438

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

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

Main resources:

Total runtime1.0341 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.0048 588.0391152.6406
Module start 'layout' 0.00480.0021 740.679739.4766
Module start 'content' 0.00691.0258 780.1563468.4141
Module end 'content' 1.03270.0013 1,248.57038.2813
Script end 1.0340  1,256.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2947160.0002
Check MTime0.00120.1208160.0001
Mysql Total
Database connection0.00060.061910.0006
Mysqli_queries0.996796.3919460.0217
Looping result0.00040.0416440.0000
Template Total1.003897.120.5019
Template load0.00200.192320.0010
Template processing1.001896.878620.5009
Template load and register function0.00010.010810.0001
states
state_id_array0.00090.087010.0009
state_identifier_array0.00110.104020.0005
Override
Cache load0.00150.1490110.0001
Sytem overhead
Fetch class attribute can translate value0.00100.093310.0010
Fetch class attribute name0.00050.048920.0003
XML
Image XML parsing0.00030.033810.0003
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00070.0677160.0000
String conversion0.00000.000640.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
3content/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
1content/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: 9
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs