DB time always showing as zero in Rails development log timings

Posted by Olly on Stack Overflow See other posts from Stack Overflow or by Olly
Published on 2009-08-11T14:39:16Z Indexed on 2010/06/02 1:43 UTC
Read the original article Hit count: 268

Filed under:

I've noticed that the Rails log correctly displays the time taken to execute an action in the logs, and that the View: part of that is also rendered correctly. However, the DB: value is always zero:

Aug 11 13:00:22 [2326] INFO: Completed in 2072ms (View: 94, DB: 0) | 200 OK

In fact, all my DB timings are being logged as zero. I'm logging at DEBUG level, in development mode, running Rails 2.3.2.

Apologies in advance if the answer is blatantly obvious.

© Stack Overflow or respective owner

Related posts about ruby-on-rails