[sqlite] SQLite slows by a factor of 1000 after foreign key violation

2015-10-02 Thread Dan Kennedy
On 10/01/2015 10:32 PM, Andrew Cunningham wrote: > I have noticed that when FOREIGN KEY is in DEFERRED mode and a FOREIGN KEY > violation occurs, SQLite will continue to run, but performance slows down > by about 1000x. Breaking into the code shows that it seems to be > continually re-reading the d

[sqlite] SQLite slows by a factor of 1000 after foreign key violation

2015-10-01 Thread Andrew Cunningham
I have noticed that when FOREIGN KEY is in DEFERRED mode and a FOREIGN KEY violation occurs, SQLite will continue to run, but performance slows down by about 1000x. Breaking into the code shows that it seems to be continually re-reading the database. When I finally get to COMMIT , an exception is t