楼主: 〇〇

测试xugu liunx

[复制链接]
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
31#
 楼主| 发表于 2014-6-28 12:26 | 只看该作者
/tmp/xugu_lin_x64  -daemon
XuGu SQL Server 8.1.0 (Built:2014-06-18 00:30:00.052702)
Start at: 2014-6-28 12:29:25.
Daemon process is still running.

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
32#
 楼主| 发表于 2014-6-28 12:30 | 只看该作者
〇〇 发表于 2014-6-28 12:26
/tmp/xugu_lin_x64  -daemon
XuGu SQL Server 8.1.0 (Built:2014-06-18 00:30:00.052702)
Start at: 2014 ...

仍然不支持connect by level
SQL>with t as(select level t from dual connect by level<=1e4)
2   ,s as(select level s from dual connect by level<=5e3)
3   ,a as(select (s-1)*1e4+t a from t,s)
4   select substr(a,-1,1)x,sum(a)s from a
5   group by substr(a,-1,1)
6   order by 1;
Error: [E19224] Connect by 表达式错误

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
33#
 楼主| 发表于 2014-6-28 12:49 | 只看该作者
真的奇怪
SQL>create table t as select 1 a union select 2;

Execute successful.
Use time:5 ms.

SQL>create table t2 as
2   select row_number()over(order by a.a) rn from
3   (select t.a from t,t t1,t t2,t t3,t t4,t t5,t t6,t t7,t t8,t t9)a,
4   (select t.a from t,t t1,t t2,t t3)b
5   ;

Execute successful.
Use time:50 ms.

SQL>create table t1w as select rn from t2 where rn<=10000;

Execute successful.
Use time:20 ms.

SQL>create table t5k as select rn from t2 where rn<=5000;

Execute successful.
Use time:10 ms.

SQL>with a as(select (s.rn-1)*10000+t.rn a from t1w t,t5k s)
2   select substr(a,-1,1)x,sum(a)s from a
3   group by substr(a,-1,1)
4   order by 1;

X | S |
------------------------------------------------------------------------------

Total 0 records.

Use time:22260 ms.

SQL>with a as(select (s.rn-1)*10000+t.rn a from t1w t,t5k s)
2   select substr(a,length(a),1)x,sum(a)s from a
3   group by substr(a,length(a),1)
4   order by 1;

X | S |
------------------------------------------------------------------------------

Total 0 records.

Use time:19680 ms.
用常量是可以的
SQL>select substr('10',length('10'),1) ;

EXPR1 |
------------------------------------------------------------------------------
0|

Total 1 records.

Use time:0 ms.
数值型也能自动转的
SQL>select substr(10,length(10),1) ;

EXPR1 |
------------------------------------------------------------------------------
0|

Total 1 records.

Use time:5 ms.

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
34#
 楼主| 发表于 2014-6-28 12:50 | 只看该作者
负数位置也是可以的
SQL>select substr(10,-1,1) ;

EXPR1 |
-------------------------------------------
0|

Total 1 records.

Use time:0 ms.

SQL>select substr('10',-1,1) ;

EXPR1 |
-------------------------------------------
0|

Total 1 records.

Use time:5 ms.

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
35#
 楼主| 发表于 2014-6-28 12:53 | 只看该作者
这都算错了,看来大表关联有问题
SQL>with a as(select (s.rn-1)*10000+t.rn a from t1w t,t5k s)
2   select count(a),sum(a) from a;

EXPR1 | EXPR2 |
--------------------------------------------------------------------
0 | <NULL>|

Total 1 records.

Use time:19265 ms.

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
36#
 楼主| 发表于 2014-6-28 12:55 | 只看该作者
不用with是对的
SQL>select count(*) from t1w;

EXPR1 |
---------------------------------------
10000 |

Total 1 records.

Use time:0 ms.

SQL>select count(*) from t5k;

EXPR1 |
---------------------------------------
5000 |

Total 1 records.

Use time:0 ms.

SQL>select count(*) from t1w,t5k;

EXPR1 |
---------------------------------------
50000000 |

Total 1 records.

Use time:4005 ms.

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
37#
 楼主| 发表于 2014-6-28 12:58 | 只看该作者
〇〇 发表于 2014-6-28 12:55
不用with是对的
SQL>select count(*) from t1w;

SQL>select substr(a,-1,1)x,sum(a)s from (select (s.rn-1)*10000+t.rn a from t1w t,t5k s) a
2   group by substr(a,-1,1)
3   order by 1;

X | S |
------------------------------------------------------------------------------
0| 125000025000000|
1| 124999980000000|
2| 124999985000000|
3| 124999990000000|
4| 124999995000000|
5| 125000000000000|
6| 125000005000000|
7| 125000010000000|
8| 125000015000000|
9| 125000020000000|

Total 10 records.

Use time:68370 ms. (超过10行,就要按任意键。。。。)

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
38#
 楼主| 发表于 2014-6-30 12:08 | 只看该作者
〇〇 发表于 2014-6-28 12:58
SQL>select substr(a,-1,1)x,sum(a)s from (select (s.rn-1)*10000+t.rn a from t1w t,t5k s) a
2   gro ...

用了新客户端
SQL>set pagesize 50000
pagesize 50000

SQL>select substr(a,-1,1)x,sum(a)s from (select (s.rn-1)*10000+t.rn a from t1w t,t5k s) a
2   group by substr(a,-1,1)
3   order by 1;

X | S |
------------------------------------------------------------------------------
0| 125000025000000|
1| 124999980000000|
2| 124999985000000|
3| 124999990000000|
4| 124999995000000|
5| 125000000000000|
6| 125000005000000|
7| 125000010000000|
8| 125000015000000|
9| 125000020000000|

Total 10 records.

Use time:45270 ms.

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
39#
 楼主| 发表于 2014-7-2 15:27 | 只看该作者
终于改好了
SQL>with a as(select (s.rn-1)*10000+t.rn a from t1w t,t5k s)
2   select substr(a,-1,1)x,sum(a)s from a
3   group by substr(a,-1,1)
4   order by 1;

X | S |
------------------------------------------------------------------------------
0| 125000025000000|
1| 124999980000000|
2| 124999985000000|
3| 124999990000000|
4| 124999995000000|
5| 125000000000000|
6| 125000005000000|
7| 125000010000000|
8| 125000015000000|
9| 125000020000000|

Total 10 records.

Use time:49630 ms.

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
40#
 楼主| 发表于 2014-7-2 15:29 | 只看该作者
还支持并行度
SQL>with a as(select (s.rn-1)*10000+t.rn a from t1w t,t5k s)
2   select substr(a,-1,1)x,sum(a)s from a
3   group by substr(a,-1,1)
4   order by 1 parallel 2;

X | S |
------------------------------------------------------------------------------
0| 125000025000000|
1| 124999980000000|
2| 124999985000000|
3| 124999990000000|
4| 124999995000000|
5| 125000000000000|
6| 125000005000000|
7| 125000010000000|
8| 125000015000000|
9| 125000020000000|

Total 10 records.

Use time:22285 ms.

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表