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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:51:59+00:00 2026-05-22T15:51:59+00:00

Given a database table example: ID Name DateOfBirth Say I wanted to create an

  • 0

Given a database table example:

ID
Name
DateOfBirth

Say I wanted to create an index on date of birth, I might add the index on DateOfBirth ascending. If my code now queries on DOB ascending, it will run nice and fast.

However, are databases intelligent enough to use the index in reverse, i.e, if I queried orderby DateOfBirth descending would it still be able to utilise that index, or should I create another one specifically for descending ordering?

  • 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-22T15:52:00+00:00Added an answer on May 22, 2026 at 3:52 pm

    The index pages form a doubly linked list as shown below with pointers to both the next and previous page.

    enter image description here

    Thus SQL Server can traverse the index both backwards and forwards. The Scan direction is shown in the properties of the execution plan.

    Where the Asc/Desc becomes important is in composite indexes.

    If the index was defined as ID ASC, Name ASC, DateOfBirth ASC this would still require a sort for the query ORDER BY ID ASC, Name DESC, DateOfBirth ASC for example.

    Note that you may have more composite indexes than you realise as well as a non unique non clustered index will have the clustered index key value added to its key.

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

Sidebar

Related Questions

Given a model's instance object, how can I get the database table's name? I
Given a table named person (in a MySQL database/schema), kind of like this one:
Given a database schema with a parent table and two or more child tables.
I'm using the W3 Schools example: http://www.w3schools.com/PHP/php_ajax_database.asp to display a table of database data
Does anyone know a way to auto-generate database tables for a given class? I'm
Given a database field named widget_ids, containing data like 67/797/124/ or 45/, where the
I was given a MySQL database file that I need to restore as a
For a given form in a database, is there a quick/easy way to find
I was given a task to display when a record in the database was
Given the following XML: <databases> <database> <title_display>Aardvark</title_display> </database> <database> <title_display>Apple</title_display> </database> <database> <title_display>Blue</title_display> </database>

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.