Read write separation:
Before we get to the point, let's get to know the separation of reading and writing
What is read write separation?
Read write separation is to let the main database process transactional queries and the slave database process select queries. Database replication is used to synchronize the data changes caused by trans ...
Posted on Sun, 07 Nov 2021 18:37:51 -0500 by mudkicker
Preparing for the 2022 spring recruitment or summer internship, this column will continue to output MySQL series articles. I wish you a little progress every day! Private letter writer at the end of the article, let's go to Dachang together.This article summarizes how to view MySQL database status and information, which will be updated daily~Fo ...
Posted on Sun, 07 Nov 2021 12:16:00 -0500 by plutoplanet
1. Row to Column
1.1 What is row to column
The normal query result is this
But I want to be like this
To accomplish this through an SQL statement is called row to column
1.2 Sample data preparation
With id, name, course, result
create table test_9(
score decimal( ...
Posted on Sun, 07 Nov 2021 11:08:15 -0500 by morrisoner
sql classification DDL (data definition language) database definition language Some sql used when creating table views, such as CREATE, ALTER, DROP, etc. DDL is mainly used to define or modify database, table and view structures DML (data manipulation language): These are the SELECT, UPDATE, INSERT and DELETE that we most often use. It is mainl ...
Posted on Fri, 05 Nov 2021 22:37:47 -0400 by fatmikey
If there is a problem with the master server in the master-slave server, what should I do without affecting the production environment? We need to apply MHA. Let's understand MHA.
1, MHA overview
MHA (MasterHigh Availability) is a set of excellent software for failover and master-slave replication in MySQL high availability envir ...
Posted on Fri, 05 Nov 2021 19:48:25 -0400 by wazo00
There is a department table, employee table, jobs table and job table as follows_ Grade table, locations table Create the above five tables first, and then do some exercises;
select * from employees;
-- 1.Query the Department whose minimum wage is greater than the minimum wage of department No. 50 id And its m ...
Posted on Fri, 05 Nov 2021 15:42:02 -0400 by mnewhart
Group query - group by
group by and having
Group by: group by a certain field or some fields. Having: having is to filter the grouped data again
Find out the highest salary for each job. This needs to be grouped, because you are not looking for all the maximum salary, and the maximum salary of each job. Grouping functions are always performe ...
Posted on Fri, 05 Nov 2021 02:13:43 -0400 by majik_sheff
The Database in MySQL is like a container, which contains various objects. For example, data tables, views, stored procedures, and triggers. Among them, the Table is the main object for storing data. The relationship between them is shown in the figure below:This chapter mainly introduces the creation, viewing, selection and deletion of databas ...
Posted on Thu, 04 Nov 2021 19:33:01 -0400 by peteraub