mirror of
https://github.com/ent/ent.git
synced 2026-04-30 14:40:57 +03:00
In PostgreSQL, every statement is executed within a transaction. Therefore, we can avoid creating transaction blocks manually (group of statements surrounded by BEGIN and COMMIT) for UpdateNodes operation with a single UPDATE statement. Benchmark for 2000 operations was improved from: 7.98s 3992160 ns/op 4887 B/op 116 allocs/op To: 4.42s 2209659 ns/op 4435 B/op 104 allocs/op --- MySQL and SQLite share the same behavior. Please see #1858 for more info.