[Bb-trac] Re: [bbPress] #995: performance design flaw in
bb_update_meta
bbPress
bb-trac at lists.bbpress.org
Mon Nov 17 19:08:21 GMT 2008
#995: performance design flaw in bb_update_meta
----------------------+-----------------------------------------------------
Reporter: _ck_ | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 1.0-beta & XML-RPC
Component: Back-end | Version: 0.9.0.2
Severity: normal | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Comment (by _ck_):
Oh and to make matters worse, updating meta (at least topic meta) causes
not only the above two queries to execute, but in addition it causes the
topic and then the topic meta to re-load, for reasons I cannot fathom.
So a single topic_updatemeta causes no less than FOUR queries.
1. SELECT (to find any existing meta rows to either INSERT or UPDATE)
2. INSERT (or UPDATE, the meta)
3. SELECT (re-load the topic)
4. SELECT (re-load the topic meta)
That's insane.
There should be a table key, an INSERT ON DUPLICATE KEY and the redundant
topic re-load should be avoided. I believe it's to re-load the object
cache, which should be modified in memory directly by the data it was
passed instead.
--
Ticket URL: <http://trac.bbpress.org/ticket/995#comment:1>
bbPress <http://bbpress.org/>
Innovative forum development
More information about the Bb-trac
mailing list