Priority of and or query in MySQL

This may be a problem that is easy to be ignored. First, we need to be clear:In MySQL, AND takes precedence over OR. That is to say, without the limitation of parentheses (), the AND statement is always executed first AND then the OR statement.For example: select * from table where condition1 and condition2 or condition3 Equivalent to select ...

Added by Wright on Wed, 04 Dec 2019 03:17:23 +0200

MySQL big data table horizontal partition optimization

Change the large running table to a partitioned table The code of this article is limited to monthly horizontal partition based on data time. Other requirements can be implemented by modifying the code 1. Create a partition table The table field of this table is the same as that of the original table, with partition CREATE TABLE `metric_data_tm ...

Added by CrimsonSoul on Tue, 03 Dec 2019 04:40:27 +0200

Code use example of RDS trigger eventFormat as protobuf

Preface Function calculation A new trigger, RDS trigger, has been released, which indicates that a new member has been added to the event source of function calculation-- Alibaba cloud Relational Database Service (RDS) According to Official documents As a supplement, this article explains the code example when eventFormat is protobuf. protobuf ...

Added by davieboy on Mon, 02 Dec 2019 07:59:25 +0200

SpringBoot 2.0 | SpringBoot + MyBatis Configure Multiple Data Sources

In the traditional monolithic architecture, one system corresponds to one database, but in a distributed system, such as micro-services, each service corresponds to one database. Due to business requirements, sometimes it is necessary to access data from multiple databases in one service. We need to configure multiple data sourc ...

Added by staffanolin on Sun, 01 Dec 2019 21:25:50 +0200

oracle sort before Pagination

Oracle sort paging query and MySQL database statements are not the same, here is a simple record. Sort by operation time 1 SELECT A.*, ROWNUM RN FROM (SELECT * FROM v_log) A ORDER BY operatetime DESC Result It can be found that it is sorted by time, but rownum is not from small to large, because oracle becomes rownum, and then it needs to que ...

Added by vinoth on Sun, 01 Dec 2019 07:05:15 +0200

Alibaba cloud CentOS 7.6 installation of mysql8

Create mysql users and user groups groupadd mysql useradd -g mysql mysql passwd mysql Uninstalling mariadb from the system #query rpm -qa|grep mariadb Return mariadb-libs-5.5.60-1.el7_.x86_ #uninstall rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64 Return error: Failed dependencies: libmysqlclient.so.18()(64bit) is needed by (installed) post ...

Added by steve55 on Sun, 01 Dec 2019 03:37:24 +0200

Foreign key problems caused by rename in MySQL table

Background:Due to the slow graphical display of the problems of zabbix monitoring, the events table of zabbix library is cleaned up. The original table rename is used as bak table in the cleaning process. After rebuilding the events table, part of the data in the backup table is imported into the new table. After that, it was found that the za ...

Added by Francois on Sat, 30 Nov 2019 18:29:35 +0200

jdbc linked database

JDBC introduction The full name of JDBC is java data base connectivity, which can provide unified access to a variety of databases. JDBC is a set of database access programming interface developed by sun, which is a SQL level API. It is written by java language, so it has good cross platform characteristics. The database application written by ...

Added by mallard on Sat, 30 Nov 2019 16:33:25 +0200

Analysis of bin directory structure in Linux system

Generalization In Linux system, the executable commands are usually stored in / bin, / sbin, / user/bin, / user/sbing. The details are as follows: /bin Store the most basic and necessary execution commands of system operation, that is, the commands that can be executed for all users. The following is the bin directory und ...

Added by alex clone on Sat, 30 Nov 2019 07:29:35 +0200

Build Docker Container Actual Warfare

Bowen structureBuilding a Nginx containerBuilding Tomcat ContainersBuilding Mysql Container Understanding Docker containers can be accomplished by Installation and simple operation To understand. 1. Building Nginx containers Nginx is a lightweight WEB server as well as an excellent reverse proxy server. Nginx service takes up less memory and ...

Added by Delaran on Fri, 29 Nov 2019 21:21:14 +0200