免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3351 | 回复: 7
打印 上一主题 下一主题

如何获得sybase语句执行时间。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-04-05 13:57 |只看该作者 |倒序浏览
众所周知
oracle中可以用set timing on来获得sql语句执行时间;
DB2中可以用db2batch来获得sql语句执行时间;
我想问一下在sybase中用什么方法获得sql语句执行时间。比如我想获得这条语句的执行时间。
bcp dbname..dim0 in dim0.dat -S sybase -U sa -P

论坛徽章:
0
2 [报告]
发表于 2006-04-05 22:09 |只看该作者
I don't think you can get the timing for BCP.
If it's sql statement,
select getdate()
go
your queries
go
select getdate()
go

or if you want to see the plan and io:
set showplan on
go
set statistics io,time on
go
set noexec on
go
your queries
go

论坛徽章:
0
3 [报告]
发表于 2006-04-06 10:30 |只看该作者
set timing on

论坛徽章:
0
4 [报告]
发表于 2006-04-06 10:33 |只看该作者
原帖由 2BeSybPro 于 2006-4-5 22:09 发表
I don't think you can get the timing for BCP.
If it's sql statement,
select getdate()
go
your queries
go
select getdate()
go

or if you want to see the plan and io:
set showplan on
go
s ...


看来没有在命令行下取得时间的命令,只有在isql里面做了是吧。
莫非命令行只有用date了?

论坛徽章:
0
5 [报告]
发表于 2006-04-06 10:34 |只看该作者
原帖由 wangli19820912 于 2006-4-6 10:30 发表
set timing on


这个适用sybase么?

论坛徽章:
0
6 [报告]
发表于 2006-04-06 10:34 |只看该作者
sql可以用set time on 来看,但lz的bcp用time 比较可行 time bcp  .....

论坛徽章:
0
7 [报告]
发表于 2006-04-06 10:36 |只看该作者
原帖由 chenfeng825 于 2006-4-6 10:34 发表
sql可以用set time on 来看,但lz的bcp用time 比较可行 time bcp  .....


多谢,要的就是这种效果。我去试一试^_^

论坛徽章:
0
8 [报告]
发表于 2006-05-19 14:47 |只看该作者

set statisics time on

在开头加一次就行了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP