Database
-
[ ClickHouse ] arrayMap Function 알아보기Database/Clickhouse 2023. 9. 6. 13:12
- 목차 키워드.- ArrayMap arrayMap 사용해보기.arrayMap 함수는 Array(String) 와 같은 Array 타입의 데이터를 대상으로 Map Function 을 적용할 수 있습니다.일종의 Array 의 각 Item 을 변형하는 Mapper 함수와 같이 동작합니다. 간단한 활용 예시는 아래와 같습니다.user_actions 이라는 이름의 MergeTree 테이블을 생성하였구요.Array(String) 타입의 action 칼럼을 대상으로 arrayMap 함수를 적용합니다.create table default.user_actions( user String, action Array(String), acted_at DateTime) engine = MergeTre..
-
[ ClickHouse ] groupArray Function 알아보기Database/Clickhouse 2023. 9. 6. 08:37
- 목차 키워드.- groupArray- ClickHouse 함께 보면 좋은 글.아래 글은 Docker 로 간단히 ClickHouse Container 를 구축하는 설명을 작성한 페이지입니다. https://westlife0615.tistory.com/694 [Clickhouse] Docker 로 Clickhouse 구현하기- 목차 들어가며. 이번 글에서는 Docker 를 활용해서 Clickhouse 를 구축하는 글을 작성하려고 합니다. 사용할 Docker Image 는 bitnami/clickhouse 이미지입니다. 간단한 MergeTree 엔진의 Table 을 생성하고 데이westlife0615.tistory.com groupArray 사용해보기.이번 글에서는 ClickHouse 의 groupArr..
-
KinD 로 Vitess 구현하기.Database/Vitess 2023. 9. 5. 09:54
- 목차 함께 보면 좋은 글. https://westlife0615.tistory.com/407 KinD 알아보기. - 목차 소개. KinD 는 "카인드" 라고 발음되며, 로컬 머신에서 쿠버네티스를 간편하게 실행할 수 있는 도구입니다. KinD 는 Kubernetes in Docker 의 약자이구요. Docker 를 활용하여 쿠버네티스 환경을 구성 westlife0615.tistory.com https://westlife0615.tistory.com/80 Kubernetes Custom Resource 알아보기 - 목차 소개.쿠버네티스의 Custom Resource 에 대해서 알아보려고 합니다. 쿠버네티스는 자체적인 Resource 들을 가집니다. Pod, ReplicaSet, Deployment, Se..
-
MySQL mysqldump 알아보기Database 2023. 5. 18. 06:21
- 목차 소개.mysqldump 는 MySQL 의 데이터 상태를 백업할 수 있는 MySQL 툴입니다. 특정 시점의 MySQL 의 데이터 상태를 스냅샷이라고도 하는데요. mysqldump 를 통해서 특정 시점의 스냅샷을 생성할 수 있습니다. mysqldump 는 Logical Backup 이라고 불립니다. 이와 반대되는 backup 방식은 Physical Backup 입니다. MySQL 의 On-Disk 요소인 Tablespace 와 Redo Log 등을 고려하는 Physical Backup 과 달리 Logical Backup 은 단순히 dump 시점의 데이터 상태만들 고려합니다. 즉, Logical Backup 은 Table 에 Lock 을 걸어 현재 시점의 데이터들을 전부 조회하고 조회된 데이터들을 W..
-
Mysql ProcedureDatabase 2023. 5. 15. 18:16
소개procedure 를 사용하면 반복적으로 사용되는 쿼리문을 함수 형태로 관리할 수 있습니다. 함수의 형식을 취하기 때문에 input arguments 를 통한 동적인 처리도 가능합니다. 생성된 procedure 는 CALL procedure_name 형태로 호출할 수 있습니다. 아래와 같은 형식으로 Procedure 를 생성할 수 있습니다.DELIMITER $$ CREATE PROCEDURE test_procedure ( IN param1 int, OUT param2 int ) BEGIN SELECT NOW(); end $$ DELIMITER ; ------------------------------------ SHOW PROCEDURE STATUS WHERE Name = 'test_procedure..
-
MySQL Tablespace 알아보기Database 2023. 5. 12. 18:18
- 목차 함께 보면 좋을 글 https://westlife0615.tistory.com/16 MySQL Page 알아보기 - 목차 함께 읽으면 좋은 글 https://westlife0615.tistory.com/8 MySQL Undo Log (Undo Tablespace) 알아보기 - 목차 소개. MySQL 은 Undo Log 라는 데이터 저장 영역이 있습니다. Undo 란 revert, rollback 과 같이 직전에 수행 westlife0615.tistory.com 소개. 이번 글에서는 Tablespace 에 대해서 알아보려고 합니다. Tablespace 은 MySQL 의 On-Disk 영역의 구성요소입니다. MySQL 의 데이터들은 Tablespace 에 저장이 됩니다. MySQL 의 데이터는 Wr..
-
MySQL ACID CompliantDatabase 2023. 5. 8. 06:25
소개InnoDB 스토리지 엔진은 ACID Compliant 트랜잭션을 보장합니다. 트랜잭션은 데이터의 접근과 저장 측면에서 안정성을 보장해주는데요. A : atomicity C : Consistency I : Isolation D: Durability 위 4가지 방식으로 대표되는 신뢰성을 제공합니다. Atomicityatomic 하다는 표현은 여러 개의 작업을 하나의 작업으로 묶이는 것을 의미합니다. 예를 들어, 1. 데이터를 생성한 후, 2. 생성된 데이터를 기반으로 수정이 발생하는 경우에 두번째 작업인 수정 작업이 실패하면 첫번째 단계인 데이터 생성 또한 무효화됩니다. create table member ( id int primary key, name varchar(32), ) start transa..
-
mysql connectionDatabase 2023. 2. 15. 20:58
Connection mysql 을 포함한 데이터베이스는 클라이언트의 요청을 처리하는 일종의 서버와 유사합니다. mysqld 라고 불리는 mysql 서버는 네트워크를 리스닝하고 있으며 요청이 들어온다면 커넥션을 맺고 클라이언트의 쿼리 요청을 처리합니다. 이때 커넥션이라는 표현이 mysql 에서 다양하게 표현됩니다. process, thread, connection, session 등으로 표현되는데요. mysql 에 한해서는 다 같은 표현이라고 생각해도 무방합니다. mysql은 하나의 요청에 대하여 커넥션을 맺는데, 의미적인 관점에서 connection, session 이라고 불립니다. 그리고 커넥션의 결과로써 요청을 수행하는 태스크 관점에서 process, thread 라고 불립니다. 시스템 관점에서 pr..
-
[ ClickHouse ] arrayFlatten Function 알아보기Database/Clickhouse 2023. 1. 23. 21:03
- 목차 키워드.- Flatten 함께 보면 좋은 글.https://westlife0615.tistory.com/694 [Clickhouse] Docker 로 Clickhouse 구현하기- 목차 들어가며. 이번 글에서는 Docker 를 활용해서 Clickhouse 를 구축하는 글을 작성하려고 합니다. 사용할 Docker Image 는 bitnami/clickhouse 이미지입니다. 간단한 MergeTree 엔진의 Table 을 생성하고 데이westlife0615.tistory.com https://westlife0615.tistory.com/241 [ ClickHouse ] groupArray Function 알아보기- 목차 키워드.- groupArray- ClickHouse 함께 보면 좋은 글.아래 글..