+ 방법은 2가지 이며, 선호하는 방향으로 쓰면 됨
-------------------------------------------------------------------------------------------------------------------------
+ 방법1 - 간단히 초만 구할때
DECLARE @start_time DATETIME, @end_time DATETIME
SET @start_time = CURRENT_TIMESTAMP
[SQL 문]
SET @end_time = CURRENT_TIMESTAMP
SELECT DATEDIFF(ms, @start_time, @end_time),DATEDIFF(ms, @start_time, @end_time)/1000
--1초는 1000미리 세컨즈
-------------------------------------------------------------------------------------------------------------------------
+ 방법2 - 자세한 쿼리 사용비용까지 나타내고자 할때
set statistics io on
set statistics profile on
set statistics time on
[ SQL 문 ]
set statistics io off
set statistics profile off
set statistics time off
-------------------------------------------------------------------------------------------------------------------------
- 대표 전화 : 02) 2061 - 0753 - Fax : 02) 2061 - 0759 - Skype : devzone24
- 주소 : 서울특별시 양천구 목1동 923-14. 현대드림타워 1024호
- 기술 문의: 02) 2061-1259 김민석 기술이사
댓글 없음:
댓글 쓰기