What would be the best way of designing a database to store blog posts and comments? I am currently thinking one table for posts, and another for comments, each with a post ID.<
trawling through a large table of comments to find those for the relevant post would be expensive,
An index is always there to rescue you! First index on postId and another of commentdate (desc)
postId
commentdate