Most effiecient way to filter

Author Message

Brendan Pike

Sunday 27 August 2006 5:51:35 am

I do recall seeing a conversation about this some time ago but couldn't locate it.

I'm using several view_parameters to allow users to filter a fetch of usually around 200 - 300 objects. Like only show objects with a location of node_id, 432 and a ezselect state of 3 etc. My question is what is best method of filtering. Is it with a {section-exclude} within the loop or is there a way to perform the filtering within the fetch itself?

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Kristof Coomans

Sunday 27 August 2006 11:19:34 am

Hello Brendan

Info on filtering attributes of the selection datatype (single select only):
http://ez.no/community/forum/setup_design/filter_content_passing_values_from_url

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Brendan Pike

Sunday 27 August 2006 8:48:39 pm

Thanks Kristof, that thread was very informative. After reading that thread I realised I am trying to filter a "ebhanced selection" datatype. I was hoping to avoid the complexity of the extended_attribute_filter but its starting to feel that's the only way. Perhaps I shouldn't be reaching for the "enhanced selector" quite so often after all.

Can you give me your opinion on how to filter on:
A. Enhanced Selectors
B. Node locations, (inspect locations and filter out certain nodes)

Achieving this with section-excludes within a loop is relatively easy but I thought it was a slow method since your fetching larger volumes of objects.

Thanks for any tips.

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Kristof Coomans

Monday 28 August 2006 1:43:36 am

With the enhanced selection datatype, you can just use the identifier of your option as the filter value. Again this only works for a single selection.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

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

Main resources:

Total runtime0.0168 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.0469152.6250
Module start 'layout' 0.00590.0038 741.671939.4453
Module start 'content' 0.00970.0049 781.117293.3203
Module end 'content' 0.01460.0021 874.437534.3047
Script end 0.0168  908.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002716.2362140.0002
Check MTime0.00116.6089140.0001
Mysql Total
Database connection0.00063.692810.0006
Mysqli_queries0.002917.453030.0010
Looping result0.00000.166110.0000
Template Total0.001710.110.0017
Template load0.00095.514310.0009
Template processing0.00084.573010.0008
Override
Cache load0.00073.972510.0007
General
dbfile0.00021.449680.0000
String conversion0.00000.059640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs