当前位置:网站首页>mysql与redis 区别
mysql与redis 区别
2022-07-30 10:14:00 【xmh-sxh-1314】
一、.redis和mysql的区别总结
(1)类型上
从类型上来说,mysql是关系型数据库,redis是缓存数据库
(2)作用上
mysql用于持久化的存储数据到硬盘,功能强大,但是速度较慢
redis用于存储使用较为频繁的数据到缓存中,读取速度快
(3)需求上
mysql和redis因为需求的不同,一般都是配合使用。
二、详细说明
1.mysql和redis的数据库类型
mysql是关系型数据库,主要用于存放持久化数据,将数据存储在硬盘中,读取速度较慢。
redis是NOSQL,即非关系型数据库,也是缓存数据库,即将数据存储在缓存中,缓存的读取速度快,能够大大的提高运行效率,但是保存时间有限
2.mysql的运行机制
mysql作为持久化存储的关系型数据库,相对薄弱的地方在于每次请求访问数据库时,都存在着I/O操作,如果反复频繁的访问数据库。第一:会在反复链接数据库上花费大量时间,从而导致运行效率过慢;第二:反复的访问数据库也会导致数据库的负载过高,那么此时缓存的概念就衍生了出来。
3.缓存
缓存就是数据交换的缓冲区(cache),当浏览器执行请求时,首先会对在缓存中进行查找,如果存在,就获取;否则就访问数据库。
缓存的好处就是读取速度快
4.redis数据库
redis数据库就是一款缓存数据库,用于存储使用频繁的数据,这样减少访问数据库的次数,提高运行效率。
边栏推荐
- 【HMS core】【Analytics Kit】【FAQ】如何解决华为分析付费分析中付款金额显示为0的问题?
- Js array operating mobile for encapsulation
- Scrapy crawler website image crawling
- Mysterious APT Attack
- Re19:读论文 Paragraph-level Rationale Extraction through Regularization: A case study on European Court
- BERT pre-training model series summary
- MFCC转音频,效果不要太逗>V<!
- Easy gene: human tRNA gene loci showed age-related high DNA methylation | research articles
- RandLA-Net复现记录
- Redis Desktop Manager 2022.4.2 发布
猜你喜欢

BERT pre-training model series summary

易基因:人类tRNA基因位点表现出与衰老相关的DNA高甲基化|研究文章

梅科尔工作室-看鸿蒙设备开发实战笔记七——网络应用开发

Re17: Read the paper Challenges for Information Extraction from Dialogue in Criminal Law
![[Deep Learning] (Problem Record) <What do I get by calculating the gradient of a variable> - Linear Regression - Small Batch Stochastic Gradient Descent](/img/28/834aac16859fd26ab69de30f5fed55.png)
[Deep Learning] (Problem Record)
- Linear Regression - Small Batch Stochastic Gradient Descent 
360发布面向未来的EDR,全方位守护政企用户终端安全

从数据流中快速查找中位数

再有人问你分布式事务,把这篇扔给他

Multi-threading scheme to ensure that a single thread opens a transaction and takes effect

Re19:读论文 Paragraph-level Rationale Extraction through Regularization: A case study on European Court
随机推荐
通过构建一个顺序表——教你计算时间复杂度和空间复杂度(含递归)
WebAPI 复习
【HMS core】【FAQ】HMS Toolkit典型问题合集1
js对数组操作移动进行封装
OC-关于alloc和dealloc(还没开始写)
论文阅读:SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
Meikle Studio - see the actual combat notes of Hongmeng device development 4 - kernel development
Neural Network Study Notes 3 - LSTM Long Short-Term Memory Network
BERT预训练模型系列总结
Js array operating mobile for encapsulation
Matplotlib--plot markers
【HMS core】【FAQ】HMS Toolkit典型问题合集1
Shell system learning function
梅科尔工作室-看鸿蒙设备开发实战笔记四——内核开发
张量篇-初步
Verilog之数码管译码
Re21:读论文 MSJudge Legal Judgment Prediction with Multi-Stage Case Representation Learning in the Real
【 HMS core 】 【 】 the FAQ HMS Toolkit collection of typical questions 1
Pytorch中 nn.Transformer的使用详解与Transformer的黑盒讲解
再有人问你分布式事务,把这篇扔给他