Inserts get slower and slower
Steinar Midtskogen <
steinar@...>
2012-02-08 22:08:31 GMT
Hello
I'm having trouble with one table in my database.
When I build my database from scratch using millions of inserts, one
table causes problems. Inserts get slower and slower. I have about
830,000 inserts for that table. It gets to 300,000 pretty fast, but
then it gets slower and slower, and eventually it will only do a few
inserts per second, and I then I have to kill sqlite3 as it will run
for hours if not days. The -echo option reveals that it gets slower
and slower. sqlite3 runs at 100% CPU.
I create other similar tables with 830,000 inserts the same way, but
inserts into them don't slow down.
The table in question is:
CREATE TABLE Voksenlia2 (
temp_in REAL,
pressure REAL,
rh_in REAL,
temp_in_2 REAL,
temp_in_3 REAL,
temp_in_4 REAL,
temp_in_5 REAL,
temp_ground_0cm REAL,
temp_ground_10cm REAL,
temp_ground_20cm REAL,
temp_ground_50cm REAL,
radiation INTEGER,
(Continue reading)