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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:49:50+00:00 2026-06-12T18:49:50+00:00

Indexes increase data access performance. I tried creating indexes but there was no difference

  • 0

Indexes increase data access performance. I tried creating indexes but there was no difference in the time cosumption. Am i missing something here?

My schema looks like this. (49 Columns). Id – PrimaryKey (Clustered Index)

Id | Name | Age | CountryId | CourseId | ....... | EnrolledOn

There are around 425,000 records in the table. Considering country and course are the columns used to filter the records, I created a composite index comprising these two columns (These two columns are foreign keys).

I tried the following query.

Select * From Students Where CountryId = 1 And CourseId = 1

Without indexes and with indexes the query took 11 seconds.

Note : Around 415,000 records match the above condition. Will this be a reason for no difference in the time consumed.

Can anyone help me on this.

CREATE NONCLUSTERED INDEX IX_Country_Course ON Students(CountryId,CourseId)
  • 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-12T18:49:52+00:00Added an answer on June 12, 2026 at 6:49 pm

    An index will do little if you request almost every row from a table. In that case it will only speedup if you only select fields that are in the index so the original table is not needed to get all requested data.

    So select only countryid and you might see some benefit in the above problemcase

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

Sidebar

Related Questions

OK. I've read things here and there about SQL Server heaps, but nothing too
I know that indexes on database are a good way to increase query performance,
I have some indexes in a table which name is a number(1,2,3,4...) But when
When creating indexes for an SQL table,if i had an index on 2 columns
I create indexes without the USING BTREE clause. Is there any advantage of using
I'm not quite sure how indexes works. Here's how I understood it, please correct
I know index increase the select query but slows down the insert query because
I have a table with several non PK-related indexes. Unfortunately there's some duplicity in
In MySQL, does putting SELECT foo increase in performance if foo is indexed? At
There is a similarly worded question, but I think this is slightly different. Basically,

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.