Hacker News new | ask | show | jobs
by rst 2169 days ago
That depends on the ORM -- ActiveRecord has a ".explain" method on the proxy objects for its query builder which displays the SQL, and the query plan (displayed in db-specific format).
1 comments

Note that AR's `explain` actually runs the query (effectively an explain analyze). This might or might not matter depends on what you are trying to achieve.