Ttisql的使用.docVIP

  1. 1、本文档共11页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Ttisql的使用 ttisql就像oracle db里面的sqlplus一样。 下面是我整理的一些常用的技巧。 在ttisql里面如何重复执行上一条SQL? 答:输入! 在ttisql里面如何显示历史命令? 答:输入h; 显示data store的信息: 1.desc 显示表,存储过程的信息 2.dssize; 显示permsize和tempsize的使用情况 3.cachegroups; 显示cache group的属性 4.monitor; 显示data store当前的一些信息 如何显示或修改属性? 答: show passthrough Command autocommit=0; Command set passthrough 1; 如何查看执行计划? 答:Command showplan; Command SELECT * FROM T1, T2, T3 WHERE A=B AND B=C AND A=B; ttisql调优的命令 ? setjoinorder - Sets the join order. ? setuseindex - Sets the index hint. ? tryhash - Enables or disables the use of hash indexes. ? trymergejoin - Enables or disables merge joins. ? trynestedloopjoin - Enables or disables nested loop joins. ? tryserial - Enables or disables serial scans. ? trytmphash - Enables or disables the use of temporary hash indexes. ? trytmptable - Enables or disables the use of an intermediate results table. ? trytmpttree - Enables or disables the use of temporary ttree indexes. ? tryttree - Enables or disables the use of ttree indexes. ? tryrowid - Enables or disables the use of rowid scans. ? trytbllocks - Enables or disables the use of table locks. ? unsetjoinorder - Clears the join order. ? unsetuseindex - Clears the index hint. 如何查看sql语句执行时间? 答:Command timing 1; Command verbosity 0; ================ 1.运行模式 (1) 批处理模式: 把要运行的语句保存在一个文件里,然后在运行时指定要运行的文件,例如: ttisql -f test.sql ttdemo 也可以先进入命令行界面,然后再用run命令调用一个文件,例如 ~/bin # ttisql ttdemo Command run test.sql (2) 交互模式: 2.获取帮助 help命令的基本用法是先用help;查看可用的命令,然后按命令查看help cmd_name. 3.查看命令历史 这个更多的带有unix shell的特征,输入history或者h(简写)可以显示命令历史 . 4. 几个常用的命令 (1) describle(desc): 显示table,prepared statements和procedures的信息. (2) cachegroups: 显示cachegroup的属性信息. Command cachegroup itpub110.readcache; Cache Group ITPUB110.READCACHE: Cache Group Type: Read Only Autorefresh: Yes Autorefresh Mode: Incremental Autorefresh State: On Autorefresh Interval: 5 Seconds Root Table: SYSTEM.READTAB Table Type: Read Only 1 cache group found. Command (3) dssize: 显示data store的大小,包括永久分区和临时分区, Command dssize; P

文档评论(0)

精华文档888 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档