Slow Inserts



Hi all

We have a database running with a table with alot of rowS(about 7 million at time of writing).

Anyways, our insert statements are taking extra long to execute and maintaining the table takes really long.

I've redesigned the indexes, and that gave me a slight improvement.

Does anybody have any tips for me for running the database faster, expecially faster inserts.

Kind Greetings
Can I ask what kind of data you're storing? Is there older information that doesn't get updated very often that you could offload into another table?
It is data for reporting and analysis, so data is calculated on all data, but we are thinking about archiving some data in some way or another ...

at the moment we are just looking for a temporary solution like tweaking MySQL to give us more performance....
If you've already tried tweaking your indexes, then there may not be much more you can do.
Currently we have an engine inserting from log files one line per one line, what we think of doing is caching for example a 1000 lines in memory and then do a bulk insert, this way one can save a few secs here and there.
mysql does give problems with huge database .. specially if you are using php...

when mysql takes long time....

it tends to "forget synch." with PHP...

hence in our company we have shifted. to MSSQL
ruturajv said:
it tends to "forget synch." with PHP...

hence in our company we have shifted. to MSSQL

Where did you read this ruturajv? I don't buy it. And why on earth would you switch to MSSQL? Why not something better like PostreSQL?
ok, MSSQL .. !! yes its paid... But I'm not the one who takes decision in my company...


Postgres is way bit slow for a 40GB of DB