当前位置:网站首页>Overview of redis/mysql knowledge
Overview of redis/mysql knowledge
2022-07-25 08:47:00 【TUJC】
One 、 database


Two 、Redis
1、Redis summary
Redis It's completely open source and free , Is a high-performance key-value database .
Reference resources
2、Redis Reasons for fast speed

3、Redis data type
Redis Five data types are supported :string( character string ),hash( Hash ),list( list ),set( aggregate ) And zset sorted set: Ordered set ).

4、Redis Persistence mechanism of
Redis There are two persistence mechanisms RDB and AOF Mechanism :


RDB(Redis DataBase) Persistence mode : It refers to the semi persistent mode of data set snapshot , Record redis All key value pairs of database , Write data to a temporary file at a certain point in time , After persistence , Replace the last persisted file with this temporary file , Achieve data recovery .
advantage :
(1) Only one file dump.rdb, Easy persistence .
(2) Good disaster tolerance , A file can be saved to a safe disk .
(3) Maximize performance ,fork Sub process to complete the write operation , Let the main process continue processing commands , So it is IO Maximize . Use a single child process for persistence , The main process will not do anything IO operation , To ensure the redis A high performance .
(4) When the data set is large , Than AOF It's more efficient to start .
shortcoming :
Data security is low .RDB It's persistence at intervals , If between persistence redis failure , There will be data loss . So this way is more suitable when the data requirements are not rigorous .
AOF(Append-only file) Persistence mode : Means all command line records to redis Command please The format of the protocol is fully persistent ) Save as aof file .
advantage :
1) Data security ,aof Persistence can be configured appendfsync attribute , Yes always, Every command operation is recorded as aof Once in the file .
2) adopt append Mode write file , Even if the server goes down , Can pass redis-check-aof Tools for data consistency .
3)AOF The mechanism rewrite Pattern .AOF The document was not rewrite Before ( When the file is too large, the command will be merged and rewritten ), You can delete some of these commands ( For example, misoperation flushall))
shortcoming :
1)AOF File than RDB The file is big , And the recovery speed is slow .
2) When the data set is large , Than rdb Low starting efficiency .
5、Redis Partition

6、Redis cache


7、Redis Business
1) A transaction is a separate isolation operation : All commands in the transaction are serialized 、 To execute in order .
Transaction is in the process of execution , Will not be interrupted by command requests from other clients .
2) A transaction is an atomic operation : The commands in the transaction are either all executed , Or none of it .

8、Redis colony




9 、Redis A single thread ?
10、Redis Elimination strategy


3、 ... and 、Mysql
1、Mysql summary

2、 Database operation
3、 Table operations

Create table 

Modify table 
4、Mysql function




5、 Table data operation





6、 engine


7、 Business

8、 Data import and export

9、 Classic interview questions







边栏推荐
- Redis learning notes
- @Implementation principle of Autowired annotation
- Foundation 31: Selenium positioning dynamic ID element
- Solving a random number problem
- Phpexcel reports an error: err_ INVALID_ RESPONSE
- Bigdecimel in words
- Yolov5 environment configuration
- Qt|QLable多行展示时更改行间距
- Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection
- Graduation project of wechat small program ordering system of small program completion works (7) Interim inspection report
猜你喜欢

提高代码可续性的小技巧,以connectTo方法为例。

51单片机外设篇:蜂鸣器

记录两次多端排查问题的过程

51 MCU internal peripherals: serial port communication

@The difference and use of value and configurationproperties

Wechat reservation of small program completion works (5) assignment book of small program graduation project

Graduation design of wechat small program ordering system of small program completion works (3) background function

The international summit osdi included Taobao system papers for the first time, and end cloud collaborative intelligence was recommended by the keynote speech of the conference

Wechat applet ordering system graduation design of applet completion works (8) graduation design thesis template

DIY can decorate the mall system, you can also have!
随机推荐
BGP border gateway protocol basic knowledge points
Practice of establishing dynamic programming state transition equation
[graduation project] cinema booking management system based on micro Service Framework
When testing VPN, the IP found by the command line is inconsistent with that of Baidu search
How to do the game plug-in?
Data warehouse ODS, DWD floor, 220616, HM,
这是我见过写得最烂的Controller层代码...
serialization and deserialization
Read and write models and organize notes
How can hospitals achieve efficient and low-cost operation and maintenance? Is there any software that can meet it?
@Use of data annotation (instead of get and set methods in entity classes)
Wechat sports ground reservation applet graduation design of applet completion works (3) background function
记录两次多端排查问题的过程
Database persistence +jdbc database connection
Phpexcel reports an error: err_ INVALID_ RESPONSE
Wechat sports field reservation of the finished works of the applet graduation project (4) opening report
25 Ph.D. degrees revoked
Does the server operation and maintenance need to be online 24 hours? Do you need to work overtime on weekends?
Recursive call to print every bit of an integer
Talk about your transformation test development process

