Solved

SQL Question pertaining to JOINS

Posted on 2009-06-27
1
183 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL syntax for max(date) 3 39
Creating a View from a CTE 15 49
sql trace 4 28
Rewriting a simple query 2 34
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

751 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