본문 바로가기

MariaDB, MySQL

MySQL 8.0 JSON JSON ["a"] - JSON ARRAY ["a","b"] - JSON ARRAY ( Ordered collection of values ) ["a", {"b": 20}] - JSON OBJECT ( Having key, value, Unordered set of name/value pairs ) ["a", {"b": [20, 30]}] JSON column is limited to the value of the max_allowed_packet You can manipulate the size of JSON using JSON_STORAGE_SIZE() function MySQL handles strings used in JSON context using the utf8mb4 character set.. 더보기
MySQL 5.7 Online DDL Online DDL With the online DDL Prevent a table from becoming unavailable Adjust the balance between performance and concurrency by LOCK clause Less disk space usage and I/O overhead than table-copy MySQL act as below as possible. Choose the left option if possible rather than the right one. ALGORITHM = INPLACE | COPY LOCK = NONE | SHARED | EXCLUSIVE, DEFAULT TYPE QUERY DML NONE PERMIT PERMIT SHA.. 더보기
MySQL 5.7 SQL Modes sql_mode Default SQL mode NO_ENGINE_SUBSTITUTION From 5.7.5 ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES From 5.7.7 NO_AUTO_CREATE_USER From 5.7.8 NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_IN_DATE Set sql_mode in my.cnf sql-mode="value1,value2" dynamic SET GLOBAL sql_mode = 'modes'; SET SESSION sql_mode = 'modes'; Full List of SQL Modes (based on 5.7.23) Strict SQL mode STRICT_ALL_TABLES - Enab.. 더보기
MySQL 5.7.27 Installation Engine mysql-5.7.27-linux-glibc2.12-x86_64.tar.gz Change OS limit root# vi /etc/security/limits.conf mysql soft nproc 1024 mysql hard nproc 1024 mysql soft nofile 10240 mysql hard nofile 10240 User creation root# groupadd mysql useradd -s /bin/bash -g mysql mysql passwd mysql Locate engine file Deploy engine gunzip mysql-5.7.27-linux-glibc2.12-x86_64.tar.gz tar xvf mysql-5.7.27-linux-glibc2.12-x.. 더보기
MySQL Cluster CGE MySQL Cluster CGEMySQL Cluster 7.5 데이터 노드 당 128 TB + 이상 사용 가능99.999 AvailabilityIn-Memory Database Delivering 200 Million QPSAuto-sharding for Write-scalabilitySQL & NoSQL APIsMulti-site Clusters with Active Active Geographical ReplicationOnline Scaling & Schema UpgradesMySQL Cluster Auto-InstallerMySQL Cluster Manager24*7 Technical Support ArchitectureFeatures샤딩새로운 노드는 온라인중에 추가할 수 있으며, 높은 읽기 로드.. 더보기
MARIADB 5.5 ARCHITECTURE v1.0 MARIADB 5.5 ARCHITECTURE v1.0 Date Ver Etc. 13.06.04 1.0 1. MariaDB Architecture (http://docs.oracle.com/cd/E19957-01/mysql-refman-5.5/storage-engines.html ) MariaDB Architecture 는 MySQL 과 동일하다.상단의 그림은 MySQL 5.5 의 Architecture 이다. 2. Architecture Components 응용프로그램 Connectors Management Service & Utilities MariaDB Server MariaDB Engine MySQL 엔진 커넥션 핸들러 SQL 인터페이스 SQL 파서 SQL 옵티마이저 캐시 & 버퍼 Storage E.. 더보기
MySQL 의 Trigger 는 복수의 DML 오퍼레이션에 대해 생성할 수 없다. ORACLE 의 경우 Trigger 를 생성할 때 Trigger 를 동작시킬 동작 (DML) 을혼용해서 사용할 수 있다. 이를테면 특정 테이블에 대해 INSERT, UPDATE, DELETE 에 대해 동작시킬 수 있고,OPERATION 을 FLAG 를 통해 식별할 수 있다. 다시말해 INSERT 에 대해서는 어떤 동작을 취하고,UPDATE 에 대해서는 어떤 동작을 취하고,DELETE 에 대해서는 ... 하지만 MySQL 의 경우는 오퍼레이션을 하나만 지정 가능하다.한 트리거는 INSERT 에 대해서만 동작하며,한 트리거는 UPDATE 에 대해서만 동작하고,한 트리거는 DELETE 에 대해서만 동작한다. 이는 2009 년의 포럼에도 나와있다.( http://forums.mysql.com/read.php?9.. 더보기
MySQL EXPLAIN EXTENDED can tell you all kinds of interesting things MySQL EXPLAIN EXTENDED can tell you all kinds of interesting things Date Ver Etc. * 이 글은 MySQL Performance Blog 의 기사를 번역한 내용이다. * EXPLAIN EXTENDED can tell you all kinds of interesting things * http://www.mysqlperformanceblog.com/2010/06/15/explain-extended-can-tell-you-all-kinds-of-interesting-things/ EXPLAIN EXTENDED can tell you all kinds of interesting things While many people are familiar w.. 더보기
MySQL InnoDB Caching MySQL InnoDB Caching Date Ver Etc. 110601 v1.0 1. InnoDB Caching 아래의 Reality of InnoDB Caching, InnoDB Caching 은 MySQL Performance Blog 의 ‘Peter Zaitsev’ 가 기고한 글을 해석한 것이다. 2. Usage of ORACLE A. Reality of InnoDB Caching I have mentioned few times Innodb caches data in pages and even if you have working set consisting of relatively few rows your working set in terms of pages can be rather large. .. 더보기