Import csv long file into sqlite database takes too long |
Not really, that is a different thing.
The transactions you are talking about there do something like an entire series of queries, inserts, updates and deletes, but if any of the queries within one transaction fails, they are all cancelled and none of them are implemented. Any changes made during that transaction are rolled back. Imagine a bank has to take some money out of one account and then add it to another, but the add fails, so the bank wants the entire transaction to roll back to the original state, so no money is lost anywhere. Insert batch just writes the sql query for you but inserting lots of data all in one go in a single sql query. (I say 'just' but that is not to imply it is simple or unsophisticated). All the batch functions are pretty cool actually. From the docs (http://www.codeigniter.com/user_guide/da...sert_batch) PHP Code: $data = array( Best wishes, Paul. |
Messages In This Thread |
Import csv long file into sqlite database takes too long - by SirTom - 08-19-2016, 12:22 PM
RE: Import csv long file into sqlite database takes too long - by PaulD - 08-19-2016, 12:54 PM
RE: Import csv long file into sqlite database takes too long - by SirTom - 08-19-2016, 01:29 PM
RE: Import csv long file into sqlite database takes too long - by PaulD - 08-19-2016, 09:52 PM
RE: Import csv long file into sqlite database takes too long - by rfulcher - 08-25-2016, 05:33 PM
RE: Import csv long file into sqlite database takes too long - by projack89 - 08-25-2016, 08:11 PM
|