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

  • Home
  • SEARCH
  • 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 9005427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:08:31+00:00 2026-06-16T01:08:31+00:00

I have a join table in my application’s database (MySQL) which grows massively. I

  • 0

I have a join table in my application’s database (MySQL) which grows massively.

I have 2 models user and product, user has many products to view, and products belongs to many users how will view it.
on start all users has all products to view and the user can edit which products he can view.

the problem that the table size will be (n*m) n is number of users (which is large) and m is number of products (which is large too), and read operations on the table will be slow.

Example:
I have 3 Users their id’s : “1,2,3”
and 3 products their id’s : “1,2,3”

so the users_products table will be:

user_id, product_id
1 , 1
1 , 2
1 , 3
2 , 1
2 , 2
2 , 3
3 , 1
3 , 2
3 , 3

I’m open to all solutions, starting from redesigning this part to use another database system.

Thanks in advance.

  • 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-06-16T01:08:32+00:00Added an answer on June 16, 2026 at 1:08 am

    I think your assuming something that probably isn’t true. SQL servers are quick with these kind of queries even with a lot of rows. Tables with 10 million records can be queried pretty fast if you have good indices.

    I would recommend some testing before you make all kinds of premature optimizations.

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

Sidebar

Related Questions

Scenario: I have an application that has a config table which stores the config
I have an application that requires: user owns many projects. project has one owner.
I have two classes with many-to-many relation so I created a join table in-between
I have a join which deletes rows that match another table but the joining
I have a table user and in addition INNER JOIN it with table cities
I wrongly designed my application to have one database to each user. each user
I have two netities user & service and the join table user_service generated by
I have an application that has had a single table where all my data
I have a primary table for Articles that is linked by a join table
I have the same problem as described in ( Last record of Join table

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.