Reasons why the disk space of DELETE operation in MySQL will not decrease

delete operation in MySQL In InnoDB, the delete operation does not really delete data. In fact, mysql only marks the data to be deleted as deleted. The space occupied by the disk will not become smaller, that is, the table space is not really released. Thinking of such design 1. mysql of delete The operation is only logically marked for ...

Posted by Texan on Thu, 09 Dec 2021 08:07:58 +0100

Implementing Redis distributed lock from zero to one coding

Some students are so pissing. You can understand it. If you don't do it yourself, how can you understand it thoroughly? Let's do it together! Usage scenario and model selection The distributed multi node deployment mode makes it possible for shared variables to be operated at the same time. In case of data consistency requirements, global loc ...

Posted by phifgo on Thu, 09 Dec 2021 07:03:02 +0100

Database operation

Database operation Query all databases mysql> show databases; 2. Create a database (cannot have the same name) mysql> create database cgb2108; mysql> create database cgb210801 default character set utf8; #Specify the character set to avoid Chinese garbled code 3. Delete database mysql> drop database cgb2108; #Careful operati ...

Posted by t_galan on Thu, 09 Dec 2021 04:17:58 +0100

Implement a java version of redis -- implement a memory KV storage

The front row said that this is a very simple KV memory database. As the first chapter of the author's implementation of redis, the boss can go because it is really simple. For learning only. On a whim, I saw the open source project godis, but I was not very familiar with go. At first, I went to see godis and was confused. I simply thought why ...

Posted by levidyllan on Wed, 08 Dec 2021 23:53:16 +0100

Java code generator update: adding multi data source schema support

introduction Hello, guys, I haven't seen you for a week. During this time, I updated a version of the code generator in my spare time after work and added the previously popular multi data source mode. In this way, the generated code can realize the function of dynamic switching of data sources. Multi data sources are commonly used in proj ...

Posted by h123z on Wed, 08 Dec 2021 23:45:49 +0100

Wan Da #1, how to query IS (intention to share) locks on a table in MySQL

Welcome to the MySQL technical articles shared by the great SQL community. If you have any questions or want to learn, you can leave a message in the comment area below. After seeing it, you will answer itproblemThe original question is as follows:If you add a shared lock to a row of a table in a MySQL transaction, in theory, the table itself w ...

Posted by Dagwing on Wed, 08 Dec 2021 10:28:46 +0100

Teach you how to deploy redis services in windows

1 Introduction redis does not officially provide the installation package under windows. The windows installation package you see is the version officially maintained by Microsoft. Why Microsoft doesn't officially provide the installation package of windows version: I guess so: because redis is single threaded and high-performance. Therefo ...

Posted by pixeltrace on Wed, 08 Dec 2021 05:38:04 +0100

MySQL database under Ubuntu

1. Database installation The first method: apt installation sudo apt update //Update source sudo apt install -y mysql-server   The first method: deb package installation reach MySQL :: Download MySQL Community Server 2. Initialize configuration sudo mysql_secure_installation   Configure whether to verify password strength, y ...

Posted by Lisa23 on Wed, 08 Dec 2021 04:57:56 +0100

MySQL MHA for high availability architecture

catalogue 1, Introduction 2, MHA services working principle Actual operation Initialize environment Modify the hostname of Master, Slave1 and Slave2 nodes Master slave synchronization Install MHA 1, Introduction MHA (Master HA) is an open source MySQL high availability program. It provides the automatic master failover function for M ...

Posted by shiranwas on Wed, 08 Dec 2021 04:21:06 +0100

MySQL table ibd file deletion and recovery of database Series

Some time ago, I encountered the emergency treatment after the mysql table ibd file was deleted. Deleting the table file directly is strictly prohibited. Here we test the emergency recovery process in several cases. 1. The ibd file has been emptied or deleted by mistake 1) Create table sbtest1 and insert data CREATE TABLE `sbtest1` ( `id` ...

Posted by youngsei on Wed, 08 Dec 2021 03:55:54 +0100