Bad Query on showthread.php:
This is causing a filesort.Code:SELECT t_id, t_time, t_src_url, t_dest_url, t_type, t_postid, t_postcount, t_threadid, t_page, t_title, t_text, t_approve FROM " . vbseo_tbl_prefix('linkback') . "linkback WHERE t_incoming=1 AND t_deleted=0 AND " . ($ismod?'':'t_approve>0 AND ') . "t_threadid = '" . $thread['threadid'] . "' " . "ORDER BY t_time " . (preg_match('#^(asc|desc)$#i', VBSEO_DEFAULT_LINKBACKS_ORDER) ? VBSEO_DEFAULT_LINKBACKS_ORDER : "DESC")
I suggest to change the indexes to have the sortfield included.
Also, this query gets executed even if there are no linkbacks - which is mostly the case (approx. 5% of all threads in the board I monitored do have linkbacks).
I suggest to add a flag to thread table to avoid this query if it isn't necessary.
Is there anything I could do to stop this query?


LinkBack URL
About LinkBacks





Reply With Quote
)
