A platform for community discussion. Free, open, simple.
PERF: stop using exec which is blocking for direct sql
Samb7037808bbee
diff --git a/lib/freedom_patches/active_record_base.rb b/lib/freedom_patches/active_record_base.rbindex bd4eb2c1e82..b65ebc0616b 100644--- a/lib/freedom_patches/active_record_base.rb+++ b/lib/freedom_patches/active_record_base.rb@@ -4,7 +4,7 @@ class ActiveRecord::Basedef self.exec_sql(*args)conn = ActiveRecord::Base.connectionsql = ActiveRecord::Base.send(:sanitize_sql_array, args)- conn.raw_connection.exec(sql)+ conn.raw_connection.async_exec(sql)enddef self.exec_sql_row_count(*args)