Beginner - please help me to solve this issue

Discussion in 'Ruby' started by Naina A., Apr 29, 2011.

  1. Naina A.

    Naina A. Guest

    Any idea why DB time is more here? Please help me how can I proceed
    further in solving the issue..

    Completed in 0.19635 (5 reqs/sec) | Rendering: 0.00046 (0%) | DB:
    0.04554 (23%) | 200 OK

    Completed in 0.00470 (212 reqs/sec) | Rendering: 0.00070 (14%) | DB:
    0.02763 (587%) | 200 OK

    Completed in 0.00507 (197 reqs/sec) | Rendering: 0.00079 (15%) | DB:
    0.03448 (679%) | 200 OK

    Completed in 0.00651 (153 reqs/sec) | Rendering: 0.00097 (14%) | DB:
    0.03318 (509%) | 200 OK

    Completed in 0.00478 (209 reqs/sec) | Rendering: 0.00085 (17%) | DB:
    0.05701 (1193%) | 200 OK

    I have checked the benchmark.rb file and below is how it is
    calculating.
    def active_record_runtime(runtime) db_runtime =
    ActiveRecord::Base.connection.reset_runtime db_runtime +=
    @db_rt_before_render if @db_rt_before_render db_runtime +=
    @db_rt_after_render if @db_rt_after_render db_percentage = db_runtime *
    100 / runtime " | DB: %.5f (%d%%)" % [db_runtime, db_percentage.to_i]
    end

    --
    Posted via http://www.ruby-forum.com/.
     
    Naina A., Apr 29, 2011
    #1
    1. Advertising

  2. Naina A.

    Naina A. Guest

    Okay, found the answer. We are using Solr, and frontend is querying solr
    which is converting the mysql query and taking a lot of time to run.

    --
    Posted via http://www.ruby-forum.com/.
     
    Naina A., Apr 29, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KK
    Replies:
    2
    Views:
    592
    Big Brian
    Oct 14, 2003
  2. Andrej Hocevar
    Replies:
    1
    Views:
    481
    Nick Austin
    Aug 18, 2003
  3. Replies:
    0
    Views:
    284
  4. tyler_durden
    Replies:
    7
    Views:
    351
    Nick Keighley
    Jan 3, 2005
  5. Prabahar
    Replies:
    2
    Views:
    761
    Prabahar
    Oct 21, 2007
Loading...

Share This Page