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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:29:57+00:00 2026-05-28T16:29:57+00:00

I want to make one table with 4 columns. One is the primary key

  • 0

I want to make one table with 4 columns. One is the primary key and the other three columns are references to columns of other tables. I want to use it to join these four tables to make a search filter. These joins are taking time.

I was thinking I should index these columns because I read that adding indexes on column used in join conditions [makes them run faster]. My question is will there be a problem if all columns of the table are indexed? Or is there any other way to decrease time complexity of the search filter. Thanks in advance.

More Hint:
Table1(main search)-1000 entries
primary_key
fk1
fk2
fk3

Table2-800 entries
pk1
..(8-9 columns)

Table3-700 entries
pk2
..(10-12 columns)

Table2-850 entries
pk3
..(7-8 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-05-28T16:29:59+00:00Added an answer on May 28, 2026 at 4:29 pm

    Creating an index requires additional disk space, and that too many indexes can cause issues arising from the file systems size limits, careful thought must be used to select the correct fields to index.

    Since indexes are only used to speed up the searching for a matching field within the records, it stands to reason that indexing fields used only for output would be simply a waste of disk space and processing time when doing an insert or delete operation, and thus should be avoided. Also given the nature of a binary search, the cardinality or uniqueness of the data is important. Indexing on a field with a cardinality of 2 would split the data in half, whereas a cardinality of 1,000 would return approximately 1,000 records. With such a low cardinality the effectiveness is reduced to a linear sort, and the query optimizer will avoid using the index if the cardinality is greater than 30% of the record number, effectively making the index a waste of space.

    So better to add indexing on group of columns.

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

Sidebar

Related Questions

I have a messages table with the following columns: id (primary Key) username timestamp
I'm creating a table with two columns that I want to auto-increment. One column
I want to make an autoincrement primary index column when making a table. It
This is the situation: I have two tables where the one references the other
I have a problem with assigning a primary key in one of the tables
I want to make one website for all PC, IPhone, Blackberry, Windows Mobile (IE
I want to make one thread that puts values to a queue when it
HI all I want to make one app for iPhone 2.2.* and for version
I want to make a really simple iphone app: one screen with a single
I have one small online sale business but I want to make it scalable

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.