Current location: Hot Scripts Forums » Programming Languages » PHP » mysql table... how big is too big?


mysql table... how big is too big?

Reply
  #1 (permalink)  
Old 11-17-09, 08:10 PM
mjjwatson mjjwatson is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 26
Thanks: 2
Thanked 1 Time in 1 Post
mysql table... how big is too big?

I'm making an application where users can save their own quizzes onto the system. At the moment I have a 'questions' table that stores all the questions from all the quizzes and users.

I was wondering if this is the best way to do it? I imagine if every user has 100 questions on average submitted, with hundreds of users, the amount of rows in the single table will be huge eventually.

Will this cause performance problems? My alternative is to give every user there own table, but I was wondering if this is entirely necessary? Can mysql handle huge amount of rows without a problem?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-17-09, 09:26 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by mjjwatson View Post
I'm making an application where users can save their own quizzes onto the system. At the moment I have a 'questions' table that stores all the questions from all the quizzes and users.
I have a number of mySQL tables with 3 and 4 million rows in them. It's not that unusual and it normally won't cause performance issues unless you're storing very large amounts of text or BLOBs in each row. One of the tables I'm working with now has ~3.2 million rows and is ~350 megs or so. It really shouldn't be a problem for your application.

Quote:
Originally Posted by mjjwatson View Post
My alternative is to give every user there own table, but I was wondering if this is entirely necessary?
Don't do this...it'll cause you all sorts of ugly problems later on. Ask me how I know....
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-18-09, 06:20 AM
mjjwatson mjjwatson is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 26
Thanks: 2
Thanked 1 Time in 1 Post
How do you know?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 11-18-09, 08:23 AM
therocket954's Avatar
therocket954 therocket954 is offline
Community Liaison
 
Join Date: Jul 2007
Location: Michigan, USA
Posts: 334
Thanks: 2
Thanked 8 Times in 8 Posts
Quote:
Originally Posted by End User View Post
Don't do this...it'll cause you all sorts of ugly problems later on. Ask me how I know....
I hope this doesn't involve your uncle and more homemade fireworks.

But yes, as well I've seen some massive mysql databases that still operate just fine regardless of size. You'll have a problem with scaling it before you have a problem with it's size.
__________________
--Eric Allison
Twitter: http://www.twitter.com/Eric_Allison

Last edited by therocket954; 11-18-09 at 08:26 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 11-18-09, 10:33 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by mjjwatson View Post
How do you know?
Because at one time I wrote an app that gave each user their own table...and before long I had an app with about 2,500 tables and it was growing daily. By the time I redesigned it to a more sensible format, I had 5 databases that did nothing but hold user tables, and there were ~12,000 tables spread among the 5 databases.

Trust me, don't do it this way. If you must, create a set of key tables and spread the users among them sequentially, but don't create a table for each user.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 11-18-09, 10:35 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by therocket954 View Post
I hope this doesn't involve your uncle and more homemade fireworks.
No, but I could tell you about my other uncle...his last words were, "HEY A TRUCK-"
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

« php sms | Php Sum() »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to search im mysql table morten44 Script Requests 0 06-13-09 07:02 PM
Syntax Error Nikas Database 4 05-15-08 11:48 AM
MYSQL database countll Database 2 06-19-07 05:20 PM
Heres one, mysql statement to load a table with a file from ftp?? 0o0o0 PHP 8 04-28-06 02:32 AM
Newbie MySQL fccolon PHP 2 03-16-04 11:54 AM


All times are GMT -5. The time now is 01:15 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.