PHP Insert into database without waiting database response PHP Insert into database without waiting database response curl curl

PHP Insert into database without waiting database response


You questions sounds a little like you are going to try to do OLTP with IQ. Not the thing IQ has been designed for, but there is a way maybe a solution for your:

As IQ is a column store with a lot a I/O when it comes to write/update statements (slow on INSERTS(UPDATES), they have introduced an additional row level versioning feature called RLV with IQ16. (Remember, a column store is updating the complete column once a field has been updated) This allows you to change single lines without needing to wait for IQ to write back the complete column. After a timeout or a number of changes IQ is syncing the changes automagically back into the column store. On SELECT-statements the column store results are getting merged with changes stored inside the RLV. So it's complete transparent to your application beside maybe a few new error codes ;) Even it's working, this being said: It's kind of a (cool) work around, so it will not make IQ to your OLTP database -- IQ keeps the OLAP database you need for reporting issues -- but it helps you to change some data faster. However, you should start checking the RLV documentation as it will be to huge to paste everything into this answer.

A second ways could be to setup a second database in front of IQ which is doing all the OLTP work for IQ and syncing with IQ later on regular base. This is only working well, if you just need a small subset of data inside your OLTP database. However, this idea is similar to what RLV is doing, but DIY and it's working with IQ <16. (as you didn't provide a lot of details and it's really a broad topic I spare the details on how to do it. Keyword would be something like foreign databases in combination with database jobs)


You can user the INSERT DELAYED command if your setup allows it

When a client uses INSERT DELAYED, it gets an okay from the server at once, and the row is queued to be inserted when the table is not in use by any other thread.

http://dev.mysql.com/doc/refman/5.6/en/insert-delayed.html