Jump to content

Quick Questions About MYSQL


DavidPr
 Share

Recommended Posts

I have a database with a 50 tables, one for each state in the US. However, this makes it difficult to perform certain maintenance procedures - like removing outdated information. I have a php script that will search for data that is over 45 days old and delete them when a button is clicked. I'm currently having to do this for each table and it's a pain.Is there a limit as to how much information a table can hold? Or before it begins to suffer performance wise?I'd like to combine the now 50 tables for each state into just one table and identify the data for a specific state with the 2 digit abbreviation like GA for Georgia. This table has the potential to collect quite a bit of data, but with removing data over 45 days old every week will help. Right now the combined data in all the tables could easily fit in one table, but I'm thinking about the future.ThanksDavid

Link to comment
Share on other sites

The size is only limited by the disk size that the database is on. For performance, you can define indexes on certain fields that you search for often (like the state name). Indexes will help the speed any time you search for fields based on an index, but they also need to get updated every time you do an insert or update so don't define more indexes then you need.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...