-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Utilize Transactions in Data Operations #586
Comments
+1. I was amazed how much this affected performance in browsers. |
I looked into this before and I seem to remember @tgriesser saying Transactions were not available for schema-builder queries, only the standard select/insert/update/delete queries... which is kind of a bummer since migrations are almost always builder queries and are probably the ones which could benefit the most. However, if you can find places to optimise the queries with transactions, please have a stab at them and submit PRs 👍 Also.. if you feel like figuring out transactions for the schema builder queries.. that would also be most excellent. |
MySQL does not support transactional DDL, but that's not the case across the board. PostgreSQL (#1333) lets you say things like:
SQLite has at least some transactional DDL support, though I don't know how far it goes:
|
SQLite's transactional DDL supports multistatement DDL, if that's what you're asking. |
This issue has never gotten traction, going to close it for now. If anyone has ideas for specific changes that would be great. |
SQLite has to open a file every time it does a single transaction thus anywhere we do any chaining of operations we should probably be doing them inside of one single transaction to increase performance. This should significantly improve performance of our migrations at the very least.
Bookshelf/Knex appears to provide this functionality already (see: http://bookshelfjs.org/#Bookshelf-Transaction).
The text was updated successfully, but these errors were encountered: