I'm making a sitemap. I have a table, which connects posts with categories (2 columns: categoryId, postId). There are nearly 9000 categories in total, and I want to count number of posts in each category to predict number of pages in pagination. I tried to do 9000 COUNT(*)'s for each category, but that is too slow (2 hours, actually). What can I do? Thanks.I'm making a sitemap. I have a table, which con