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

  • Home
  • SEARCH
  • 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 8113753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:55:52+00:00 2026-06-06T02:55:52+00:00

I have an E-Commerce Rails Application where we need to output Orders placed by

  • 0

I have an E-Commerce Rails Application where we need to output Orders placed by Customers on a page within last one year for reporting reasons. Now, the data set is quite large and displaying these Orders on a single page takes quite a bit of SQL processing. This task initially was very slow and hence I moved all the required order details to a Redis Server and fetching of data has become really fast now but we are still not quite there.

Here’s what we have:

Rendered **path**/sales_orders.html.haml within layouts/admin (39421.1ms)
Completed 200 OK in 44925ms (Views: 39406.8ms | ActiveRecord: 417.2ms)

The application is hosted on Heroku and if a request takes more than 30s it is killed. As you can see we are well above that limit. Most of the time is lost in rendering the view.

The page contains a date filter where the user gets to choose what Date Range to select the Orders from. So, caching is not the ideal solution since Date Ranges might change every time.

Any ideas how this can be done?

The Redis keys are of the format (The following is a Redis Hash):

orders:2012-01-01:123
orders:yyyy-mm-dd:$order-id

User simply provides a Date range and I get all the keys within that date range under the orders namespace.

Here’s how I would get the Customer Name for instance from the Redis order key:

= REDIS.hget(order_key, "customer_name")
  • 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-06T02:55:53+00:00Added an answer on June 6, 2026 at 2:55 am

    Consider building the report with a periodic task using the Heroku Scheduler addon.
    As long as last-minute orders are not required to be included in the report, you can build your reports nightly and have them available for immediate download to read with your morning coffee, or even have them mailed to you (or whoever needs to read them.)

    If you need interactive selection of periods for reports, you will need to queue the requests up and build the reports using background jobs.

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

Sidebar

Related Questions

In our e-commerce application, we have different kinds of products having different kinds of
I have an e-commerce application that is exhibiting strange behavior. The product is a
I have a Sharepoint 2007 internet site using Microsoft commerce server 2009. I need
We have a client using Volusion as a storefront/e-commerce solution. We need to export
I have been working on asp.net mvc3 e-commerce application based on NopCommerce. Recently we
We have a database for an e-commerce application, we are working with JPA 2.0.
I have to create a basket/checkout page for an E-commerce site. With all these
I create a database for E-commerce. I have one thing doing it wrong and
I have been trying to work with DDD style for my e-commerce application. Most
Is it possible to merge two apps, one e-commerce application based on PrestaShop with

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.