저는 t-sql에서 초보자입니다. 왜이 쿼리가 그렇게 오래 실행되는지 궁금합니다. 이 방법을 최적화 할 수 있습니까 ??최적화 t-sql 쿼리
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
외래 키가 없습니다.