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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:15:56+00:00 2026-06-16T17:15:56+00:00

I have simple query which is taking around 7-8 seconds for to retreive the

  • 0

I have simple query which is taking around 7-8 seconds for to retreive the data from database which I want to fine tune further to 2-3 seconds.

Table :

UpdateDateTime | field1 | field2 |..... FieldN.

Query is :

Select *  
from Table with (nolock)  
where UpdateDateTime Between D1 and D2  
Order By UpdateDateTIme  

I have created Clustered Index On UpdateDateTime

What could be done further to increase its Efficiency?

  • 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-16T17:15:57+00:00Added an answer on June 16, 2026 at 5:15 pm

    Reduce the number of columns returned is the obvious answer, then create a covering (nonclustered) index on UpdateDateTIme and INCLUDE the other selected columns.

    CREATE NONCLUSTERED INDEX NC_MyCoveringIndex 
       ON Table(UpdateDateTime)
          INCLUDE (Col1, Col2, ..., ColN)
    

    Ref.

    [Note: It’s not ideal to create a wide covering index that includes all the columns in the table.]

    A lot depends on how selective your WHERE clause is. If it returns (approximately) greater than 10% of the number of rows in the table, then the optimiser will probably just scan the clustered index anyway.

    That’s pretty much it. Beyond you need to take a look at your hardware, and how much data you are pulling across the wire.

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

Sidebar

Related Questions

I have simple insert into.. query which is taking around 40 seconds to execute.
I have a simple query which loops and I want to see the PRINT
I have a simple query which queries by item_id and it obviously works because
I have a simple query which is returning records based on the field status
I have a simple query to show a given users photos: SELECT pid FROM
i have this simple query : SELECT YEAR(P.DateCreated) ,MONTH(P.DateCreated) ,COUNT(*) AS cnt FROM tbl1,
I have this simple query: SELECT xObjectID, xObjectName FROM dbo.xObject where CONTAINS( xObjectRef, '1838
I have a simple query in php on oracle: $query='select u.username,u.lastname,u.firstname,c.event,c.reason from users u,
My query is currently taking roughly 3 seconds, which I'm sure can be optimized.
I have the following query which is takin 3 seconds on a table of

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.