dougcole / activerecordpostgresqlexplain

an ActiveRecord extention for accessing Postgresql's explain data

Home Page:http://www.estately.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

http://www.estately.com

License:MIT License


Languages

Language:Ruby 100.0%