Why does XenForo use a seperate query to retrieve sticky threads?

MainFrame

New member
Hi Guys,

While I'm working on my mod I came acros the way stickies are handled and I was wondering why XenForo performs a seperate query to retrieve the stickies from the database.

In my mod which list downloads I also build a sticky function but I just sort the query results by attachment.sticky DESC, $secundaryOrder

I'm thinking this is due to 2 queries to the database are faster than sorting 1 but I'm not sure..

Regards,
Danny
 
You answered yourself ;)
Think at what appens when the sticky thread is older than 30 topics and you have limit 20 in the first query ;)
 
Top Bottom