Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

How to reduce the joins in sql querry Expand / Collapse
Author
Message
Posted Wednesday, November 20, 2013 2:53 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Yesterday @ 3:10 AM
Points: 44, Visits: 515
GilaMonster (11/14/2013)
Bhuvnesh (11/14/2013)
mpradeep23 (11/13/2013)
how do i join tables with out joins
You can .... for that you have to do table level changes like merging two tables (which contains parent-child relationship or similar kind of data).
and that process is known as denormalization.


and it's usually a bad idea.


BAd and really expensive cause then you may have to re develop the entire application


===========================================
performance issue:
(1) Have you update the statistics on all tables of underling query?
(2) Are you using index well on the tables?
(3) Can you simplify your Query by re-writing it .
(4) are indexes are Defragmented well ?

Post #1515960
Posted Wednesday, November 20, 2013 2:55 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Yesterday @ 3:10 AM
Points: 44, Visits: 515
mpradeep23 (11/13/2013)
Hi

I have select query with 10 Joins in place with different i want to improve the performance of the
query how do i join tables with out joins


thanks

Pradeep


please post the actual execution plan.



===========================================
performance issue:
(1) Have you update the statistics on all tables of underling query?
(2) Are you using index well on the tables?
(3) Can you simplify your Query by re-writing it .
(4) are indexes are Defragmented well ?

Post #1515961
Posted Wednesday, November 20, 2013 3:36 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, September 29, 2014 10:46 AM
Points: 2,734, Visits: 943
10 or more joins are not a problem.
Bad normalized/designed data structure and no properly indexed tables are.

Just try to outer join two big tables by no indexed columns or using implicit data type conversion and you ill fell the pain.
(inner) joining 10 huge (well designed) tables by (tunned) indexed columns ill run smoothly.
Post #1515975
Posted Wednesday, November 20, 2013 8:52 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 3:02 AM
Points: 4,368, Visits: 6,209
jcb (11/20/2013)

...(inner) joining 10 huge (well designed) tables by (tunned) indexed columns ill run smoothly.


Until you have some data value skew, in which case the probability of getting screwed increases with increasing numbers of joins


Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #1516091
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse