Ticket #13469 (confirmed Bug)
queryplan, DateTime, RAM
Reported by: | hoka | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.x |
Component: | Backend (Python) | Version: | 4.2 |
Keywords: | Cc: |
Description
Hi,
in plone it is a common use case to use DateTime to query some objects. For example query some events using effectiv an expires, sort on created etc.
The problem here is, if you need an always up to date event view you will use every time now=DateTime(), so you query will looks like something.
{'getExcludeFromNav': False, 'portal_type': 'Event', 'expires': {'query': DateTime('2013/03/04 11:44:41.580188 GMT+1'), 'range': 'min'}, 'effective': {'query': DateTime('2013/03/04 11:44:41.580188 GMT+1'), 'range': 'max'}}
The problem here is, that this will cause every time an NEW queryplan entry because the millis, seconds are every time a little bit diffrent. So after some hours query plan eats up your memory.
If you know such things you can go against this with some intelligent programming, but if you are not a code eater you will pretty fail to figure this problem out.
A good thing will be have some Documentation around query plan to make people aware of this problem. I know DateTime is not the problem here but the every time diffrent query. Second it would be good to query catalog in a way queries are NOT stored in the plan. I think this would be the only way in getting such use cases running.
Greetings
HOKA