Re: Query in getTopicsPostsAndPoster
Reply #1 –
I'm still not awake ... but what is that group by doing anyway? msg_id is unique so what is it going to group, and there are no aggregate functions that are being done. Need my coffee !
Re: Query in getTopicsPostsAndPoster
Reply #3 –
Curious for sure .... Thanks for digging out that linage. So it looks like the GROUP BY by was added to avoid the error caused by using a HAVING statement (which should really refer to an aggregate value) ... Still seems like there is nothing to group, so the AND would be proper IMO
Re: Query in getTopicsPostsAndPoster
Reply #4 –
Thinking the HAVING would be there to use multiple indexes.