The difference between MySQL and Redis

Source: Internet
Author: User
Tags redis

Database types for 1.mysql and Redis

MySQL is a relational database that is used primarily for persisting data, storing data on a hard disk, and reading slowly.

Redis is a nosql, non-relational database, is also a cache database, the data is stored in the cache, the cache read faster, can greatly improve the efficiency of operation, but save time is limited

Operating mechanism of 2.mysql

The relatively weak point of MySQL as a relational database for persistent storage is the presence of I/O operations on every request to access the database, if the database is accessed repeatedly and frequently. First: It will take a lot of time to link the database repeatedly, resulting in a slow running efficiency; second: repeated access to the database can also lead to excessive load on the database, then the concept of caching is derived.

3. Caching

The cache is the buffer of data exchange (cache), and when the browser executes the request, it first looks in the cache, gets it if it exists, or accesses the database.

The advantage of caching is that it reads faster

4.redis Database

The Redis database is a cache database for storing frequently used data, which reduces the number of accesses to the database and improves operational efficiency.

Summary of differences between 5.redis and MySQL

(1) Type

MySQL is a relational database from a type, and Redis is a cache database

(2) on the effect

MySQL for persistent storage of data to hard disk, powerful, but slow

Redis is used to store more frequent data into the cache and reads faster

(3) On demand

MySQL and Redis are generally used in conjunction because of different requirements.

The difference between MySQL and Redis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.