Module: SeqScanner::Switcher

Defined in:
lib/seq_scanner/switcher.rb

Class Method Summary collapse

Class Method Details

.offObject



8
9
10
# File 'lib/seq_scanner/switcher.rb', line 8

def off
  ActiveRecord::Base.connection.execute("SET LOCAL enable_seqscan = off")
end

.onObject



4
5
6
# File 'lib/seq_scanner/switcher.rb', line 4

def on
  ActiveRecord::Base.connection.execute("SET LOCAL enable_seqscan = on")
end