I am using FMDatabaseQueue to have the ability work with fmdb using GCD. But GCD does not help.
When I try to perform any execute update query several times in one moment I got freeze of application.
To improve the performance I done - complex query to reduce the number of queries - use begin and commit transaction - use setShouldCacheStatements But NOTHING help
Here is some example of code func complexQuery(sqlQuery: String) -> Bool {
var result = false
self.databaseQueue.inDatabase() { database in
database.setShouldCacheStatements(true)
database.beginTransaction()
result = database.executeStatements(sqlQuery)
database.commit()
}