1

I have a Users table. Every user can create one or more lists of movies.

So I searched a little bit and found an answer in Stack Overflow that the best way to create lists is to create A List Table With List_Id And User_ID Columns and a ListEntry Table With List_ID and Movie_ID Column.Then I retrieve list entries by running "SELECT Movie_ID FROM ListEntry WHERE List_ID=x"

My Question is this. When my site grows and I have over 1000 users where each one has 2-3 lists where every list has 50 movies, the ListEntry table may have over 100.000 Entries. Isn't that gonna slow down the database ? Is this the way most sites work ? any better way of doing this ?

1
  • 100k entries is not so huge number for databases, but you should optimize your query, put the right indexes and narrow your search Commented Jul 1, 2013 at 11:06

5 Answers 5

1

Assuming that you are NOT going to store IDs of movies as anything but int(11) or probably less than in(11) - I am pretty sure there is no need for THAT many movies :} - the table will be "big" in amount of rows, but not big in amount of data.

MySQL is very efficient at locating and sorting values that have a small key length, i.e. your Movie_ID and User_ID will be two small keys ( int(11) or similar ), so their JOIN will be also small and done fairly quickly.

Anyway, I wouldn't worry about this, I have tables that have more than 10^8 (100,000,000) records if they are properly indexed and have good keys, MySQL has no difficulty handling it.

Sign up to request clarification or add additional context in comments.

Comments

1

100,000 entries? MySQL isn't even going to feel it - and neither will you. Come back when you have in excess of 10 million.

Comments

1

Databases are designed to handle big loads of data. With proper indexing DBs can hold billions of records in a table.

Comments

1

These number of rows inside a table won't be a problem for your MySql Server if the entries are well indexed. Some nice tips about the MySql performance can be found here. This is a german site with two (english) presentations about MySql performance.

Comments

0

You can use mongoDB. It is schemaless. You can have list inside a document. (table)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.