CN103631959A - Method for supporting million user data sub-meter based on Hash algorithm - Google Patents
Method for supporting million user data sub-meter based on Hash algorithm Download PDFInfo
- Publication number
- CN103631959A CN103631959A CN201310689118.5A CN201310689118A CN103631959A CN 103631959 A CN103631959 A CN 103631959A CN 201310689118 A CN201310689118 A CN 201310689118A CN 103631959 A CN103631959 A CN 103631959A
- Authority
- CN
- China
- Prior art keywords
- user data
- name
- user
- hash algorithm
- hash function
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for supporting million user data sub-meter based on a Hash algorithm. The method comprises the following steps: step S01, allocating an ID value for a user name, and returning a corresponding character string through a Hash function to obtain a Key value; step S02, establishing a target table name by user data through the Key value; step S03, generating a user table named by the target table name in a database storage table; and step S04, inputting the user name, calculating table name of the data storage table through the Hash function, and accessing a corresponding table. The method, compared to the prior art, is simple in design, high in data table operation efficiency and high in availability.
Description
Technical field
The present invention relates to Computer Database submeter technology, be specifically related to a kind ofly based on hash algorithm support ten million user data, divide table method.
Background technology
Website user is increasing.Relevant data-storing to user, and the optimization that user data reads is most important.This is related to the height of website to user experience, and website most important be exactly to serve user.If user feels registration login and waits the slow experience of associative operation bad, can have a strong impact on the use of website.When user data reaches millions of, in the time of up to ten million, the mono-table inquiry of the mysql time once can double.If there is complex query, may be stuck at that.
The expansion of Mysql cluster is high, need not change sql statement, easily implement, but the data volume of single table is large, and length consuming time carried out in wall scroll statement, and server cost is too high.
Summary of the invention
The present invention has overcome the deficiencies in the prior art, provides a kind of and divides table method based on hash algorithm support ten million user data.
For solving the problems of the technologies described above, the technical solution used in the present invention is:
Based on hash algorithm support ten million user data, divide a table method, comprise the following steps:
Step S01, distributes an ID value to user name, by Hash function, returns to respective symbols string, obtains a Key value;
Step S02, user data, by described Key value, creates object table title;
Step S03, generates the subscriber's meter with described object table name nominating in database storage list;
Step S04, inputs user name, calculates the table name of table data store by Hash function, then the corresponding table of access.
The character string of returning by Hash function is scale-of-two or sexadecimal.
More preferably, character string is 4 character strings.
Compared with prior art, beneficial effect of the present invention has: the built-in user's algorithm of multiple servers, is stored into user name in different tables by user according to certain unique algorithm, improve the performance of single table, some conventional fields are gathered user-friendly, improve operating efficiency, increase availability.
Accompanying drawing explanation
Fig. 1 is method flow diagram of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the present invention is further described.
Based on hash algorithm support ten million user data, divide a table method, comprise the following steps:
Step S01, distributes an ID value to user name, by Hash function, returns to respective symbols string, obtains a Key value;
Step S02, user data, by described Key value, creates object table title;
Step S03, generates the subscriber's meter with described object table name nominating in database storage list;
Step S04, inputs user name, calculates the table name of table data store by Hash function, then the corresponding table of access.
The character string of returning by Hash function is scale-of-two or sexadecimal.
More preferably, character string is 4 character strings.
The above is only the preferred embodiment of the present invention; be noted that for those skilled in the art; under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (4)
1. based on hash algorithm support ten million user data, divide a table method, it is characterized in that: comprise the following steps:
Step S01, distributes an ID value to user name, by Hash function, returns to respective symbols string, obtains a Key value;
Step S02, user data, by described Key value, creates object table title;
Step S03, generates the subscriber's meter with described object table name nominating in database storage list;
Step S04, inputs user name, calculates the table name of table data store by Hash function, then the corresponding table of access.
2. according to claim 1ly a kind ofly based on hash algorithm support ten million user data, divide table method, it is characterized in that: the described character string of returning by Hash function is scale-of-two.
3. according to claim 1ly a kind ofly based on hash algorithm support ten million user data, divide table method, it is characterized in that: the described character string of returning by Hash function is sexadecimal.
4. according to claim 1ly a kind ofly based on hash algorithm support ten million user data, divide table method, it is characterized in that: described character string is 4 character strings.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310689118.5A CN103631959A (en) | 2013-12-17 | 2013-12-17 | Method for supporting million user data sub-meter based on Hash algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310689118.5A CN103631959A (en) | 2013-12-17 | 2013-12-17 | Method for supporting million user data sub-meter based on Hash algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103631959A true CN103631959A (en) | 2014-03-12 |
Family
ID=50213000
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310689118.5A Pending CN103631959A (en) | 2013-12-17 | 2013-12-17 | Method for supporting million user data sub-meter based on Hash algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103631959A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106547870A (en) * | 2016-10-31 | 2017-03-29 | 天脉聚源(北京)科技有限公司 | Point table method and device of data base |
CN110032553A (en) * | 2019-04-08 | 2019-07-19 | 中国人民大学 | A kind of the DNA generation and method of calibration of data object |
CN112817972A (en) * | 2021-01-22 | 2021-05-18 | 中信百信银行股份有限公司 | Data storage method, data query method, data storage device, data query device and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6625592B1 (en) * | 1999-08-10 | 2003-09-23 | Harris-Exigent, Inc. | System and method for hash scanning of shared memory interfaces |
CN101242357A (en) * | 2008-01-17 | 2008-08-13 | 中兴通讯股份有限公司 | A realization method for mobile IP user notification service |
CN101551807A (en) * | 2009-05-07 | 2009-10-07 | 山东中创软件商用中间件股份有限公司 | Multilevel index technology for file database |
CN102364463A (en) * | 2011-09-19 | 2012-02-29 | 浪潮电子信息产业股份有限公司 | Hash-based method for searching CAM (central address memory) |
CN102779180A (en) * | 2012-06-29 | 2012-11-14 | 华为技术有限公司 | Operation processing method of data storage system and data storage system |
-
2013
- 2013-12-17 CN CN201310689118.5A patent/CN103631959A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6625592B1 (en) * | 1999-08-10 | 2003-09-23 | Harris-Exigent, Inc. | System and method for hash scanning of shared memory interfaces |
CN101242357A (en) * | 2008-01-17 | 2008-08-13 | 中兴通讯股份有限公司 | A realization method for mobile IP user notification service |
CN101551807A (en) * | 2009-05-07 | 2009-10-07 | 山东中创软件商用中间件股份有限公司 | Multilevel index technology for file database |
CN102364463A (en) * | 2011-09-19 | 2012-02-29 | 浪潮电子信息产业股份有限公司 | Hash-based method for searching CAM (central address memory) |
CN102779180A (en) * | 2012-06-29 | 2012-11-14 | 华为技术有限公司 | Operation processing method of data storage system and data storage system |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106547870A (en) * | 2016-10-31 | 2017-03-29 | 天脉聚源(北京)科技有限公司 | Point table method and device of data base |
CN110032553A (en) * | 2019-04-08 | 2019-07-19 | 中国人民大学 | A kind of the DNA generation and method of calibration of data object |
CN110032553B (en) * | 2019-04-08 | 2021-04-06 | 中国人民大学 | DNA generation and verification method of data object |
CN112817972A (en) * | 2021-01-22 | 2021-05-18 | 中信百信银行股份有限公司 | Data storage method, data query method, data storage device, data query device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109299102B (en) | HBase secondary index system and method based on Elastcissearch | |
US10810179B2 (en) | Distributed graph database | |
Nayak et al. | Type of NOSQL databases and its comparison with relational databases | |
CN104516979B (en) | A kind of data query method and system based on quadratic search | |
JP6998928B2 (en) | Methods, appliances, equipment, and media for storing and querying data | |
Zhang et al. | Hbasespatial: A scalable spatial data storage based on hbase | |
Hu et al. | Top-k spatio-textual similarity join | |
Wei et al. | Indexing spatial data in cloud data managements | |
CN107729399B (en) | Data processing method and device | |
CN104123374A (en) | Method and device for aggregate query in distributed databases | |
Zhang et al. | An implementation approach to store GIS spatial data on NoSQL database | |
CN103810244A (en) | Distributed data storage system expansion method based on data distribution | |
CN103116610A (en) | Vector space big data storage method based on HBase | |
US10936625B2 (en) | Progressive optimization for implicit cast predicates | |
CN104090962A (en) | Nested query method oriented to mass distributed-type database | |
KR101678149B1 (en) | Data searching method of database, apparatus and computer program for the same | |
CN103123650A (en) | Extensible markup language (XML) data bank full-text indexing method based on integer mapping | |
CA3057038C (en) | Data filtering method, apparatus, electronic apparatus and storage medium | |
CN103761251A (en) | Storing and finding method for large-data-volume client information | |
CN108319608A (en) | The method, apparatus and system of access log storage inquiry | |
CN109597829B (en) | Middleware method for realizing searchable encryption relational database cache | |
CN111259107A (en) | Storage method and device of determinant text and electronic equipment | |
Liang et al. | Mid-model design used in model transition and data migration between relational databases and nosql databases | |
CN103631959A (en) | Method for supporting million user data sub-meter based on Hash algorithm | |
US20140067853A1 (en) | Data search method, information system, and recording medium storing data search program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140312 |