当前位置:网站首页>Differences between redis and MySQL
Differences between redis and MySQL
2022-04-23 04:52:00 【xmh-sxh-1314】
One 、.redis and mysql Summary of the differences
(1) On type
In terms of type ,mysql Is a relational database ,redis Is the cache database
(2) In effect
mysql For persistent storage of data to the hard disk , Powerful , But it's slower
redis It is used to store frequently used data into the cache , Fast reading speed
(3) On demand
mysql and redis Because of the different needs , It is usually used in combination with .
Two 、 Detailed instructions
1.mysql and redis Database type of
mysql Is a relational database , It is mainly used to store persistent data , Store data on a hard disk , Slow read speed .
redis yes NOSQL, This is a non relational database , It is also a cache database , Store data in cache , Cache read speed is fast , Can greatly improve the operation efficiency , But the storage time is limited
2.mysql Operation mechanism of
mysql Relational databases as persistent storage , The relative weakness is that every time you request access to the database , They all exist I/O operation , If the database is accessed repeatedly and frequently . First of all : You spend a lot of time chaining databases , As a result, the operating efficiency is too slow ; second : Repeated database access can also lead to overloading of the database , Then the concept of caching is derived .
3. cache
A cache is a buffer for data exchange (cache), When the browser executes the request , First of all, search in the cache , If there is , Just get ; Otherwise, access the database .
The advantage of caching is fast reading speed
4.redis database
redis Database is a cache database , Used to store frequently used data , This reduces the number of times you access the database , Improve operational efficiency .
版权声明
本文为[xmh-sxh-1314]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230446013496.html
边栏推荐
- CLion+OpenCV identify ID number - detect ID number
- getprop 属性
- What's the difference between error and exception
- L2-011 play binary tree (build tree + BFS)
- 负载均衡简介
- unity摄像机旋转带有滑动效果(自转)
- Learning Android V from scratch - UI
- 持续集成(CI)/持续交付(CD)如何彻底改变自动化测试
- Pixel 5 5g unlocking tutorial (including unlocking BL, installing edxposed and root)
- Mac 进入mysql终端命令
猜你喜欢
Set Chrome browser background to eye protection (eye escort / darkreader plug-in)
POI export message list (including pictures)
Download PDF from HowNet (I don't want to use CAJViewer anymore!!!)
Thoughts on a small program
MySQL -- execution process and principle of a statement
Perfect test of coil in wireless charging system with LCR meter
Repair of self calibration SPC failure of Tektronix oscilloscope dpo3054
Detailed explanation of the differences between TCP and UDP
Learning Android II from scratch - activity
Field injection is not recommended using @ Autowired
随机推荐
Leetcode002 -- inverts the numeric portion of a signed integer
Installation and deployment of Flink and wordcount test
Alibaba tip: it is better to create threads manually
leetcode007--判断字符串中的括号是否匹配
The unity camera rotates with the mouse
Leetcode008 -- implement strstr() function
Innovation training (V) configuration information
What is the meaning of load balancing
Innovation training (II) task division
Leetcode001 -- returns the subscript of the array element whose sum is target
Com alibaba. Common methods of fastjson
leetcode003--判断一个整数是否为回文数
Recommended scheme for national production of electronic components of wireless keyboard
List remove an element
Unity RawImage背景无缝连接移动
Small volume Schottky diode compatible with nsr20f30nxt5g
Solve valueerror: argument must be a deny tensor: 0 - got shape [198602], but wanted [198602, 16]
洛谷P2731骑马修栅栏
Shanghai Hangxin technology sharing 𞓜 overview of safety characteristics of acm32 MCU
L2-011 play binary tree (build tree + BFS)