I have a site to develop into PHP and mysql where I take, with a cron, every two minutes 10 xml from a server parse each and insert data into my database.
Well this data are simple string (maximum 10) and about 20 field (string(10)).
Every two minutes I insert 10 records with 20 fields (the number of xml can be incremented).
Into this database I have other tables but the biggest table is where I insert every two minutes some records.
I want to know if is bettere to separate database by year like: database_2013, database_2014... create database automatically when the year change beacuse I dn't want that this table of data can generate every year Gb of database and ten years from now I have a very big database where to make query is very slow.
One database (isn't a problem a lot of Gb for a database) or more database divided by years?
This is my table that I implement:
CREATE TABLE IF NOT EXISTS `station` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`station_id` int(11) unsigned NOT NULL,
`dewpoint` varchar(5) NOT NULL,
`heat_index` varchar(10) NOT NULL,
`pressure` varchar(10) NOT NULL,
`relative_humidity` varchar(5) NOT NULL,
`temperature` varchar(5) NOT NULL,
`wind_degrees` varchar(10) NOT NULL,
`wind_direction` varchar(10) NOT NULL,
`wind_speed` varchar(5) NOT NULL,
`windchill` varchar(10) NOT NULL,
`rain_rate_in_per_hour` varchar(10) NOT NULL,
`rain_rate_hour_high_in_per_hour` varchar(10) NOT NULL,
`rain_storm_in` varchar(10) NOT NULL,
`leaf_wetness` varchar(2) NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;