当前位置:网站首页>redis和mysql区别
redis和mysql区别
2022-04-23 04:46: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数据库就是一款缓存数据库,用于存储使用频繁的数据,这样减少访问数据库的次数,提高运行效率。
版权声明
本文为[xmh-sxh-1314]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_57763462/article/details/124357059
边栏推荐
- KVM error: Failed to connect socket to ‘/var/run/libvirt/libvirt-sock‘
- C language: spoof games
- POI export message list (including pictures)
- Spark FAQ sorting - must see before interview
- Summary of Android development posts I interviewed in those years (attached test questions + answer analysis)
- Go reflection - go language Bible learning notes
- Leetcode002 -- inverts the numeric portion of a signed integer
- IDE idea automatic compilation and configuration of on update action and on frame deactivation
- Leetcode004 -- Roman numeral to integer
- 拼了!两所A级大学,六所B级大学,纷纷撤销软件工程硕士点!
猜你喜欢

Coinbase:关于跨链桥的基础知识、事实和统计数据

补充番外14:cmake实践项目笔记(未完待续4/22)

拼了!两所A级大学,六所B级大学,纷纷撤销软件工程硕士点!

POI export message list (including pictures)
![[paper reading] [3D object detection] voxel transformer for 3D object detection](/img/a2/9f66789cc12fad99491309717cf418.png)
[paper reading] [3D object detection] voxel transformer for 3D object detection

Brushless motor drive scheme based on Infineon MCU GTM module

The 14th issue of HMS core discovery reviews the long article | enjoy the silky clip and release the creativity of the video

Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.

简单的拖拽物体到物品栏

Mysql50 basic exercises
随机推荐
[paper reading] [3D target detection] point transformer
leetcode006--查找字符串数组中的最长公共前缀
Wechat payment function
Go reflection rule
補:注解(Annotation)
leetcode005--原地删除数组中的重复元素
Leetcode003 -- judge whether an integer is a palindrome number
解决ValueError: Argument must be a dense tensor: 0 - got shape [198602], but wanted [198602, 16].
Recursive call -- Enumeration of permutations
SQL statement for adding columns in MySQL table
Arduino UNO r3+LCD1602+DHT11
Spark small case - RDD, broadcast
What is the meaning of load balancing
Eight misunderstandings that should be avoided in data visualization
Record your own dataset with d435i, run orbslam2 and build a dense point cloud
test
leetcode004--罗马数字转整数
io. Platform. packageRoot; // ignore: deprecated_ Member_ use
Unity3D 实用技巧 - 理论知识库(一)
Coinbase: basic knowledge, facts and statistics about cross chain bridge