Je suis novice en t-sql, et je me demande pourquoi cette requête s'exécute si longtemps? Y a-t-il un moyen d'optimiser cela?Optimisation t-sql requête
update aggregateflags set [email protected] where [email protected] and [email protected] and [email protected] and value != 2 and [email protected]
IF @@ROWCOUNT=0
Select * from aggregateflags where [email protected] and [email protected] and [email protected] and value = 2 and [email protected]
IF @@ROWCOUNT=0
insert into aggregateflags (objectcode,objecttype,value,type,storagetype)
select @objectcode,@objecttype,@value,@type,@storagetype
@value int
@storagetype int
@type int
@objectcode nvarchar(100)
@objecttype int
Il n'y a pas de clé étrangère.