Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The complete steps of building 100 million-level cmd5 database by mysql

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today, the editor shares with you the complete steps for mysql to build a billion-level cmd5 database. I believe many people do not know much about it. In order to let you know more about the steps for mysql to build a billion-level cmd5 database, I have summarized the following contents for you. Let's look down together. I'm sure you'll get something.

Foreword:

Recently, I have also been playing with the database. I feel that the ordinary machine is doing the database, but it is still a little bad. I need to look up the full text for a minute or more.

But cmd5 library is very good, 100 million-level database, millisecond level.

All right, let's get started. First you need a mysql database.

Environment:

Apmserv5.2.6 php+mysql Navicat for MySQL

It is recommended that these two softwares are very easy to install and are all in Chinese, so they are convenient for beginners to operate.

Need other things, a computer, 10GB around hard disk space. A bigger dictionary.

Let's start the first part, open the Navicat for MySQL connection, it's simple, there's no screenshot here.

Start building tables, hash_cmd5, fields, plaintext,cmd5_16,cmd5_32

All are set to not empty, the first 255, the second 16, and the third 32 bits.

Start importing data, it's very simple, refer to the picture and figure it out by yourself.

Refer to your own database source and set the encoding

Refer to your own database.

Fourth, skip five directly.

To start step 6, you only need to set up plaintext, and there is no need to set other fields, but you must choose the plaintext of the database you find, otherwise it will be meaningless.

Go straight to step 8, and you can import the data.

Let's try it for yourself. the next step is to teach you to batch generate cmd16 32-bit.

High speed single meter import

Suppose: your text file is in d:\ aa.txt

Table name: t

Field name: C

Is the following command

Mysql > load data local infile'd into table cmd5 lines terminated by bank aa.txt','(cmd5_txt)

Create 32 16-bit md5 with one click

Update `hash` set cmd5_16 = substr (md5 (plaintext), 1, 16) where 1, 1 update `hash` set cmd5_32 = md5 (plaintext) where 1

As for some Daniel said, this method is unstable or something, stand-alone test, single meter 600 million no pressure.

The above is a brief introduction of the complete steps of mysql to build 100 million-level cmd5 database, of course, the detailed use of the above differences still have to be used by everyone to understand. If you want to know more, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report