Plugins - Query Stats

StarAdd to favorites

Query Stats Plugin

The Query Stats plugin helps track database queries and performance. It helps developers know the performance of their interaction with databases without constantly watching the logs.

Requirements

  • Rails >= 1.2

Usage

Use the "queries" helper or controller method to access data on the queries. See the documentation on QueryStats::Holder for functionality.

You can easily display statistics in your page footer, such as:

  Queries in Controller: <%= queries.count_with_label :controller %>
  Queries in View:       <%= queries.count_with_label :view %>
  Query Time:            <%= queries.runtime %>

Logging

QueryStats adds the number of queries to the log in the DB section:

  Completed in 0.00642 (155 reqs/sec) | Rendering: 0.00228 (35%) | DB: 0.00247 (38%) 6 queries | 200 OK [http://test.host/]

Copyright © 2006-2007 Dan Manges, released under the MIT license.

Dan Manges

http://code.google.com/p/query-stats/

http://query-stats.googlecode.com/svn/trunk/query_stats/

Rails' (MIT)

  • Currently 4.7/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Statistics and Logs

Tags

Comments

Add a comment
Alex 23 Nov 2007

Very nice plugin, especially when used in combination with

http://agilewebdevelopment.com/plugins/textmate_footnotes

I've integrated the two -- install textmate_footnotes and check out

http://pastie.caboo.se/121090

Rick 27 Nov 2006

Great plugin, but doesn't work when using components...

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.
Recruiting software

Have a comment?