![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Ok, as you might have guessed, I am working on something, that involves gathering more or less real time data, every 5 minutes, and storing it in a table. So the table will grow...and grow... each entry has an ID, autoindexed, and a timestamp. Plus about 10 numerical entries stored as floats. After say - 5 years, I might want to delete data older than 5 years. Will that release disk space? I.e. would the ISAM engine re-use disk space of deleted rows? And would there be any impact on speed of retrieval? The normal search is for the latest n records... i.e. select * from table order by id desc limit n; which are then processed to perform *various statistics upon, and draw graphs. OK I have a few years in which to get it right..but its always nice to know what to expect, in case there is something to be done to speed things up now. |
#3
| |||
| |||
|
|
Ok, as you might have guessed, I am working on something, that involves gathering more or less real time data, every 5 minutes, and storing it in a table. So the table will grow...and grow... each entry has an ID, autoindexed, and a timestamp. Plus about 10 numerical entries stored as floats. After say - 5 years, I might want to delete data older than 5 years. Will that release disk space? I.e. would the ISAM engine re-use disk space of deleted rows? And would there be any impact on speed of retrieval? The normal search is for the latest n records... i.e. select * from table order by id desc limit n; which are then processed to perform various statistics upon, and draw graphs. OK I have a few years in which to get it right..but its always nice to know what to expect, in case there is something to be done to speed things up now. |
#4
| |||
| |||
|
|
To ensure it works the way you think that it works |

#5
| |||
| |||
|
|
Ok, as you might have guessed, I am working on something, that involves gathering more or less real time data, every 5 minutes, and storing it in a table. |
#6
| |||
| |||
|
|
The Natural Philosopher <tnp (AT) invalid (DOT) invalid> wrote: Ok, as you might have guessed, I am working on something, that involves gathering more or less real time data, every 5 minutes, and storing it in a table. Do yourself a favor and have a look at rrdtool. This is nearly perfect for time series data. If you really need to put your data into a RDBMs, then go for InnoDB, not MyISAM. The PK should be (timestamp, datasource). Then the clustering on the PK will automagically give fast access for time-range queries and low fragmentation when deleting historical data. All TOO professional. This is a zero budget bit of research. |
#7
| |||
| |||
|
|
Axel Schwenke wrote: The Natural Philosopher <tnp (AT) invalid (DOT) invalid> wrote: Ok, as you might have guessed, I am working on something, that involves gathering more or less real time data, every 5 minutes, and storing it in a table. Do yourself a favor and have a look at rrdtool. This is nearly perfect for time series data. If you really need to put your data into a RDBMs, then go for InnoDB, not MyISAM. The PK should be (timestamp, datasource). Then the clustering on the PK will automagically give fast access for time-range queries and low fragmentation when deleting historical data. All TOO professional. This is a zero budget bit of research. |
![]() |
| Thread Tools | |
| Display Modes | |
| |