当前位置:网站首页>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
边栏推荐
- Spark small case - RDD, spark SQL
- A heavy sword without a blade is a great skill
- Migrate from MySQL database to AWS dynamodb
- Leetcode006 -- find the longest common prefix in the string array
- Redis command Encyclopedia
- Painless upgrade of pixel series
- Leetcode003 -- judge whether an integer is a palindrome number
- test
- Spark FAQ sorting - must see before interview
- Spark optimization
猜你喜欢
Opencv + clion face recognition + face model training
Summary of MySQL de duplication methods
针对NFT的网络钓鱼
QML进阶(五)-通过粒子模拟系统实现各种炫酷的特效
Simply drag objects to the item bar
Excel uses the functions of replacement, sorting and filling to comprehensively sort out financial data
383. Ransom letter
[timing] empirical evaluation of general convolution and cyclic networks for sequence modeling based on TCN
test
The 14th issue of HMS core discovery reviews the long article | enjoy the silky clip and release the creativity of the video
随机推荐
No such file or directory problem while executing shell
做数据可视化应该避免的8个误区
Wechat payment function
Mysql50 basic exercises
Spark case - wordcount
Phishing for NFT
AWS eks add cluster user or Iam role
Leetcode004 -- Roman numeral to integer
Coinbase:关于跨链桥的基础知识、事实和统计数据
Solutions to the failure of sqoop connection to MySQL
IEEE Transactions on systems, man, and Cybernetics: Notes for systems (TSMC)
2021数学建模国赛一等奖经验总结与分享
zynq平臺交叉編譯器的安裝
C language: Advanced pointer
The programmer starts the required application with one click of window bat
Simply drag objects to the item bar
leetcode007--判断字符串中的括号是否匹配
ApplicationContext injection bean
Druid -- JDBC tool class case
QML进阶(五)-通过粒子模拟系统实现各种炫酷的特效