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 6826171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:06:56+00:00 2026-05-26T22:06:56+00:00

Using active_admin, I am witnessing slowness with respect to loading an index for a

  • 0

Using active_admin, I am witnessing slowness with respect to loading an index for a model that has many records. I am not sure that this related to the other reported cases of slowness.

2011-11-10 13:26:14 rails[35848]  INFO: Started GET "/admin/articles" for 127.0.0.1 at Thu Nov 10 13:26:14 -0800 2011
2011-11-10 13:26:14 rails[35848]  INFO: Processing by Admin::ArticlesController#index as HTML
2011-11-10 13:26:14 rails[35848]  DEBUG: AdminUser Load (0.3ms)  SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 LIMIT 1
2011-11-10 13:26:14 rails[35848]  DEBUG: Article Load (381.2ms)  SELECT "articles".* FROM "articles" ORDER BY publish_date desc, guid desc, "articles".id desc LIMIT 30 OFFSET 0
2011-11-10 13:26:14 rails[35848]  DEBUG: SQL (0.5ms)  SELECT COUNT(*) FROM "articles"
2011-11-10 13:26:14 rails[35848]  DEBUG: CACHE (0.0ms)  SELECT COUNT(*) FROM "articles"
2011-11-10 13:26:14 rails[35848]  DEBUG: CACHE (0.0ms)  SELECT COUNT(*) FROM "articles"
2011-11-10 13:26:21 rails[35848]  DEBUG: PendingArticle Load (6602.8ms)  SELECT "pending_articles".* FROM "pending_articles" ORDER BY created_at desc
2011-11-10 13:26:41 rails[35848]  DEBUG: Domain Load (1.0ms)  SELECT "domains".* FROM "domains"
2011-11-10 13:26:41 rails[35848]  INFO: Rendered /Users/sorens/.rvm/gems/ruby-1.8.7-p299@rails3/gems/activeadmin-0.3.4/app/views/active_admin/resource/index.html.arb (27605.5ms)
2011-11-10 13:26:41 rails[35848]  INFO: Completed 200 OK in 27645ms (Views: 20629.0ms | ActiveRecord: 6985.8ms)

this was a request for /admin/articles. my article model has a belongs_to :pending_article. pending_article has has_one :article, :autosave => true.

I have a few questions

(1) Can I prevent this additional query? I am not accessing any field in any pending_article from the index view of article. it seems that the article query is correctly scoped by pagination but the follow-on query to pending_article appears to grab them all.

(2) why does the render of index.html.arb take 27+ seconds if it is just showing 30 records?

I am using Ruby 1.8.7-p299, Rails 3.0.5 and active_admin 0.3.4. The above output is from my development environment (it takes even longer on Heroku). In the above example, I had 10,708 articles and 17,648 pending_articles.

  • 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-05-26T22:06:56+00:00Added an answer on May 26, 2026 at 10:06 pm

    By default the form includes a filter for each attribute, which means it is trying to create a nice popup for all your pending articles. Instead of just using the default, try defining the filter list with:

    ActiveAdmin.register Article do
      filter :title
    end
    

    And just be sure to skip the pending_articles. That should prevent it from loading all those records.

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

Sidebar

Related Questions

I was downloading a csv of a model using active admin 0.3.4 that had
I am using the active_admin gem in my Rails 3 application, which has as
I have a rails app that is using Devise, with a User model, no
I have using awesome_nested_set with active_admin. But I found that active_admin can't find nested_set_options
Am using django forms on my app. I have a model Client like this:
I'm using active_admin and that's bringing in meta_search to my project. (Which I don't
Here is my model structure: A User has and belongs to many groups A
I'm using Rails 3, ActiveAdmin and Kaminari. I have this on the documents.rb file
I have a linq query that for whatever reason is not coming back ordered
I am using the active_admin gem and, since it requires the meta_search gem, 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.