Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8088603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:08:30+00:00 2026-06-05T19:08:30+00:00

My rails app is set up using a mysql database. When I do a

  • 0

My rails app is set up using a mysql database.

When I do a simple find eg:

Pin.find(:all).size

will result in the following

Pin Load (130.1ms)  SELECT `pins`.* FROM `pins` 
  EXPLAIN (0.6ms)  EXPLAIN SELECT `pins`.* FROM `pins` 
EXPLAIN for: SELECT `pins`.* FROM `pins` 
+----+-------------+-------+------+---------------+------+---------+------+-------+-------+
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows  | Extra |
+----+-------------+-------+------+---------------+------+---------+------+-------+-------+
|  1 | SIMPLE      | pins  | ALL  | NULL          | NULL | NULL    | NULL | 33385 |       |
+----+-------------+-------+------+---------------+------+---------+------+-------+-------+
1 row in set (0.00 sec)

 => 33385 

How do I turn off the EXPLAIN SELECT so that:

 Pin.find(:all).size

will return

Pin Load (1719.6ms)  SELECT `pins`.* FROM `pins` 
 => 43774 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:08:31+00:00Added an answer on June 5, 2026 at 7:08 pm

    In environments/development set

    config.active_record.auto_explain_threshold_in_seconds = nil
    

    and this will turn auto explain off.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a new rails app (3.1.1) using MySQL. In database.yml, I've put in
I have a rails app with authentication already set up using Devise. I'm adding
I'm using the event_calendar gem in a rails app. Event_calendar adds the following to
I am using the carrierwave gem with Rmagick in a Rails app. I've set
In a Rails 3.2 app I have two user models set up using Devise:
I´m testing my rails app using rspec and remarkable. I have the following spec
I'm using TouchJSON. Made a call to my Rails app to fetch all posts
I have inherited an app set up using built using rails using the facebooker
I am using acts_as_nested_set in my rails app. (extended with awesome nested set plugin).
I've set up a new Rails app and am using Authlogic for authentication. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.