Rails - Completed time for a request significantly higher than View and DB times

前端 未结 1 850
攒了一身酷
攒了一身酷 2021-02-07 14:20

I have a controller that returns JSON or XML from a fairly complex relational query with some controller logic as well.

I\'ve tuned on the DB side by refining my query a

1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-07 14:33

    Your DB number is time actually spent in the database, but not loading ActiveRecord objects.

    So if you're loading 168,000 ruby active_record objects to render then as JSON, this would explain your 550 ms (or more!)

    0 讨论(0)
提交回复
热议问题