|
没有truncate table还是不方便,递归还是挺快的
SQL> truncate table t;
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 1
-truncate
SQL> delete from t;
Current memory = 10991328
Delta memory = -11304
Max memory = 75050136
Elapsed time= 6.92 sec
Buffers = 2048
Reads = 15650
Writes 15551
Fetches = 5031281
SQL> insert into t
CON> with RECURSIVE r as(select 1 a from rdb$database union all select a+1 a from r where a<1000)
CON> ,t2 as(select t0.a*999+t1.a as L from r as t0,r as t1)
CON> select mod(L,4)c1,mod(L,5)c2,mod(L,67)c3,
CON> mod(case when mod(L,13)>0 then L end ,113)c4, L v from t2;
Current memory = 11027152
Delta memory = 35824
Max memory = 75050136
Elapsed time= 11.85 sec
Buffers = 2048
Reads = 22
Writes 15699
Fetches = 3132166 |
|