Skip to content

dougcole/activerecordpostgresqlexplain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ActiveRecordPostgresqlExplain
=======================

an ActiveRecord extention for accessing Postgresql's explain data - useful for estimating the cost of queries in Postgresql.


Example
=======

>> User.estimate(:cost, :conditions => "login ILIKE '%doug%'")
=> 85.78

>> User.estimate(:count, :conditions => "login ILIKE '%doug%'")
=> 15

Note these are only estimates, take them as an order of magnitude estimate instead of faster count:
>> User.count(:conditions => "login ILIKE '%doug%'")
=> 8    # vs the estimate of 15


Copyright (c) 2008 Estately.com, released under the MIT license

About

an ActiveRecord extention for accessing Postgresql's explain data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages