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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:52:42+00:00 2026-06-09T02:52:42+00:00

If I make an index on 2 decimal columns col1 , col2 , what

  • 0

If I make an index on 2 decimal columns col1, col2, what kind of lookups have I made faster?

Intuitively, it can satisfy exact matches on both columns and works on a where col1... and doesnt work at all for where col2 .... And also range searches on col1 but not on col2; and range searches on col2 given col1.

What is the correct answer?

  • 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-09T02:52:43+00:00Added an answer on June 9, 2026 at 2:52 am

    It will be fater for condition

    where col1=(something) and  col2=(something)
    

    or for just where col1=(something)

    It will not use this index for

    where col2=(something) and  col1=(something)
    

    For Range searches, it will be faster only for col1, as col1 is in the left most in the index

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

Sidebar

Related Questions

How do I make the following url forbidden in apache; main/index.php?site=ing I have tried
You can see my project here - http://www.inluxphoto.com/custom/jsgallery/index.php I am attempting to make the
For my Information Retrieval class I have to make an index of terms from
I make Views/About/Index.aspx and Views/Faq/Index.aspx + Controllers/AboutController.cs and Controllers/FaqController.cs controllers for these purposes. I
im trying to make a simple search on my database from the index action
I used to make my own layout for managing loading pages inside the index
I wanted to make a post request in this website: http://www.prezup.info/index.php?page=films in order to
My search system has two main parts: index and search. I want to make
I can't compile yaml-cpp in RAD Studio 2010. I have error in nodeutil.h template
I have large table. consisting of only 3 columns (id(INT),bookmarkID(INT),tagID(INT)).I have two BTREE indexes

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.