You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to clear the data when user logs out, and we notice that it would take a long time to perform record deletions for 5 different store in the same database.
Delete record count: 67916
Elapsed time: 44 s
Any suggestion to improve?
The text was updated successfully, but these errors were encountered:
My guest is that you are using databaseFactoryIo which uses an append only file format. Deletion tends to trigger a compact operation which is extensive (rewriting the new file).
The first thing to try would be to do all the deletions in a single transaction so that only 1 compact operation happens.
But my recommendation would be to use the factory from sembast_sqflite since this compact operation does not happen so it should be much faster. The API is the same, it is only a matter of having a different factory to open the database.
Hi,
We want to clear the data when user logs out, and we notice that it would take a long time to perform record deletions for 5 different store in the same database.
Delete record count: 67916
Elapsed time: 44 s
Any suggestion to improve?
The text was updated successfully, but these errors were encountered: