I need some MySQL lookup table advice

Posted by Gary Beam on Server Fault See other posts from Server Fault or by Gary Beam
Published on 2010-12-20T20:23:21Z Indexed on 2010/12/21 8:55 UTC
Read the original article Hit count: 254

Filed under:
|
|
|

I have a MySQL database with about 200 tables. 50 of these are small 2-field 'id-data' lookup tables. Several of these DB's are hosted on a shared server. I have been informed that I need to reduce the total number of tables in the shared hosting environment because of performance issues relating to too many tables.

My question is: Could/Should the 50 2-Field lookup tables be combined into a single 3-field table with 'id-field_name-data' Fields? Even if this can be done, I will have a lot of work to do on the PHP user application. My other choice is moving the DB's to a dedicated server at much higher hosting cost.

I don't believe my 200 table DB's are actually causing any performance issues on this shared hosting server, at least not from the user application standpoint. There are never more than 10 of these tables joined in any single query; although I have seen some very-slow queries generated by phpmyadmin on these DB's.

© Server Fault or respective owner

Related posts about mysql

Related posts about php