易截截图软件、单文件、免安装、纯绿色、仅160KB

Sql Server 查询sql执行各个阶段的时间

Sql Server 查询sql执行各个阶段的时间
set statistics io on
set statistics time on
set statistics profile on
go
[你的sql语句]
go
set statistics io off
set statistics time off
set statistics profile off

我运行:
set statistics io on
set statistics time on
set statistics profile on
go
select * from Users
go
set statistics io off
set statistics time off
set statistics profile off
结果:
SQL Server 执行时间:
   CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
SQL Server 执行时间:
   CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
SQL Server 分析和编译时间:
   CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
SQL Server 分析和编译时间:
   CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
(所影响的行数为 1 行)
表 'Users'。扫描计数 1,逻辑读 2 次,物理读 0 次,预读 0 次。
SQL Server 执行时间:
   CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
(所影响的行数为 2 行)
SQL Server 执行时间:
   CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
SQL Server 执行时间:
   CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
SQL Server 分析和编译时间:
   CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。
SQL Server 执行时间:
   CPU 时间 = 0 毫秒,耗费时间 = 0 毫秒。


相关文档:

笔试SQL语句——学习笔记

定义:
create table 表名(列名1 类型 [not null] [,列名2 类型] [not null],···) [其他参数]
修改:
alter table 表名 add 列名 类型
alter table 表名 rename column 原列名 to 新列名
alter table 表名 alter column 列名 类型 [(宽度) [,小数位]]
alter table 表名 drop column 列名 ......

SQL SERVER登录用户在服务器上的权限

SQL SERVER登录用户在服务器上的权限
一个登录用户到底在SQL SERVER实例上有什么样的权限,下面以SQL SERVER2005为例来细数一下。
一.
首先查看该登录用户属于哪个固定服务器角色。所有SQL SERVER的登录用户和角色都会在master.sys.server_principal视图上有一条记录。而记录登录用户属于什么服务器角色的视图是master. ......

SQL大全

一、基础
1、说明:创建数据库
CREATE DATABASE database-name
2、说明:删除数据库
drop database dbname
3、说明:备份sql server
--- 创建 备份数据的 device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'
--- 开始 备份
BACKUP DATABASE pubs TO testBack
4、说 ......

c# SQL数据库远程连接及配置方法

c# SQL数据库远程连接及配置方法
一:C# 连接SQL数据库
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
Server=myServerAddress;D ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号