archive存储引擎注意事项
我这有个业务,专门存储LOG日志的,每天都会有上千万数据,所以采用了archive存储引擎,这样写入上较快,也比较节省空间。archive存储引擎这里简单介绍下:这个
我这有个业务,专门存储LOG日志的,每天都会有上千万数据,所以采用了archive存储引擎,这样写入上较快,也比较节省空间。
archive存储引擎这里简单介绍下:
这个可以说和MyISAM引擎差不多,备份的时候直接cp拷贝数据文件,恢复时直接cp拷贝到MySQL数据目录,而且在空间上节省了不少,下面来看看。
通过物理文件,,可以明显的对比出来。
看看磁盘IO性能图
压力有所变小。
好,下面说一个注意事项。今天开发反馈一条很简单的范围查询,结果耗时1分多钟,我查看了下查询字段是主键,不应该这么慢,如图:
结果全表扫描了。会不会是archive特性决定的?于是转换为MyISAM引擎,再试试:
很明显的看出,MyISAM引擎在范围搜索时,是可以利用到索引的,而archive引擎会全表扫描。
如果是=,in,archive引擎均可以用到索引。
本文出自 “贺春旸的技术专栏” 博客,请务必保留此出处

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

According to news on October 8, the U.S. auto market is undergoing a change under the hood. The previously beloved six-cylinder and eight-cylinder power engines are gradually losing their dominance, while three-cylinder engines are emerging. News on October 8 showed that the U.S. auto market is undergoing a change under the hood. The beloved six-cylinder and eight-cylinder power engines in the past are gradually losing their dominance, and the three-cylinder engine is beginning to emerge. In most people's minds, Americans love large-displacement models, and the "American big V8" has always been the Synonymous with American cars. However, according to data recently released by foreign media, the landscape of the U.S. auto market is undergoing tremendous changes, and the battle under the hood is intensifying. It is understood that before 2019, the United States

Real-time global illumination (Real-time GI) has always been the holy grail of computer graphics. Over the years, the industry has proposed various methods to solve this problem. Common methods include constraining the problem domain by utilizing certain assumptions, such as static geometry, a rough scene representation, or tracking rough probes, and interpolating lighting between the two. In Unreal Engine, the global illumination and reflection system Lumen technology was co-founded by Krzysztof Narkowicz and Daniel Wright. The goal was to build a solution that was different from its predecessors, capable of achieving uniform lighting and a baked-like lighting quality. Recently, at SIGGRAPH 2022, Krzysztof Narko

The intelligent NPC created by Academician Huang in "Cyberpunk 2077" can already speak Chinese? Qubit's first-hand experience, witnessing NPCs conversing fluently in both Chinese and English, with natural expressions and movements, and matching mouth shapes... If there wasn't a screen in front of me, it would really feel like being there. . At this year's CES exhibition, Nvidia used its intelligent engine Avatar Cloud Engine (ACE) to make game NPCs "alive", which caused quite a shock. △The intelligent NPC displayed at CES uses ACE. The characters in the game can have realistic voice conversations with players, while showing vivid expressions and body movements without having to prepare a script in advance. At the time of its debut, there were Ubisoft, Tencent, NetEase, MiHoYo and other countries.

MySQL storage engine selection comparison: InnoDB, MyISAM and Memory performance index evaluation Introduction: In the MySQL database, the choice of storage engine plays a vital role in system performance and data integrity. MySQL provides a variety of storage engines, the most commonly used engines include InnoDB, MyISAM and Memory. This article will evaluate the performance indicators of these three storage engines and compare them through code examples. 1. InnoDB engine InnoDB is My

The CentOS7 system provides a variety of commands for file compression and decompression operations. The following are some commonly used commands and their usage. tar: The tar command is used to package a file or directory and optionally compress it into a tar archive. Create tar compressed package: tar-cvfarchive.tarfile1file2directory Decompress tar compressed package: tar-xvfarchive.tar Create tar.gz compressed package: tar-czvfarchive.tar.gzfile1file2directory Decompress tar.gz compressed package: tar-xzvfarchive.tar.gz Create tar .bz2 compressed package: t

Redmi officially announced today that the new Redmi GPro 2024 will be officially released on March 4. In other words, next week we will have the release of this exciting new product. RedmiGPro2024 makes its full debut as an e-sports flagship, deeply integrating the mobile phone industry capabilities into the notebook business, presenting 210W super performance release, and Redmi performance reaching a new high. Equipped with i9-14900HX processor and RTX4060 graphics card, it perfectly combines e-sports and creation to achieve dual evolution. From this point of view, the performance of this new product will be improved again, and the actual effect is exciting. It was mentioned in the official warm-up that the new Redmi G Pro 2024 brings the PC version of the violent engine. Mobile phone technology empowerment, three major factors lead

MySQL is a widely used database management system, and different storage engines have different impacts on database performance. MyISAM and InnoDB are the two most commonly used storage engines in MySQL. They have different characteristics and improper use may affect the performance of the database. This article will introduce how to use these two storage engines to optimize MySQL performance. 1. MyISAM storage engine MyISAM is the most commonly used storage engine for MySQL. Its advantages are fast speed and small storage space. MyISA

Tips and strategies to improve the read performance of MySQL storage engine: Comparative analysis of MyISAM and InnoDB Introduction: MySQL is one of the most commonly used open source relational database management systems, mainly used to store and manage large amounts of structured data. In applications, the read performance of the database is often very important, because read operations are the main type of operations in most applications. This article will focus on how to improve the read performance of the MySQL storage engine, focusing on a comparative analysis of MyISAM and InnoDB, two commonly used storage engines.
