List of tables = ~6ms
List of tables with number of comments = ~211ms
Looking into the guts of the SQL query, it's done well, this is really because of a count, group and join on a table that has ~300k rows.
This needs denormalization and caching :)
First start is to have number of comments as an attribute on the table and maintain it using increments / triggers / well even Django signals would work better than this.
On my computer:
List of tables = ~6ms List of tables with number of comments = ~211ms
Looking into the guts of the SQL query, it's done well, this is really because of a count, group and join on a table that has ~300k rows.
This needs denormalization and caching :)
First start is to have number of comments as an attribute on the table and maintain it using increments / triggers / well even Django signals would work better than this.
Follows up on list from #210