क्या कोई मुझे इस SQL क्वेरी को ट्यून करने में मदद कर सकता है?यह SQL परिणाम इंडेक्स खोज के बजाय इंडेक्स स्कैन में क्यों परिणाम देता है?
SELECT a.BuildingID, a.ApplicantID, a.ACH, a.Address, a.Age, a.AgentID, a.AmenityFee, a.ApartmentID, a.Applied, a.AptStatus, a.BikeLocation, a.BikeRent, a.Children,
a.CurrentResidence, a.Email, a.Employer, a.FamilyStatus, a.HCMembers, a.HCPayment, a.Income, a.Industry, a.Name, a.OccupancyTimeframe, a.OnSiteID,
a.Other, a.ParkingFee, a.Pets, a.PetFee, a.Phone, a.Source, a.StorageLocation, a.StorageRent, a.TenantSigned, a.WasherDryer, a.WasherRent, a.WorkLocation,
a.WorkPhone, a.CreationDate, a.CreatedBy, a.LastUpdated, a.UpdatedBy
FROM dbo.NPapplicants AS a INNER JOIN
dbo.NPapartments AS apt ON a.BuildingID = apt.BuildingID AND a.ApartmentID = apt.ApartmentID
WHERE (apt.Offline = 0)
AND (apt.MA = 'M')
।
यहां निष्पादन योजना की तरह दिखता है:
।
मैं क्या समझ में नहीं आता कि मैं क्यों NPapplicants के लिए एक सूचकांक स्कैन हो रही है। मेरे पास एक इंडेक्स है जो बिल्डिंगआईडी और अपार्टमेंटआईडी को कवर करता है। इसका इस्तेमाल नहीं किया जाना चाहिए?
तालिका एनपीप्लिकेंट्स में कितनी पंक्तियां हैं? –
छवि नवीनतम आंकड़े अद्यतन – RichardTheKiwi