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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:47:26+00:00 2026-05-19T16:47:26+00:00

I have 20+ supporting tables set up the following way [common_column1, common_column2, unique_column] I

  • 0

I have 20+ supporting tables set up the following way

[common_column1, common_column2, unique_column]

I need to come up with a combined table or a view that would be set up like this

[common_column1, common_column2, 
 table1_unique_column, table2_unique_column, table3_unique_column, etc...]

I have 6 million + records in every supporting table. My combined table / view creation query looks like this:

select 
   a.common_column1, a.common_column2, a.unique_column, b.unique_column, 
   c.unique_column, d....  
into combined_table  
from table1 as a   
left join table2 as b on (a.common_column1 = b.common_column1 and a.common_column2 = b.common_column2)  
left join table3 as c on (a.common_column1 = c.common_column1 and a.common_column2 = c.common_column2)  
left join table4 as d ...`   

My primary object is to have the best read performance on the combined table / view, which I will be querying multiple times on all fields. Could you, please, suggest what would be better: to create a combined table and put indexes onto its every column or to put indexes onto every common column of every supporting table and then create a combined view? Or is there some other way to achieve my goal?

  • 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-19T16:47:26+00:00Added an answer on May 19, 2026 at 4:47 pm

    If you had no LEFT JOIN, you could investigate the indexed views – but since you those left joins, those are out of the question.

    Using LEFT JOIN is messy and costly – and there’s really not much “magic” to speeding this up.

    Just make sure to have an index on each and every foreign key column(s) in the child tables that you use in your joins, and on your columns in the WHERE clause(s) – that’s about all you can do, I’m afraid…

    But be aware: too many indices can be worse than no indices at all… pick them carefully!

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

Sidebar

Related Questions

The same way DOS morphed into Windows? We seem to have ended up supporting
I have a copy of my db in Supporting Files folder. I need update
I have the following setup: Tasks, Accounts and Groups tables. Tasks can be assigned
Background I have an oracle database table with a lot of columns that I'm
I have an application that displays league tables for sporting leagues. These tables are
I have a DataGridView that pulls data from a couple tables similarly to this
There are two tables: table A and table B. They have the same columns
I'm sure I'm going to have to write supporting javascript code to do this.
I have a working Lucene index supporting a suggestion service. When a user types
I have an existing MFC product and am planning on supporting a couple of

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.