TLoader, blobs and alternatives
Posted: Tue 06 Sep 2011 13:08
I have an app that writes 100's of thousands of entries to an sqlite database, most of the fields are integers, strings etc. and I currently use a TLoader to add about 1000 rows at a time.
The database is populated only once and after that minor changes are made to existing records but typically (but not always) additonal rows are not added.
I have now decided that I want to add a blob type record to each row and that I want to populate this record at load time.
As TLoader does not support blobs I can redesign my code to insert rows one at a time but cache and do each 1000 in a single transaction.
There will be quite a bit of coding to modify my code and before I sit down and do this I wondered what the groups thoughts were on any speed implications. i.e. I am trying to load the database in the smallest possible time so will 1000 x UniQuery->Add() suitably wrapped as a single transaction be as fast as as loading a 1000 rows via TLoader?
Thanks
The database is populated only once and after that minor changes are made to existing records but typically (but not always) additonal rows are not added.
I have now decided that I want to add a blob type record to each row and that I want to populate this record at load time.
As TLoader does not support blobs I can redesign my code to insert rows one at a time but cache and do each 1000 in a single transaction.
There will be quite a bit of coding to modify my code and before I sit down and do this I wondered what the groups thoughts were on any speed implications. i.e. I am trying to load the database in the smallest possible time so will 1000 x UniQuery->Add() suitably wrapped as a single transaction be as fast as as loading a 1000 rows via TLoader?
Thanks