Why are WordPress databases so huge with so many tables?

[ad_1]

Background: I’m a developer that’s transitioning our tech stack from WordPress to serverless applications built with react and Next.js. My current project is a blog of ours that has about 30 pages and roughly 3000 posts.

Everything is extremely purpose built now so obviously I have new schema for the database, but today was the first time I actually noticed how bloated the db is out of the box. For my 3000 posts, I have over 16k rows in wp\_posts, most of which are attachments. But the attachments are only connected to the posts through a separate table, wp\_postmeta, which is also bloated with a whole bunch of other stuff. To convert to my new schema, I’m already sorting through 6 .JSON files and that’s just for my posts, nevermind users or anything else.

Why do this? Why not just put the featured image link inside the post row instead of giving it it’s own ‘post’?

Why not just put all of your meta in the post? Why are there 3 MORE TABLES that I have to reference in order to see the categories for each post?

Is this the correct way of managing MySQL and I’m just completely missing something?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer