|
原帖由 〇〇 于 2010-9-21 10:12 发表 ![]()
汇总性能也不错,但不知怎么用上并行
mysql> create table t5_3_0 as
-> select ID,
-> sum(case when ID0 then cnt end) c1,
-> sum(case when ha3=1 then cnt end) c2,
-> sum(case when ha3=2 then cnt end) c4,
-> sum(case when ha3=3 then cnt end) c6,
-> sum(case when ha3=4 then cnt end) c8
-> from (
-> select substr(ID,1,2) ID,count(*)cnt,ha3
-> from hu
-> group by substr(ID,1,2),ha3
-> )a
-> group by ID
-> order by ID ;
Query OK, 1 row affected (9.14 sec)
Records: 1 Duplicates: 0 Warnings: 0
加强了对SMP架构的支持,以及其写I/O改进方法,所以导入也会快很多....要是InnoDB引擎哦... |
|