# Can you give a answer?

**URL:** <https://www.ruby-forum.com/t/can-you-give-a-answer/70374>\
**Category:** Rails\
**Created:** [February 19, 2006, 6:30am UTC](https://www.ruby-forum.com/t/can-you-give-a-answer/70374 "2006-02-19T06:30:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [February 19, 2006, 6:30am UTC](https://www.ruby-forum.com/t/can-you-give-a-answer/70374/1 "2006-02-19T06:30:40Z")

</div>

when i tail -f my log:

i find this:

“Completed in 0.00233 (428 reqs/sec) | Rendering: 0.00005 (2%) | DB:  
0.00118 (50%)”

i am sure, this request didn’t access DB. but why here DB is (50%)

it’s log wrong or my fault?

regards

---

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [February 19, 2006, 11:56am UTC](https://www.ruby-forum.com/t/can-you-give-a-answer/70374/2 "2006-02-19T11:56:58Z")

</div>

Hi, Joe,

may I ask why you are that sure that your DB isn’t hit? Have you  
doublechecked that if it is a page that is served from cache the  
controller  
action knows this and really bypasses the DB? Are you sure, that  
sessions  
are handled by the filesystem (the default) or may they are the reason  
for  
DB requests? What happens if you shut down the DB for this request?

Best Regards  
Jan P.

---

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [February 19, 2006, 1:08pm UTC](https://www.ruby-forum.com/t/can-you-give-a-answer/70374/3 "2006-02-19T13:08:17Z")

</div>

hi jan  
when i shout down db. access is fail.

but, i’m sure there are no db hit.  
my controller  
#-------------------------------  
def index  
render(:text=\>‘hello’)  
return  
end  
#--------------------------------

and my sessions is by default

Jan P. wrote:

> Hi, Joe,
> 
> may I ask why you are that sure that your DB isn’t hit? Have you  
> doublechecked that if it is a page that is served from cache the  
> controller  
> action knows this and really bypasses the DB? Are you sure, that  
> sessions  
> are handled by the filesystem (the default) or may they are the reason  
> for  
> DB requests? What happens if you shut down the DB for this request?
> 
> Best Regards  
> Jan P.

---

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [February 19, 2006, 3:32pm UTC](https://www.ruby-forum.com/t/can-you-give-a-answer/70374/4 "2006-02-19T15:32:29Z")

</div>

On Sunday, February 19, 2006, at 1:08 PM, Joe B. wrote:

> #--------------------------------
> 
> and my sessions is by default

try swithcing to production enviroment…rails is probably interogation  
the db for your models…  
Mikkel B.

www.strongside.dk - Football Portal(DK)  
[nflfeed.helenius.org](http://nflfeed.helenius.org) - Football News(DK)  
ting.minline.dk - Buy Old Stuff!(DK)

---

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [February 19, 2006, 3:47pm UTC](https://www.ruby-forum.com/t/can-you-give-a-answer/70374/5 "2006-02-19T15:47:41Z")

</div>

On Feb 19, 2006, at 12:30 AM, Joe B. wrote:

> it’s log wrong or my fault?  
> Have you tried this in production mode?

* * *

Bob H. – blogs at \<[http://www.recursive.ca/](http://www.recursive.ca/)  
hutch/\>  
Recursive Design Inc. – [http://www.recursive.ca/](http://www.recursive.ca/)  
Raconteur – [http://www.raconteur.info/](http://www.raconteur.info/)  
xampl for Ruby – [http://rubyforge.org/projects/xampl/](http://rubyforge.org/projects/xampl/)

---

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [February 20, 2006, 4:47am UTC](https://www.ruby-forum.com/t/can-you-give-a-answer/70374/6 "2006-02-20T04:47:32Z")

</div>

thanks Mikkel,  
you r right. when i swith to production environment, db is 0%;

cheers

Mikkel B. wrote:

> On Sunday, February 19, 2006, at 1:08 PM, Joe B. wrote:
> 
> > #--------------------------------
> > 
> > and my sessions is by default
> 
> try swithcing to production enviroment…rails is probably interogation  
> the db for your models…  
> Mikkel B.
> 
> www.strongside.dk - Football Portal(DK)  
> [nflfeed.helenius.org](http://nflfeed.helenius.org) - Football News(DK)  
> ting.minline.dk - Buy Old Stuff!(DK)
