---
title: "SqlServer 查询sql执行时间"
author: "HJXia"
date: "2008-04-25T16:40:52Z"
tags: []
slug: "sqlserver-sql"
draft: false
lastmod: "2008-04-25T16:40:52Z"
id: 186856
url: "https://hjxia.iteye.com/blog/186856"
---

在查询分析器中输入以下内容：

<span style="color:red">set statistics profile on
set statistics io on
set statistics time on
go
　　<这里写上你的语句...>
go
set statistics profile off
set statistics io off
set statistics time off</span>

在２个go之间输入sql语句．然后在消息模式下查看．