This patch is a simple tidy up to some queries in forum.module
All I've done is replace most joins on {term_node} to joins on {forums} (and removed one duplicate join where it was comparing both term_node and forum together). There's an old version of this somewhere that was closed when extra node types got added to forums (which removed the forum table, then it was put back in again), that also had some denormalisation discussion in it which was postponed to D7, so new issue just for this cleanup.
I don't think it will make that much different to performance, but since we have the forums table we should use it for consistency (and with less cardinality on most sites it can only do good if it makes any difference at all).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | forum_sql_cleanup_3.patch | 7.56 KB | catch |
| forum_sql_cleanup.patch | 8.23 KB | catch |
Comments
Comment #1
catchRemoved windows line breaks and stupid typo (edit and the right patch even). Also forum_get_topics has to query both the term_node and forum tables to find shadow forum topics, so it's not a redundant query and should be left in. One typo in a comment, might as well do that at the same time.
This tested with new forum vocabularies and with forum topic and poll node types. Done most things you'd expect to with forums so it should be alright.
Comment #2
catchComment #3
catch