阅读背景:

MySQL的。需要计算约9000个类别中的帖子数量

来源:互联网 

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




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: