I am building a new site (PHP & MySQL) and I can't decide on whether to include the post ID in the URL or not. There are some sites that do this and some other sites that don't. For example, my URL structure for posts will be like the following with post ID:
or without post ID
If I add post ID, I will get the post details from the database using the post ID which is the primary key. On the other hand, if I don't use post ID, I will get the post details from the database using the post name. I don't know which one would be faster and better for scalability. Maybe there is another better option that I can't think right now.
Thanks for any ideas.