Introduction to mysql slow log opening and analysis
1. Open Slow Query
- View
show variables like 'slow_query%';
show variables like 'long_query_time';
show variables like 'log_queries_not_using_indexes';
Temporarily open slow log
- Open+Set uses root user, after closing the connection, re-query to see the modified value, only valid for the current service, configuration w ...
Added by kitaeshi on Tue, 21 Jan 2020 18:43:31 +0200
MYSQL recursive query, query all the parent classes according to the subclass ID (the first detailed tutorial of the universe)
Preface
In the work, the business requirements encounter MYSQL recursion, and most of the online data are copied back and forth, although the code can indeed run. But Mengxin really can't understand what this SQL writes. Looking at the comments below, many people didn't reply to their questions. He ...
Added by Zay on Tue, 21 Jan 2020 07:33:12 +0200
USING CURRENT LOGFILE has been deprecated
1, Oracle 19c alarm log
2020-01-19 20:40:26.193000 +08:00
Warning: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE has been deprecated.
Warning: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE has been deprecated.
alter database recover managed standby database using current logfile disconnect from s ...
Added by noclist on Mon, 20 Jan 2020 20:09:06 +0200
MySQL Cluster Solution: master-slave replication
Get ready
I use docker deployment on CentOS, so I need to prepare docker related operations in advance
docker
CentOS installation
To configure
mapping
A host has multiple virtual machines, so it needs to use different named configuration folders, such as / etc/mysql/my.cnf.d/master01, to distingu ...
Added by Clandestinex337 on Sun, 19 Jan 2020 12:17:53 +0200
Series: using python+antlr to analyze hive sql to obtain data consanguinity
target
Series 3 The basic AST traversal is done in.
Before deep extraction of table name and column name in SQL, we need to solve the two remaining practical problems in Chapter 3, semicolon and case
Semicolon problem
The performance of the semicolon problem is the automatically generated HiveParser ...
Added by mortal991 on Thu, 16 Jan 2020 08:58:24 +0200
Common settings for Binlog in MySQL
Get mysql image
➜ ~ docker pull mysql
➜ ~ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql latest d435eee2caa5 3 weeks ago 456MB
mysql ...
Added by unmash on Thu, 16 Jan 2020 04:07:52 +0200
Detailed explanation of Java JDBC connection to mysql database
1.JDBC introduction
jdbc(java database connectivity) provides a unified programming interface for java developers to use the database. It consists of a set of java classes and interfaces.
The classes and interfaces needed for JDBC are:
DriverManager,Connection,Statement,ResultSet
2. Download MySQL connector Java
The mysql version of ...
Added by nickthegreek on Tue, 14 Jan 2020 12:14:22 +0200
Spring JdbcTemplate
I wrote an article yesterday Why don't many people want to use hibernate? Blog, with the majority of ape friends to discuss the advantages and disadvantages of hibernate and the way to connect to the database, go home to study, found that Spring JdbcTemplate is very useful, made a summary, share to you.
Disclaimer: This article is just a littl ...
Added by tooNight on Tue, 14 Jan 2020 11:05:31 +0200
Caching of MyBatis query results
The caching of mybatis refers to caching query results. When using the same sql statement and passing in the same parameters to query in the future, the query results can be obtained directly from the local caching of mybatis without querying the database.
mybatis's cache includes the first level cache and the second level cache. The first leve ...
Added by grandeclectus on Sun, 12 Jan 2020 13:53:13 +0200
Niuke written test (1)
(1)
Different products come from the same brand. This question requires that the sales of each brand should be calculated and aggregated
WITH c as (
SELECT a.logday, b.brand_name, SUM(a.sale_amt) as sum_sales
FROM a INNER JOIN
b ON a.SKU_ID = b.SKU_ID
WHERE a.logday BETWEEN '2017-01-01' AND '2017-12-31'
AND ...
Added by Moonglobe on Thu, 09 Jan 2020 17:13:02 +0200