Kees Hink | 23 Jul 2012 09:49
Picon
Gravatar

catalog query: performance of effective vs. effectiveRange

My colleague Christian Schneider achieved a massive performance 
improvement on a catalog query for an effective date range:
query['effective'] = {'query': datetime.now(), 'range': 'max'}
vs.
query['effectiveRange'] = datetime.now()
The latter is about 10 times faster on our live database (consisting of 
about 400k content objects, 50k of the queried content type).

I think this is not well-known, but then i may not be the most 
well-knowledgeable person around. Is this what Hanno talks about in this 
thread [2]?

And most important: Should we update the collective docs about querying 
by date? [2]

Kees

[1] http://plone.293351.n2.nabble.com/ZCatalog-vs-bad-indexes-td6251724.html

[2] 
http://collective-docs.readthedocs.org/en/latest/searching_and_indexing/query.html#querying-by-date

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Kees Hink | 24 Jul 2012 18:46
Picon
Gravatar

Re: catalog query: performance of effective vs. effectiveRange

A follow-up: I've updated the documentation.
https://github.com/collective/collective.developermanual/commit/57aca902d008623054f9e11416d0ddf615d9bc39

On 07/23/2012 09:49 AM, Kees Hink wrote:
> My colleague Christian Schneider achieved a massive performance
> improvement on a catalog query for an effective date range:
> query['effective'] = {'query': datetime.now(), 'range': 'max'}
> vs.
> query['effectiveRange'] = datetime.now()
> The latter is about 10 times faster on our live database (consisting of
> about 400k content objects, 50k of the queried content type).
>
> I think this is not well-known, but then i may not be the most
> well-knowledgeable person around. Is this what Hanno talks about in this
> thread [2]?
>
> And most important: Should we update the collective docs about querying
> by date? [2]
>
> Kees
>
> [1] http://plone.293351.n2.nabble.com/ZCatalog-vs-bad-indexes-td6251724.html
>
> [2]
> http://collective-docs.readthedocs.org/en/latest/searching_and_indexing/query.html#querying-by-date
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
(Continue reading)


Gmane