Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum number of workable tables in SQL Server And MySQL

I know that in SQL Server, the maximum number of "objects" in a database is a little over 2 billion. Objects contains tables, views, stored procedures, indexes, among other things . I'm not at all worried about going beyond 2 billion objects. However, what I would like to know, is, does SQL Server suffer a performance hit from having a large number of tables. Does each table you add have a performance hit, or is there basically no difference (assuming constant amount of data). Does anybody have any experience working with databases with thousands of tables? I'm also wondering the same about MySQL.

like image 631
Kibbee Avatar asked Mar 04 '09 14:03

Kibbee


3 Answers

No difference, assuming constant amount of data.

Probably a gain in practical terms because of things like reduced maintenance windows (smaller index rebuilds), ability to have read-only file groups etc.

Performance is determined by queries and indexes (at the most basic level): not number of objects

like image 188
gbn Avatar answered Nov 10 '22 02:11

gbn


In terms of the max number of tables I have had a database with 2 million tables. No performance hit at all. my tables where small around 15MB each.

like image 40
Andy Ansryan Avatar answered Nov 10 '22 02:11

Andy Ansryan


I doubt SQL Server will have a performance problem working with thousands of tables, but I sure would.

I've worked on databases with hundreds of tables in SQL Server with no problems, though.

like image 26
Paul Lefebvre Avatar answered Nov 10 '22 01:11

Paul Lefebvre