Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6545033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:32:14+00:00 2026-05-25T11:32:14+00:00

I am working on a project using MySQL and PHP. I will have many

  • 0

I am working on a project using MySQL and PHP. I will have many (hundreds to thousands, possibly) users, and each user will have many (several thousand) entries relating to him/her. I was initially thinking of sticking all of the entries into one table, and having one of the columns be the user ID which the entry corresponds to, but this table would become huge, and likely hard to manage. I’d need to query the table frequently to get the entries which correspond to a particular user ID, and this may take a while. However, I would rarely need to query data that doesn’t share a user ID.

I am now thinking about making a table for every user ID (something like “table1” for userID one, for example), and then just querying the individual tables. However, having thousands of tables sounds like a bad idea as well.

Which would you recommend? Or is there a better solution I haven’t though of? (I hope my question made sense!)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:32:14+00:00Added an answer on May 25, 2026 at 11:32 am

    The only valid way of doing that is having everything in one table. MySQL in not made for such extreme usages.

    I suggest you keep all the entries in one table, each enty having UserID. And don’t forget to put the index on that field.

    It may be reasonable thinking about multiple tables, but if you do it that way, you queries will actually take more time, and data will use more disk space, because each table creates aditional overhead.

    Go with one table, go the only vaid way. Splitting is not an option, you will just create data fragmentation, making yourself hard time when wou will want to for example do a backup.

    Just a aditional comment: I have seen 20GB tables many times, but I have never seen a database with more than 100 tables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using MySQL and PHP for a project I am working. I have
I am working on a project using zend framework, php, mysql on ubuntu. I
I am currently working on a PHP project with MySQL. I have the PHP
I'm working on php, mysql on a project I'm planning to add a multilanguage
I'm working on a project where there will be a MySQL database containing data
I'm using mysql/php/apache . I have the following situation: 2 tables where I need
For a personal project, I need to build a forum using PHP and MySQL.
I'm working on a php project which uses Mysql, javascrit and jquery as technologies.
My team working in a project using Winforms application(c#) & MSSQL 2005 as database.
I'm working on a project using Windows 2008, .NET 3.5 and WCF for some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.