We apologize for the instability of composr.app and appreciate your patience. We are working on the statistics addon and trying to find an optimal way to store and render data. Unfortunately, we have yet to find a solution that can handle the traffic (and therefore, tens of millions of statistical records) of composr.app. We're working hard on one.
#191 - Postgresql and sources/blocks/main_news.php
I was aware of this one actually, in the sense of it not meeting the SQL spec rather than the sense of knowing it failing on postgresql. The duplicate records are due to the join. The problem is someone can add a news entry such that it is in the same primary and secondary category and hence it comes out twice. Alternatively, a filter might filter on multiple categories and hence it comes out multiple times.
GROUP BY is the only way I really know to remove duplicates without having to do processing in PHP, which breaks the ability for COUNT(*) to work for pagination or is a performance hit due to reading in lots of rows. Any suggestions welcome!
Ok, this one was tough. The only way to solve without making the code into spaghetti was to do a small compromise. Non-MySQL users will have pagination that gets a bit uneven if items are returned that are in multiple categories that are filtered on, due to the duplicates being taken out (in PHP) and leaving holes in the perceived ordering.
I don't think this'll cause any issues for people.
GROUP BY is the only way I really know to remove duplicates without having to do processing in PHP, which breaks the ability for COUNT(*) to work for pagination or is a performance hit due to reading in lots of rows. Any suggestions welcome!
I don't think this'll cause any issues for people.