Solved

SQL Question pertaining to JOINS

Posted on 2009-06-27
1
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

636 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