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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:08:54+00:00 2026-05-21T03:08:54+00:00

I have a typical scenario that I’m struggling with from a performance standpoint. The

  • 0

I have a typical scenario that I’m struggling with from a performance standpoint. The user selects a value from a dropdown and clicks a button. A stored procedure takes that value as an input parameter, executes, and returns the results to a grid. For just one of the values (‘All’), the query runs for roughly 2.5 minutes. For the rest of the values the query runs less than 1ms.

Obviously, having the user wait for 2.5 minutes just isn’t going to fly. So, what are some typical strategies to handle this?

Some of my own thoughts:

  • New table that stores the information for the ‘All’ value and is generated nightly
  • Cache the data on the caching server

Any help is appreciated.

Thanks!

Update

A little bit more info:

sp returns two result sets. The first is a group by rollup summary and the second is the first result set, disaggregated (roughly 80,000 rows).

  • 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-21T03:08:55+00:00Added an answer on May 21, 2026 at 3:08 am

    Caching data is a good thing, but…. if the SP is inherently flawed, then you might want to actually fix it instead of trying to bandage it with caching.

    You might also want to (since you didn’t mention here) look at the number of rows “All” returns compared to the other selections and think about your indexes.

    Also in your SP does the “All” cause it to run a different sets of tsql as in maybe a case or an if… or is it running the same code just with a different “WHERE”?

    It might simply be that “ALL” just returns A LOT of records. You may want to implement paging and partial dataset return using ajax… (kinda like return the first 1000 records early so that it can be displayed and also show a throbber on the screen while the rest of the dataset is returned)

    These are all options… if the number of records really isnt that different between ALL and the others… then it probably has something to do with the query/index/program flow.

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

Sidebar

Related Questions

I have this typical scenario. I have a smartclient application built on .net 2.0
In a typical enterprise scenario with in-house development, you might have dev, staging, and
i have in the database typical tables like user, usergroup, and they have relations.
I have a win form UI that looks like a typical calculator. Naturally I
Typical scenario, post to an action that checks ModelState.IsValid and if it is, saves
I have a typical situation. my table has four column. (id, user, col2, status)
We have a typical business application with an Outlook-looking Winforms client talking to asmx
Let's say you have a typical web app and with a file configuration.whatever. Every
It is typical to have something like this in your cshrc file for setting
We have 5mb of typical text (just plain words). We have 1000 words/phrases to

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.