Author Topic: best use of MySQL components for insert performance  (Read 3425 times)


  • New Member
  • *
  • Posts: 14
best use of MySQL components for insert performance
« on: December 21, 2006, 05:26:04 pm »
I'm writing a program to do some informal benchmarking of insert and query performance using various MySQL storage engines using MySQL 5.1.12 beta. I've got it up and running just fine using Lazarus and the MySQL components. It was a piece of cake.

My question is on what the best way is to do the inserts and get the best performance. Right now I'm basically constructing an insert statement string and using ExecSQL to do the insert. Is there another way (perhaps one a little more object-oriented) to do inserts other than just piecing together a huge "Insert into table t1 (a, b, c, d,) values ..."-style statement. If not, would I get better performance inserting multiple records with each statement I execute, or inserting one record per statement?

Any tips you have would be appreciated. I just want to eliminate as much as possible any performance hits due to the tools I'm using to do the benchmarking, thus getting a better picture of the performance of MySQL itself.


Seth Grover


TinyPortal © 2005-2018