Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 01-17-2005, 08:46 PM   PM User | #1
Turtle
New Coder

 
Join Date: Nov 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Turtle is an unknown quantity at this point
Too Many Tables - Bad?

I have a database with 138 tables. Is having too many tables bad? Can it slow things down?
Turtle is offline   Reply With Quote
Old 01-17-2005, 09:29 PM   PM User | #2
dniwebdesign
Regular Coder

 
dniwebdesign's Avatar
 
Join Date: Dec 2003
Location: Carrot River, Saskatchewan
Posts: 677
Thanks: 3
Thanked 2 Times in 2 Posts
dniwebdesign is an unknown quantity at this point
I think it will only slow things down if you query all of them. If you are only selecting a few at a time I don't think it should slow things down all that much. Correct me if I'm wrong.
__________________
Dawson Irvine
CEO - DNI Web Design
http://www.dniwebdesign.com
dniwebdesign is offline   Reply With Quote
Old 01-17-2005, 10:04 PM   PM User | #3
marek_mar
Sensei


 
Join Date: Aug 2003
Location: One step ahead of you.
Posts: 2,815
Thanks: 0
Thanked 3 Times in 3 Posts
marek_mar is on a distinguished road
It shouldn't. If you query them resonably. You could ask the guys in the database forum too.
marek_mar is offline   Reply With Quote
Old 01-17-2005, 10:52 PM   PM User | #4
Spookster
The Infractionator-inator


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 5,509
Thanks: 3
Thanked 10 Times in 10 Posts
Spookster is on a distinguished road
If you have that many tables then either this is one incredibly huge application with dozens of entities or else the database was designed incredibly wrong. Or are you just putting tables from many different applications into one database?

In any case this is not a PHP issue so I will move it to the database forum.
__________________
Spookster
CodingForums Tyrant
All Hail Spookster
Where do you want to go today? Microso... errr Wrong!!! Make the switch Ubuntu Linux
Spookster is offline   Reply With Quote
Old 01-18-2005, 05:22 AM   PM User | #5
Turtle
New Coder

 
Join Date: Nov 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Turtle is an unknown quantity at this point
Thanks for replying. This is my forum's database. It doesn't query them all at the same time, just a few. The reason it has so many tables is because I have lots of addons.
Turtle is offline   Reply With Quote
Old 01-18-2005, 05:30 AM   PM User | #6
Kiwi
Regular Coder

 
Join Date: Oct 2002
Posts: 379
Thanks: 0
Thanked 0 Times in 0 Posts
Kiwi is an unknown quantity at this point
The main application I work on has something like 10,000 tables (or there abouts). A fair number of them top 1,000,000 records.

Properly normalising your data into tables and using sensible indexing will significantly improve performance, not reduce it. The number of tables is a very bad indicator of performance: a lot of other variables are more important.
__________________
Strategy Conscious
Kiwi is offline   Reply With Quote
Old 01-18-2005, 07:48 AM   PM User | #7
Spookster
The Infractionator-inator


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 5,509
Thanks: 3
Thanked 10 Times in 10 Posts
Spookster is on a distinguished road
Quote:
Originally Posted by Kiwi
The main application I work on has something like 10,000 tables (or there abouts). A fair number of them top 1,000,000 records.

Properly normalising your data into tables and using sensible indexing will significantly improve performance, not reduce it. The number of tables is a very bad indicator of performance: a lot of other variables are more important.

10,000 tables? Come on now. That sounds a bit exaggerated. I can't fathom any application needing that many tables. I spent 3 years as a database engineer for Corning Inc. I dealt with processing millions of records a day into a historical database somewhere in the 2TB size. It contained a few hundred tables however was not a normalized database system. In fact it was a very poorly designed system and performance sucked when it came to retrieving data but it was designed around fast processing of data coming from machines on the plant floor.

The number of tables can be a big factor on performance if you are querying specific data across a dozen tables all containing millions of records each. There are of course lots of other important factors that can be involved in performance but the number of tables is definitely one of those.
__________________
Spookster
CodingForums Tyrant
All Hail Spookster
Where do you want to go today? Microso... errr Wrong!!! Make the switch Ubuntu Linux
Spookster is offline   Reply With Quote
Old 01-18-2005, 08:18 PM   PM User | #8
Kiwi
Regular Coder

 
Join Date: Oct 2002
Posts: 379
Thanks: 0
Thanked 0 Times in 0 Posts
Kiwi is an unknown quantity at this point
10,000 is a low estimate - similar systems run up towards 14-15,000 tables. This is pretty normal for an ERP system. I never dig into the admin tables to see exactly how big the installation is. That excludes all the temp tables built, used and dropped during execution of the various applications and SQL views. I'm not sure what sort of total tablespace our DBAs are working with - I just know that at year end, we need to extend it and bump up the processing capactity.
__________________
Strategy Conscious
Kiwi is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:04 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.