Several count fetchs, scalability?

Author Message

Tore Skobba

Thursday 05 February 2004 4:53:06 am

Hi

I want to make an statistical page about various information about the users of my site. In order to do this I will need to make around 10 tree_count fetches (i.e: fetch('content',tree_count) on various attributes.

Example:
Show percent of male users

fetch total number of users
fetch number of user with male attribute="m"

Calculate male %.

My question is two folded:

1: Would it be faster to first get all users using an standard fetch (non count), and then loop through them and count the various relevant attributes settings(6-8). And in the end perform the neccesary calculations. Or is it faster to have several fetch counts on various attributes?

2: Any thoughts about how these solutions would scale when the number of user go up, I know that the system caches, but when the number of user goes up, so does the frequncy of user editing themselfs, i.e. cache expires faster.

Nice if someone had any thoughts or experience to share on this one.

By the way I really like the new layout for the documentation of the various functions. Once it is finished it will greatly reduce development time and allow more functional EZ sites I belive.

Cheers
Tore

John Mina

Thursday 07 April 2005 1:53:45 am

hi Mr Tore,
I wonder if you have an idea of how to get number of anonymous users who visited my website since i published it.
I am using version 3.3-3 ,
Looking forward to hearing back from you
Sincerely
John

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 19 2025 06:12:40
Script start
Timing: Jan 19 2025 06:12:40
Module start 'layout'
Timing: Jan 19 2025 06:12:40
Module start 'content'
Timing: Jan 19 2025 06:12:41
Module end 'content'
Timing: Jan 19 2025 06:12:41
Script end

Main resources:

Total runtime0.8346 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.0056 589.1797152.6250
Module start 'layout' 0.00560.0036 741.804739.4453
Module start 'content' 0.00930.8239 781.2500462.9141
Module end 'content' 0.83320.0014 1,244.16418.1563
Script end 0.8345  1,252.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3562160.0002
Check MTime0.00120.1470160.0001
Mysql Total
Database connection0.00080.095010.0008
Mysqli_queries0.791994.8897540.0147
Looping result0.00040.0525520.0000
Template Total0.805996.620.4029
Template load0.00200.242920.0010
Template processing0.803896.318120.4019
Template load and register function0.00010.014110.0001
states
state_id_array0.00070.079310.0007
state_identifier_array0.00080.095920.0004
Override
Cache load0.00160.1892250.0001
Sytem overhead
Fetch class attribute can translate value0.00050.062120.0003
Fetch class attribute name0.00080.096720.0004
XML
Image XML parsing0.00020.026120.0001
class_abstraction
Instantiating content class attribute0.00000.000820.0000
General
dbfile0.00070.0782100.0001
String conversion0.00000.001140.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
4content/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: 5

Time used to render debug report: 0.0002 secs