当前位置:网站首页>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







边栏推荐
- Practice of establishing dynamic programming state transition equation
- Phpexcel reports an error: err_ INVALID_ RESPONSE
- Use of lambdaquerywrapper, lambdaupdatewrapper, lambdaquerychainwrapper
- YOLOV5环境配置
- read
- Sina Weibo client (4) - set navigation bar theme
- [hero planet July training leetcode problem solving daily] 19th binary tree
- Django4.0 + Web + MySQL5.7 实现简单登录操作
- Wechat reservation of completed works of applet graduation project (4) opening report
- @Differences between requestparam, @pathparam, @pathvariable and other annotations (use of some annotations)
猜你喜欢

Redis learning

Does the server operation and maintenance need to be online 24 hours? Do you need to work overtime on weekends?

FreeMaker模板引擎

Phpexcel reports an error: err_ INVALID_ RESPONSE

智能运维场景解析:如何通过异常检测发现业务系统状态异常

IDEA下依赖冲突解决方法

这是我见过写得最烂的Controller层代码...

Django4.0 + Web + MySQL5.7 实现简单登录操作

Wechat applet ordering system graduation design of applet completion works (2) applet function

This is the worst controller layer code I've ever seen
随机推荐
ip命令使用详解
[dark horse programmer] redis learning notes 003: redis transactions
Solving a random number problem
When crontab scheduled task executes jar through script, it encounters a pit where jar package execution is invalid
IDEA下依赖冲突解决方法
IP command usage details
Hash table questions (Part 1)
Intelligent operation and maintenance scenario analysis: how to detect abnormal business system status through exception detection
51 MCU peripherals: buzzer
C语言实现二叉平衡树
DIY can decorate the mall system, you can also have!
[dark horse programmer] redis learning notes 002: persistence: RDB and AOF
公寓报修系统(IDEA,SSM,MySQL)
Source code of short video live broadcast system
JD cloud and Forrester consulting released a hybrid cloud report that cloud Nativity has become a new engine driving industrial development
51单片机外设篇:电机
Apartment repair reporting system (idea, SSM, MySQL)
@Differences between requestparam, @pathparam, @pathvariable and other annotations (use of some annotations)
R language error
nuscenes数据集3D MOT demo,端到端的目标检测和跟踪,检测跟踪联合框架

