缥缈游侠-logzgh
===========================================================
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;

logzgh 发表于:2008.01.02 17:08 ::分类: ( Timesten 内存数据库 ) ::阅读:(425次) :: 评论 (0)

发表评论
标题

在此添加评论
表情符号: smile laughing tongue angry crying sad wassat wink

称呼

邮箱地址(可选)

个人主页(可选)




自我介绍
切换风格
新闻聚合
博客日历
文章归档...
最新发表...
最新评论...
最多阅读文章...
最多评论文章...
博客统计...
网站链接...