注册 登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

zjcjack的博客

 
 
 

日志

 
 

info各种表导入测试  

2012-04-02 14:04:19|  分类: infobright |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
create table log_uv( d_uv char(16) NOT NULL )ENGINE=BRIGHTHOUSE DEFAULT CHARSET=utf8;
create table innodb_uv( d_uv char(16) NOT NULL )ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table myisam_uv( d_uv char(16) NOT NULL )ENGINE=MyISAM DEFAULT CHARSET=utf8;

源文本大小
-rwxrwxrwx 1 mysql mysql 711M Apr  2 00:12 zjctest1col1.csv

BRIGHTHOUSE
load data infile '/tmp/zjctest1col1.csv' into table log_uv lines t
Query OK, 43833930 rows affected (56.33 sec)
Records: 43833930  Deleted: 0  Skipped: 0  Warnings: 0

INNODB
load data infile '/tmp/zjctest1col1.csv' into table innodb_uv lines terminated by '\n';
Query OK, 43833930 rows affected (1 min 5.57 sec)
Records: 43833930  Deleted: 0  Skipped: 0  Warnings: 0

MYISAM
load data infile '/tmp/zjctest1col1.csv' into table myisam_uv lines terminated by '\n';
Query OK, 43833930 rows affected (46.70 sec)
Records: 43833930  Deleted: 0  Skipped: 0  Warnings: 0

导入后占用空间大小
MYISAM
-rw-rw---- 1 mysql mysql 2.1G Apr  2 01:39 myisam_uv.MYD
BRIGHTHOUSE
-rw-rw---- 1 mysql mysql 137M Apr  2 00:25 TA00000000000001.ctb

mysql> select count(distinct(d_uv)) from log_uv;
+-----------------------+
| count(distinct(d_uv)) |
+-----------------------+
|                 86500 |
+-----------------------+
1 row in set (51.62 sec)

mysql> select count(distinct(d_uv)) from myisam_uv;
+-----------------------+
| count(distinct(d_uv)) |
+-----------------------+
|                 86500 |
+-----------------------+
1 row in set (2 min 4.27 sec)

再导一倍进去
load data infile '/tmp/zjctest1col1.csv' into table log_uv lines terminated by '\n';
Query OK, 43833930 rows affected (56.25 sec)
Records: 43833930  Deleted: 0  Skipped: 0  Warnings: 0

-rw-rw---- 1 mysql mysql 137M Apr  2 01:49 TA00000000000000.ctb
-rw-rw---- 1 mysql mysql 137M Apr  2 00:25 TA00000000000001.ctb

load data infile '/tmp/zjctest1col1.csv' into table myisam_uv lines terminated by '\n';
Query OK, 43833930 rows affected (48.30 sec)
Records: 43833930  Deleted: 0  Skipped: 0  Warnings: 0

-rw-rw---- 1 mysql mysql 4.1G Apr  2 01:51 myisam_uv.MYD

select count(distinct(d_uv)) from log_uv;
+-----------------------+
| count(distinct(d_uv)) |
+-----------------------+
|                 86500 |
+-----------------------+
1 row in set (1 min 52.69 sec)

select count(distinct(d_uv)) from myisam_uv;
+-----------------------+
| count(distinct(d_uv)) |
+-----------------------+
|                 86500 |
+-----------------------+
1 row in set (4 min 7.08 sec)

多一倍的情况下空间MYISAM占用空间达到4.1G,而BRIGHTHOUSE则是274MB,突然觉两个不同数据库对比好像没意义

目前看来从源到BRIGHTHOUSE,压缩率为5.19
  评论这张
 
阅读(165)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018