module Sequel::Postgres::LooseCount

  1. lib/sequel/extensions/pg_loose_count.rb

Methods

Public Instance

  1. loose_count

Public Instance methods

loose_count(table)

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

[show source]
   # File lib/sequel/extensions/pg_loose_count.rb
31 def loose_count(table)
32   from(:pg_class).where(:oid=>regclass_oid(table)).get(Sequel.cast(:reltuples, Integer))
33 end