# Display ActiveRecord runtime info in the view

**URL:** <https://www.ruby-forum.com/t/display-activerecord-runtime-info-in-the-view/180534>\
**Category:** Rails\
**Created:** [December 21, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/display-activerecord-runtime-info-in-the-view/180534 "2009-12-21T13:19:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartocc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@bartocc](https://www.ruby-forum.com/u/bartocc)\
**Post date:** [December 21, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/display-activerecord-runtime-info-in-the-view/180534/1 "2009-12-21T13:19:38Z")

</div>

Hi list,

In Rails logs, at the end of each request, the log states something  
like  
Completed in 37ms (View: 1, DB: 8)

Is there a simple way to access the “DB: 8” info in the view ?

Thanks

Julien

–

You received this message because you are subscribed to the Google  
Groups “Ruby on Rails: Talk” group.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![bartocc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@bartocc](https://www.ruby-forum.com/u/bartocc)\
**Post date:** [December 22, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/display-activerecord-runtime-info-in-the-view/180534/2 "2009-12-22T21:08:27Z")

</div>

On Dec 21, 7:14 am, Julien P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi list,
> 
> In Rails logs, at the end of each request, the log states something  
> like  
> Completed in 37ms (View: 1, DB: 8)
> 
> Is there a simple way to access the “DB: 8” info in the view ?

If you’re just looking to access it in development, take a look at  
Rails Footnotes:

> **[GitHub - indirect/rails-footnotes: Every Rails page has footnotes that gives...](https://github.com/indirect/rails-footnotes)**
>
> Every Rails page has footnotes that gives information about your application and links back to your editor - GitHub - indirect/rails-footnotes: Every Rails page has footnotes that gives information...

which can do that and a bunch more. If you need it in production, you  
might want to poke around the internals of rails-footnotes to figure  
out to get the info.

–Matt J.

–

You received this message because you are subscribed to the Google  
Groups “Ruby on Rails: Talk” group.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).
