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

Bioinformatics home

 
 
 

日志

 
 

memsql THE WORLD'S FASTEST DATABASE.YOUR DATA. ACCELERATED  

2012-06-20 00:50:37|  分类: SQL |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
available from http://memsql.com/ 
$ wget http://download.memsql.com/***********/memsqlbin_amd64.tar.gz $ tar -xzf memsqlbin_amd64.tar.gz $ cd memsqlbin $ ./check_system $ ./memsqld --port 3307
Note: MemSQL runs on port 3306 by default (the same port as MySQL). Running it on port 3307 will avoid conflicts if MySQL is running on your machine. 

MemSQL is wire-compatible with MySQL, so you can run queries directly from the MySQL client.
mysql -u root -h 127.0.0.1 -P 3307 --prompt="memsql> "

I just tried how to use perl to communicate with memsql. It is amazing, it worked with DBI. Here is the sample code.
use DBI;
my $database = 'Xie';
my $server= '127.0.0.1';
my $user =  'root';
my $password =  '';
my $dbh = DBI->connect ("DBI:mysql:$database:$server:3307", $user, $password); #the default port is 3306, if not, change to what you set up
$sql='select * from test';
$query=$dbh->prepare($sql);
$query->execute;
while(@array=$query->fetchrow_array())
{
  print $array[1],' ',$array[2]."\n";
}

transfer your MySQL to memsql
you should separate your schema and data into separate files, so that you can easily review and modify your schema if necessary. To produce a dump of your database, run something like
$ mysqldump -h 127.0.0.1 -u root -B [database name] --no-data > schema.sql $ mysqldump -h 127.0.0.1 -u root -B [database name] --no-create-info > data.sql 

You can then replay these files directly into MemSQL by running:

$ mysql -h 127.0.0.1 -u root -P 3307 < schema.sql $ mysql -h 127.0.0.1 -u root -P 3307 < data.sql 
While this step runs, you can observe the memsql_tracelog (also printed to stderr) to see which unsupported features have been ignored. After the import is completed, you can connect to MemSQL and start querying the tables directly 
  评论这张
 
阅读(578)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

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

页脚

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