Wednesday 15 August 2012

php - Codeigniter's insert_batch() function performance and limitations? -


Let's write an application that sends an SMS through an SMS gateway and i) a copy of the message on the database. Up to now, for the purposes of prototype, I was inserting each message into the database once with the active record class of the Codeigniter, but to send the bulk message I got the insert_batch () IAC is talking about 1000-5000, and it may be that at one time the user requests per SMS (inclusive).

My question is, is insert_batch () going to be enough, sufficient enough and for such a large amount of error inserts? Or is this a batch job being used for less inserts, is it safe or fast to query custom mesicil with multiple lines in an ISCERT? Are there any limitations on the amount of rows that insert_batch () ?

Can be inserted with? If so, what is your experience?

After one week insert_batch () test and insert_batch ( ) with 1.000.000 Records handling I came across the following problem as described in another SO question:

Then my personal experience is not reliable in insert_batch () 10.000+ large of rows Put it on the scale because it is sometimes not putting everything that can lead to DB discrepancy. I had no problem for the performance and I am still satisfied. CentOS installed with an old PC (P4 Y / 1GB RAM) in approximately 100 seconds in 10.000 rows.

No comments:

Post a Comment