Best db table structure for users with many records

I want to allow users to have 1000+ records in my WordPress system.

I was wondering is it best to have just one table for all users and their records or one table per user?

Keep in mind that I could have 1000 users.

A user columns for records would look like:

User_client_name | User_id | User_post_id | etc...

Each user might have 1000+ records in the database of their contacts. If I put all users in one table, I would have to show each of my users their records separated by User_id.

I was wondering is it better to create a new table per new user I signup for? Or stick to one table of users and their records?

Topic database Wordpress

Category Web


Personaly I would go with one table for all users. Having more tables with the same columns seems like a strange idea to me. The database will be a complete mess after you gwt more users.

Make sure that the user_id is an index for the table and all your select/update/delete will be fine. The insert might have a very short but unsignificant delay after the table gets bigger, but I guess this might not be the most used opperation.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.