Solved

SQL Question pertaining to JOINS

Posted on 2009-06-27
1
182 Views
Last Modified: 2012-05-07
Is there a maximum amount of Joins allowed per SELECT statement? I have one that will contain numerous Joins, would I be best served to break them all into temp tables and re-join them? What would be my best way to handle this?
0
Comment
Question by:Jeff S
1 Comment
 
LVL 23

Accepted Solution

by:
Racim BOUDJAKDJI earned 500 total points
ID: 24727675

<<s there a maximum amount of Joins allowed per SELECT statement?>>
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_21855910.html

<<I have one that will contain numerous Joins, would I be best served to break them all into temp tables and re-join them? >>
It really depends on the structure and the type of joins.  Sometime it is better to use temp tables to avoid blocking sometimes it's not.  Hard to say without knowing both your schema and statement.

<<What would be my best way to handle this?>>
I would suggest you start without using any temp table then test yo see if you have blockings.  If you detect specific blockings or slow performance then you can consider replacing joins by temp tables.  most of the time, if the indexing is well done, temm tables are unecessary but sometime there are no other way.

HTH
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question