module Sequel::Postgres::LooseCount

Public Instance Methods

loose_count(table) click to toggle source

Look at the table statistics for the given table to get an approximate count of the number of rows.

   # File lib/sequel/extensions/pg_loose_count.rb
29 def loose_count(table)
30   from(:pg_class).where(:oid=>regclass_oid(table)).get(Sequel.cast(:reltuples, Integer))
31 end