Query MySQL and query hbase speed comparison

Source: Internet
Author: User

Mysql, relational database;

Hbase,nosql database.

Query MySQL and query hbase, which speed is it fast?

When discussing with some real Daniel, they say that HBase writes up to 1W per second. HBase's ideal speed is 10W per second.

An experiment shows that this experiment can only show that the current environment is running in the state. My experimental results, not to 1W, still in the optimization ...

Environment:

There are 3 VMS running Hadoop cluster, 3 virtual machines are running Hbase:master,node1,node2

Master, the MySQL database is installed at the same time.

There is a need for this:

There are a bunch of text files, each text file, stored in the log;

A record of each act;

It is now necessary to read the records line by row and to get account information from HBase or MySQL based on the MAC address and SN number in the record.

It is then merged into a single record that is written to the "Shuju" table in HBase.

MySQL table structure:

Id,mac,sn,addtime,account

HBASE Table Structure:

Rowkey to Mac+sn,mac,sn,account,addtime

The test results are as follows:

Every minute, a count operation is performed to count the current number of data bars.

Select COUNT (1) from Shuju

The results are as follows

=====================================

MySQL on the first Test.

Start Time 11:03:15

28135 (number of bars)

39014

49659

264564

274379

285174 (number of bars)

End Time 11.26.15

285174–28135 = 257039

257039/23 = 11 175.608695652

is more than 1W ...

=====================================

Querying the HBase Library

Start Time 14:43:00

5622 (number of bars)

16671

25062

34848

46652

58001

69690

79908 (number of bars)

End 14:50:00

79908–5622 = 74 286

74286/7 = 10 612 number per minute.

=====================================

Mysql

Start 14:58:30

19248 (number of bars)

26526

36389

45837

51945

62497

72319

82695 (number of bars)

End Time: 15:04:30

Interval seven minutes

82695–19248 = 63 447

93447/7 = 9 063.8571428571

======================================

You can see that the speed in hbase is slightly faster than in MySQL.

But the total speed, still needs to be improved ...

Article from: Daniel notes

CSDN Blog Address: http://blog.csdn.net/weixuehao/article/details/41647185

Blog Park Blog Address: http://www.cnblogs.com/laov/p/4134998.html

Query MySQL and query hbase speed comparison

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.