What is happening in "Time accumulators: String conversion in mysql"?

Author Message

Jan Borsodi

Thursday 12 August 2004 8:14:06 am

utf-8 is OK allthought it would be faster if it was stored using the current internal charset (removes conversion need).
We already do this for the XML datatype but it hasn't been implemented for the other datatypes yet.

Also <i>unicode</i> is the character set but is not an encoding so cannot be used for storage, however unicode has several encodings defined.
utf-8: The most common in stored media, uses 1 to 6 bytes for storage, ie. it is variable and works seamlessly with existing 8bit string code. However it is a bit slow due to the variable size.

usc2: Stores using double-byte, much faster since lookup is constant and quite often used internally in programs. Unfortenately doing this in PHP using PHP code only could quite easily be troublesome

usc4: Similar to usc2 but uses four bytes (since the initial 2 bytes were not enough for all languages in the world, something like 21 bit is needed I believe).
there are also other encodings (like the non-standard utf-7.5) but hardly used.

So storing utf-8 in 8bit only databases is OK as long as you don't try to do text operations on them in the database.

--
Amos

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

Tony Wood

Thursday 12 August 2004 8:49:45 am

Thanks Jan,

I did not know about being able to stoe utf-8 in 8bit db... interesting.
I noticed various utf-8 formats in MySQL 4.1.3. I used utf8-general is this what you would advise?

--tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Jan Borsodi

Friday 13 August 2004 1:20:19 am

I'm not entirely sure what they mean about utf8-general, I have never heard about this before.

I found this page on mysql.com which explains the different collations (sorting) based on language.
http://dev.mysql.com/doc/mysql/en/Charset-Unicode-sets.html
It could be related to that, do you know of a page on mysql.com that explains utf8-general?

Another interesting property of UTF-8 is that when you are only using characters from ASCII (7bit, 0-127) it will only store one byte and is fully compatible with older ASCII based programs.

--
Amos

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

Georg Franz

Friday 13 August 2004 4:41:25 am

-> Bard:
thanx for that fix!
It works perfectly and speeds up my installation a lot!
(Please close my relating bug report)

Kind regards,
Emil.

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

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 22:26:37
Script start
Timing: Jan 18 2025 22:26:37
Module start 'layout'
Timing: Jan 18 2025 22:26:37
Module start 'content'
Timing: Jan 18 2025 22:26:38
Module end 'content'
Timing: Jan 18 2025 22:26:38
Script end

Main resources:

Total runtime1.2056 sec
Peak memory usage4,096.0000 KB
Database Queries61

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.8281152.6875
Module start 'layout' 0.00500.0022 741.515640.0156
Module start 'content' 0.00711.1968 781.5313591.1875
Module end 'content' 1.20390.0016 1,372.718818.2109
Script end 1.2055  1,390.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2755160.0002
Check MTime0.00160.1295160.0001
Mysql Total
Database connection0.00070.056710.0007
Mysqli_queries1.152295.5709610.0189
Looping result0.00060.0486590.0000
Template Total1.174697.420.5873
Template load0.00200.164420.0010
Template processing1.172697.265820.5863
Template load and register function0.00010.008710.0001
states
state_id_array0.00120.096110.0012
state_identifier_array0.00310.255720.0015
Override
Cache load0.00170.1434330.0001
Sytem overhead
Fetch class attribute can translate value0.00090.077130.0003
Fetch class attribute name0.00060.048070.0001
XML
Image XML parsing0.00120.103530.0004
class_abstraction
Instantiating content class attribute0.00000.001380.0000
General
dbfile0.00110.0878290.0000
String conversion0.00000.000740.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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs