I am trying to use sqlite (sqlite3) for a project to store hundreds of thousands of records (I would like sqlite so that users of the program do not have to start [my] SQL server).
I need to update hundreds of thousands of records, sometimes enter values to the left to the right (they are hierarchical), but found the standard
update table set left_value = 4, right_value = 5 where id = 12340;
will be very slow. I tried to surround every thousand or so with
begin; .... update... update table set left_value = 4, right_value = 5 where id = 12340; update... .... commit;
but again, very slowly. Odd, because when I fill it with several hundred thousand (with inserts), it ends in seconds.
I am currently trying to check the speed in python (slowness is on the command line and python) before moving it to a C ++ implementation, but now this is a way to slow down and I need to find a new solution if I do something wrong . Thoughts? (will use the open source alternative for SQLite, which is also portable)
source share