vendredi 27 février 2015

Join to a Culture Table vs Select Culture ID


I have a query that is executed several hundred thousand times a day. Due to legacy support, the incoming variables on this SP cannot change. Currently it looks like this:



Select id,
name,
otherdata
FROM Table1 t1
--<Various joins with aliases>--
INNER JOIN Culture c on c.id = t1.ID_Culture
WHERE
c.CultureTag = @CultureTag -- Usually 'en-US'


My question is: Would it be more efficient to remove the join to the culture table, and instead, SELECT the value of the primary key on the culture table and use THAT in the where clause? Would it be negligible?





Aucun commentaire:

Enregistrer un commentaire