Adaptive Joins SQL 2017

By | June 20, 2019

 

select a.StateName , a.CityName ,
sum(flights)
from Airports a

inner
join normalization_index n

on a.AirportSeqId = n.OriginAirportSeqID

where a.AirportSeqId > 1474703

group
by a.StateName , a.CityName

 


 

select a.StateName , a.CityName ,
sum(flights)
from Airports a

inner
join normalization_index n

on a.AirportSeqId = n.OriginAirportSeqID

where a.AirportSeqId=1451202

group
by a.StateName , a.CityName

 

 

select a.StateName , a.CityName ,
sum(flights)
from Airports a

inner
join normalization_index n

on a.AirportSeqId = n.OriginAirportSeqID

where a.AirportSeqId > 1474703

group
by a.StateName , a.CityName

OPTION (USE HINT
(‘DISABLE_BATCH_MODE_ADAPTIVE_JOINS’))

Category: Databases

About admin

This post was written by Jayanth Kurup. A Microsoft SQL Server Consultant and Trainer based out of Bangalore, India. Jayanth has been working on MS SQL Server for over 15 years. He is a performance tuning and Business Intelligence expert. Having worked with companies like Microsoft, DELL, Wells Fargo, Thomson Reuters and many other fortune 100 companies. Some other technologies Jayanth works on include Microsoft Azure, PowerBI, Python and AWS. When he isn’t consulting or training, Jayanth like to travel, paint and read. He is also very active in social causes and the founder of Enabled Business Solutions. Visit his company by clicking the link in the menu or email him directly.