Hi,
I'm at my wits end! I have two large tables one with 1.2mill one with 2.3 mill and they are very wide tables. I have a select with an inner join. All columns used in the join are contained in indexes. But it does an index scan and a massive hashmatch. Why is this? both tables have columns in the index ordered the same, all datatypes of the indexes are ints. The code looks like this.
SELECT TblActivities.*
FROM TblActivities
INNER JOIN TblBookingsCrai g
ON
TblActivities.c lientID = TblBookingsCrai g.clientid AND
TblActivities.c ampaignID = TblBookingsCrai g.campaignid AND
TblActivities.S upplierID = TblBookingsCrai g.SupplierID and
TblActivities.C reativeVersion = TblBookingsCrai g.CreativeVersi on
Does anyone know why it won't perform an index seek?
Cheers
C
I'm at my wits end! I have two large tables one with 1.2mill one with 2.3 mill and they are very wide tables. I have a select with an inner join. All columns used in the join are contained in indexes. But it does an index scan and a massive hashmatch. Why is this? both tables have columns in the index ordered the same, all datatypes of the indexes are ints. The code looks like this.
SELECT TblActivities.*
FROM TblActivities
INNER JOIN TblBookingsCrai g
ON
TblActivities.c lientID = TblBookingsCrai g.clientid AND
TblActivities.c ampaignID = TblBookingsCrai g.campaignid AND
TblActivities.S upplierID = TblBookingsCrai g.SupplierID and
TblActivities.C reativeVersion = TblBookingsCrai g.CreativeVersi on
Does anyone know why it won't perform an index seek?
Cheers
C
Comment