[]Anno said:
LEFT JOIN {$config['tbprefix']}Users AS t2 ON t1.B_PosterId = t2.U_Number
WHERE t1.B_Main = $current
$Viewable
ORDER BY B_Number
$Limit
";[/code] [/]
Just curious, have you done any benchmarks?
Chances are that this will slow down the query, so there may be a tradeoff involved - especially of concern to those with large posts tables.
When you LEFT JOIN the query, evaluator can't use underlying indexes on the result table which means
the 'WHERE' and 'ORDER BY' clauses will be evaluated by a
table scan.
I tend to avoid left joins wherever possible.
The 2nd tweak is nice, I already had implemented something very similar on my site.