Need help getting highly-optimized inserts for float data
Hi,
I am writing a routine that is attempting to save floating-point data from a process that produces measurement data about two hundred times per second. All of the data is either unsigned integers (foreign keys) or floating-point data. I'm saving 2 or 3 floats and one foreign key per row with about 30 rows per table for 4 or so tables each iteration.
My goal is to see if it is possible for this data to be saved directly to the database, without the database getting too far behind.
-- A few selects may be queried while all this is going on, but not on the tables I am inserting to.
-- I know in advance what the foreign keys are, so I'm using the insert into * values (), (), () format
-- I'm using MyISAM for the table engines -- is there a better fit for this?
-- The program is a C++ program, but I'm currently using the C API for mysql. Does the C++ api have any performance advantages for me specific to this situation?
-- Converting all these floats and integers to strings for the query, so the database can just convert them back seems like a waste. Is there a better way?
-- I am looking into using disable/enable keys to disable the keys until the end. Are there other such tricks to use?
-- This burst of data may run for say 5-10 minutes. Any database parameters that can be tuned for this situation
Any other suggestions?
Thanks
Subject
Views
Written By
Posted
Need help getting highly-optimized inserts for float data
3161
June 08, 2009 10:19AM
2132
June 08, 2009 06:30PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.