Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Left Join to Empty Result Set

Author  Topic 

vinyleli
Starting Member

2 Posts

Posted - 2015-02-27 : 18:33:16
I have a query where a table is left joined to another table based on criteria and when the result set is empty in the second table the query takes an inordinate amount of time. Can anyone explain this to me and how it might be overcome.

Vinyl Eli

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-02-27 : 18:41:17
Please show us the execution plan for when it's fast and then when it's slow.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

vinyleli
Starting Member

2 Posts

Posted - 2015-02-27 : 18:48:17
I am working up a sample to provide. May not get it posted today.

Vinyl Eli
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-02-27 : 18:51:27
Please post the query too.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -