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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:11:37+00:00 2026-06-04T06:11:37+00:00

I have 4 full-outer joins in my query and its really slow, So does

  • 0

I have 4 full-outer joins in my query and its really slow, So does the order of FULL OUTER JOIN make a difference in performance / result ?

FULL OUTER JOIN = ⋈

Then,

I have a situation : A ⋈ B ⋈ C ⋈ D

All joins occur on a key common to all k contained in all A,B,C,D

Then:

  • Will changing the order of ⋈ joins make a difference to performance ?
  • Will changing the order of ⋈ change the result ?

I feel that it should not affect the result, but will it affect the performance or not I am not sure !

Update:

Will SQL Server automatically rearrange the joins for better performance assuming the result set will be independent of the order ?

  • 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-04T06:11:39+00:00Added an answer on June 4, 2026 at 6:11 am

    No, rearranging the JOIN orders should not affect the performance. MSSQL (as with other DBMS) has a query optimizer whose job it is to find the most efficient query plan for any given query. Generally, these do a pretty good job – so you’re unlikely to beat the optimizer easily.

    That said, they do get it wrong occasionally. That’s where reading an execution plan comes into play. You can add JOIN hints to tell MSSQL how to join your tables (at which point, ordering does matter). You’d generally order from smallest to largest table (though, with a FULL JOIN, it’s not likely to matter very much) and follow the rules of thumb for join types.

    Since you’re doing FULL JOINS, you’re basically reading the entirety of 4 tables off disk. That’s likely to be very expensive. You may want to re-examine the problem, and see if it can be accomplished in a different way.

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

Sidebar

Related Questions

I have an SQL query SELECT * FROM A FULL OUTER JOIN B ON
I have noticed a strange behaviour of FULL OUTER JOIN in Oracle 11. I
I have a question regarding a FULL OUTER JOIN in MySQL. I have two
I have 2 tables on which I am doing a full outer join.Both the
SELECT EmployeeMaster.EmpNo, Sum(LeaveApplications.LeaveDaysTaken) AS LeaveDays FROM EmployeeMaster FULL OUTER JOIN LeaveApplications ON EmployeeMaster.id =
In general, I believe FULL OUTER JOIN Considered Harmful, to turn the phrase. Background:
I have two tables payroll_advance and payroll_advrtn ,and i supposed to do full outer
Since SQLite does not support RIGHT OUTER JOINS I pose the following challenge (read:
I have a problem with an outer join. I found this very helpful stackoverflow
I have two columns of data I am lining up using a Full Outer

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.