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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:10:20+00:00 2026-06-09T20:10:20+00:00

A simple question on how database Indexes work. Suppose i have a table ‘Student’

  • 0

A simple question on how database Indexes work.

Suppose i have a table ‘Student’ with columns id(primary_key), name and GPA. Assume that i have an index on id and on no other columns

Now if i query for a record using name and GPA(not with id), it has to search all records for a match. what is the advantage of index here ?

Are the indexes effective only when the query contains the indexed columns ?

  • 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-09T20:10:20+00:00Added an answer on June 9, 2026 at 8:10 pm

    if i query for a record using name and GPA(not with id), it has to search all records for a match. what is the advantage of index here?

    You are correct. There is no advantage, except that unique indexes may also enforce uniqueness

    Are the indexes effective only when the query contains the indexed columns?

    Basically yes for finding matching rows, although indexes can also be used to help sorting if the order by contains an indexed column

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

Sidebar

Related Questions

I have a simple question in creating table in database. Here's my code: $query=CREATE
I have a simple question related to database schema, how can I check whether
I've a simple question. My database structure is: id | name | left |
I have a database table called tbl_event with the non-clustered indexes IDX_Event_Folder and IDX_Event_Time
A simple question, doing my head in... I have a large access database to
This is probably a simple question. I have a database that I'm using to
A simple question: I have a Model-View-Controller setup, with Models accessing a SQL database.
I think this is a simple question. We have a MySQL database with a
Hey guys I have a simple database question. Say I am emulating a university
Simple question here: I like to know if a constraint in a oracle 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.