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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:37:15+00:00 2026-06-12T21:37:15+00:00

I had asked a question on stackoverflow: Large SQL Server database timing out PHP

  • 0

I had asked a question on stackoverflow:
Large SQL Server database timing out PHP web application

The problem was that the query was fast for when a previous date was chosen and slow for a more current date. We fixed it by recreating the index and hence it worked. For a while I thought the index might have gotten corrupted.

Today the issue occurred again (slow) and by recreating it again it ran fast. This was done on the date column which is of type datetime.

Is there a specific reason for this or is the SQL Server 2008 R2 corrupted?

  • 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-12T21:37:17+00:00Added an answer on June 12, 2026 at 9:37 pm

    try using UPDATE STATISTICS (Transact-SQL)

    Updates query optimization statistics on a table or indexed view. By
    default, the query optimizer already updates statistics as necessary
    to improve the query plan; in some cases you can improve query
    performance by using UPDATE STATISTICS or the stored procedure
    sp_updatestats to update statistics more frequently than the default
    updates.

    UPDATE STATISTICS table_or_indexed_view_name 
        [ 
            { 
                { index_or_statistics__name }
              | ( { index_or_statistics_name } [ ,...n ] ) 
                    }
        ] 
        [    WITH 
            [ 
                FULLSCAN 
                | SAMPLE number { PERCENT | ROWS } 
                | RESAMPLE 
                | <update_stats_stream_option> [ ,...n ]
            ] 
            [ [ , ] [ ALL | COLUMNS | INDEX ] 
            [ [ , ] NORECOMPUTE ] 
        ] ;
    
    <update_stats_stream_option> ::=
        [ STATS_STREAM = stats_stream ]
        [ ROWCOUNT = numeric_constant ]
        [ PAGECOUNT = numeric_contant ]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had asked a question very much similar to this in the thread: https://stackoverflow.com/questions/11259474/store-the-numericals-in-char-array-into-an-integer-variable-in-vc
I had asked this question Adding more attributes to LINQ to SQL entity Now,
I know that this question had already been asked a couple of times before,
I had asked a question here on how to get a sql function(max) result
I had a look at other stackoverflow questions and couldn't find one that asked
I had earlier asked the question in stackoverflow in the followin link- How to
i had asked a question about refering objects in a function that is inside
I am working on this problem and had previously asked related question. Implementation of
I had asked a question on how to implement real time updates in ASP.NET
I'm building off of a question I had asked and resolved earlier: front end

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.