From b7037808bbee8b562bb95c2afd41820edc8623e8 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 3 May 2018 15:50:30 +1000 Subject: [PATCH] PERF: stop using exec which is blocking for direct sql --- lib/freedom_patches/active_record_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/freedom_patches/active_record_base.rb b/lib/freedom_patches/active_record_base.rb index 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::Base def self.exec_sql(*args) conn = ActiveRecord::Base.connection sql = ActiveRecord::Base.send(:sanitize_sql_array, args) - conn.raw_connection.exec(sql) + conn.raw_connection.async_exec(sql) end def self.exec_sql_row_count(*args)