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 毫秒。
相关文档:
最近很忙,有个项目马上要招标,一个项目等着工,若干琐碎的事进行中,有一段时间没更新些有营养的东西了
说个题外话先。
今天开机准备把昨天的东西debug一下,很习惯地右键项目的启动文件开始debug,机器突然蓝屏重启。开始以为又是内存在偷偷超频,检查了一下bios,发现没什么问题,也没怎么在意,隧重新开启vs2008继续 ......
定义:
create table 表名(列名1 类型 [not null] [,列名2 类型] [not null],···) [其他参数]
修改:
alter table 表名 add 列名 类型
alter table 表名 rename column 原列名 to 新列名
alter table 表名 alter column 列名 类型 [(宽度) [,小数位]]
alter table 表名 drop column 列名
......
今天可以换换脑子了,丢掉eclipse,玩玩sql了,虽然只是在命令行窗口
先说一下今天我遇到的问题吧,开始按照老师的部署,做的都很顺利,但是当建立好数据库之后,建立表结构的时候就出错了,原因是在配置mysql的时候,权限配置错了,所以说千里之堤毁于蚁穴,害的我整了一个中午,这时提示的错误是ERROR 1005: Can't creat ......
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 ......
在sql中创建用户自定义拼音函数:
create function f_GetPy(@Str nvarchar(400))
returns nvarchar(4000)
as
begin
declare @strlen int,@re nvarchar(4000)
declare @t table(chr nchar(1) collate Chinese_PRC_CI_AS,letter nchar(1))
insert @t select '吖','A' union all select '八','B'
union all select '嚓 ......