mirror of
https://github.com/ent/ent.git
synced 2026-04-28 13:40:56 +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 DeleteNodes operation as it's implemented with a single statement. Benchmark for 4000 operations was improved from: 14.54s 7270455 ns/op 3702 B/op 81 allocs/op To: 5.36s 2679935 ns/op 2864 B/op 59 allocs/op --- MySQL and SQLite share the same behavior. Please see https://github.com/ent/ent/pull/1858 for more info.