Schauen wir uns diese Datenbankstruktur aussehenWie optimiert man die Speicherung dieser Daten in MySQL?
Iterations
id (primary key)
start (timestamp)
end (timestamp nullable)
Items
id (primary key)
title (text)
foreign_id (integer)
location (point nullable)
some other text fields
Iteration_items
iteration_id (foreign key to iterations(id))
item_id (foreign key to items(id))
Jede Stunde
1. Create new record in `iterations` with `start` equals to now
2. Do some processing and store about 5000 records in `items` table (plus 5000 records in `iteration_items`), so every `iteration` contains about 5000 items.
3. After it is done set `end` to now for latest `iteration`
Problem: jede iteration
(meist in items
Tabelle) dauert etwa 100 MB Festplattendaten kann ich diese Daten in irgendeiner Weise nicht zip (Es ist ein Text drin).
Es kann mehr Duplikate:
1. Iteration 34 contains item with foreign id 837435.
2. Iteration 35 contains item with foreign id 837453
3. ...
4. Iteration 42 DOES not contain item with foreign id 837453
Daten in Artikeln mit ausländischer ID 837435 kann zwischen Iterationen geändert werden.
Zum Beispiel:
iteration 34
point(1.1,2.2)
title 'some example text'
iteration 35
point(1.1, 2.3)
title 'another example text'
Ich brauche diese Daten zu speichern, so dass später kann sie verglichen werden.
Wie man mit kontinuierlich wachsender Datenbank umgeht?