Session extension questions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Session extension questions

Sebastien Boisvert
I've got a couple of general questions about the session extension, specifically about applying changesets/patchsets:

- Assuming little to no conflicts, what's the performance of applying a changeset to a database; let's say for 10000 (or multiples thereof) changes across multiple tables. Would it be significantly faster than a best-case INSERT/UPDATES of the same amount of changes?
- While a changeset is being applied, is the whole database locked? Only some tables?
- Does applying a changeset trigger any triggers a table might have, and if so when does that happen (during/after)?

I've got a specific use case in mind, so I can provide more details if there's a need for clarification about these questions.
Thanks,Sebastien
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Session extension questions

Dan Kennedy-4

On 31/5/62 04:54, Sebastien Boisvert wrote:
> I've got a couple of general questions about the session extension, specifically about applying changesets/patchsets:
>
> - Assuming little to no conflicts, what's the performance of applying a changeset to a database; let's say for 10000 (or multiples thereof) changes across multiple tables. Would it be significantly faster than a best-case INSERT/UPDATES of the same amount of changes?


It uses prepared statements for all operations, so it will be faster
than running an SQL script for that reason, but no faster than any other
app that uses prepared statements.


> - While a changeset is being applied, is the whole database locked? Only some tables?

Whole database, same as for any other SQLite transaction.

> - Does applying a changeset trigger any triggers a table might have, and if so when does that happen (during/after)?


As each row is inserted/updated/deleted. Before or after the operation
depending on whether the trigger is declared as BEFORE or AFTER.

Dan.




_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users