浅谈MySQL学习及思考
本博文旨在结合自己看书理解,并借此图进行说明,如有谬误,望大家指正,以共同探讨为目的,交流学习。首先介绍一下架构图的由来:最近看关于mysql方面书籍的一点
本博文旨在结合自己看书理解,并借此图进行说明,如有谬误,望大家指正,以共同探讨为目的,交流学习。
首先介绍一下架构图的由来:最近看关于mysql方面书籍的一点心得,把文字转化成图片而得,方便理解。
我主要从读、写、底层磁盘三方面进行阐述:
1、读操作:
我们知道数据在读取的时候,需要从磁盘读到内存中,然后再做相应的操作,而在优化读操作的时候,主要想buffer,cache这些进行优化:
以上是读操作的一些介绍,接下来是写操作方面的。
2、写操作:
写操作分为热门数据和普通数据,简而言之就是按照频繁程度进行划分的。然频繁修改的数据可以和非频繁的数据进行分开。
举个例子:
现在是把热门数据和普通数据分开了,但是对于高并发的数据库服务器来说,如何抗并发,这到成了一个重要的问题,当然高配服务器,集群用上,包括Nosql也用上可一解决这样的问题,如果在设计的时候能使用队列机制,这样不就更好了嘛!(地铁上看到一句广告语:有序方能通畅!)
当然你可能有更好的方法,香港虚拟主机,可以共同交流。
3、底层磁盘规划:
而对于热门数据可以使用RAID10,这样他的性能和安全性会提高很多;而普通数据可以采用RAID5,主要提供安全性,像临时表这样的使用RAID0,在性能上发挥巨大的优势。
以上均个人见解,如有疑问,可共同交流学习!
本文出自 “Ro の博客” 博客,请务必保留此出处

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Windows 11 has strict requirements, and after struggling to obtain that storage, losing your hard drive and data would be a shame. Well, we have good news that can help you buffer against hard drive failure. Using built-in Windows tools, you can copy all your data from one drive to another. This way, if one drive fails, you can mirror and rebuild the original data on the replacement drive. Can Windows 11 do RAID? With Windows Storage Spaces feature, you can perform RAID on Windows 11. This feature allows you to create multiple virtual disks using a hard drive connected directly to your computer without degrading performance. Benefits of Raid: Reduce the cost of disk

RAID or Redundant Array of Independent Disks is a data storage technology in which multiple external drives are combined into one. It was widely used when large hard drives were expensive, but many people still prefer the RAID external drive method. There are several levels of RAID, each serving a specific purpose. Keep in mind that the average user doesn't have to delve into the complexity, a simple setup of RAID0 or RAID1 should work fine. Reasons to consider raiding an external drive: Improved PC performance Easy to configure, cheaper than existing alternatives Faster data reading and writing Efficient backup solution through mirroring How to RAID an external drive on Windows 11? Before RAID external hard drives, you need to pay attention to the following first things

How to view soft and hard raid information under Linux. Software raid: You can only view cat/proc/mdstat through the Linux system itself to see the raid level, status and other information. Hardware raid: The best way is to check it through the installed raid manufacturer's management tool, including cmdline and graphical interface. For example, adapterc's hardware card can be viewed through the following command: #/usr/dpt/raidutil-lall You can see very detailed information. Of course, more often than not, the corresponding management tools are not installed. If you can only rely on Linux itself, generally I know two methods: #dmesg|grep-irai

How to improve performance by optimizing the AVG function in MySQL MySQL is a popular relational database management system that contains many powerful functions and functions. The AVG function is widely used in calculating averages, but because this function needs to traverse the entire data set, it will cause performance problems in the case of large-scale data. This article will introduce in detail how to optimize the AVG function through MySQL to improve performance. 1. Using indexes Indexes are the most important part of MySQL optimization.

MySQL is a relational database management system widely used in the field of e-commerce. In e-commerce applications, it is crucial to optimize and secure MySQL. This article will analyze MySQL’s optimization and security project experience in e-commerce applications. 1. Performance optimization database architecture design: In e-commerce applications, database design is the key. Reasonable table structure design and index design can improve the query performance of the database. At the same time, using table splitting and partitioning technology can reduce the amount of data in a single table and improve query efficiency.

MySQL optimization based on TokuDB engine: improving writing and compression performance Introduction: As a commonly used relational database management system, MySQL is facing increasing writing pressure and storage requirements in the context of the big data era. To meet this challenge, TokuDB engine came into being. This article will introduce how to use the TokuDB engine to improve MySQL's writing performance and compression performance. 1. What is TokuDB engine? TokuDB engine is a big data-oriented engine designed to handle high write

MySQL is a widely used relational database management system commonly used for web application development and data storage. In practical applications, the underlying optimization of MySQL is particularly important, among which the advanced optimization of SQL statements is the key to improving database performance. This article will introduce some tips and best practices for implementing MySQL's underlying optimization, as well as specific code examples. Determine the query conditions When writing SQL statements, you must first clearly define the query conditions and avoid using unlimited wildcard queries, that is, avoid using "%" to open the query.

How to optimize MySQL connection number management MySQL is a popular relational database management system that is widely used in various websites and applications. In the actual application process, MySQL connection number management is a very important issue, especially in high concurrency situations. Reasonable management of the number of connections can improve the performance and stability of the system. This article will introduce how to optimize MySQL connection number management, including detailed code examples. 1. Understand connection number management In MySQL, the number of connections refers to the number of connections that the system can connect at the same time.
