Database
-
ClickHouse MergeTree 알아보기Database/Clickhouse 2023. 11. 7. 08:10
- 목차 소개. ClickHouse 는 러시아의 검색 사이트인 Yandex 에서 개발한 Column 기반의 데이터베이스입니다. 분석용 데이터베이스로 사용되구요. Row 기반이 아닌 Column 기반으로 데이터를 취급하는 것이 큰 특징입니다. 흔히 로그성 데이터들이 ClickHouse 가 취급하는 데이터들입니다. 로그성 데이터의 예를 들면, - 시스템 또는 서버의 로그 데이터 - 서버의 상태 정보들 (CPU, Memory 사용량, Network IO 등) - 웹/앱 내부에서 사용자들의 행동데이터 - IoT 센서 데이터 등이 존재합니다. 이러한 로그성 데이터들의 큰 특징은 High Volume Write 가 빈번합니다. 즉, 데이터의 생성의 양이 매우 많습니다. 일반적인 경우의 데이터 생성 시나리오와는 크게..
-
Database Driver 알아보기Database 2023. 11. 4. 07:47
- 목차 소개. Database 의 Driver 에 대해서 알아보도록 하겠습니다. Driver 는 Application 과 Database 를 잇는 중간다리 역할을 합니다. Application 과 Database 가 소통을 하기 위해서 필요한 기능들을 수행하는데요. 예를 들어, Connection, Serialization/Deserialization 등이 있습니다. Application 과 Database 는 보통 물리적으로 떨어져 있을 겁니다. 서로 다른 서버인 것이죠. 그래서 이들은 네트워크적으로 연결이 되어있어야하고, Application 과 Database 가 서로 통신할 수 있도록 Connection 이 관리됩니다. 그리고 이들은 서로 데이터를 주고 받습니다. Application 은 Dat..
-
MySQL Index 알아보기Database 2023. 10. 30. 21:58
- 목차 소개. MySQL 는 데이터 조회의 퍼포먼스를 향상시키기 위해 Index 라는 기능을 사용합니다. Index 는 B-tree 라는 자료구조를 사용하여 특정 대이터와 데이터의 위치 정보를 저장합니다. 예를 들어, student 라는 테이블이 존재하고 id 라는 칼럼이 존재한다고 가정하겠습니다. 이때 id 칼럼을 위한 index 를 세팅하게되면, index 는 모든 student 들의 id 값과 id 에 해당하는 student row 의 위치 정보가 저장됩니다. table: student student(id: 1, name: Andy) student(id: 2, name: David) student(id: 3, name: Kevin) student(id: 4,..
-
MySQL Page 알아보기Database 2023. 10. 30. 10:05
- 목차 함께 읽으면 좋은 글https://westlife0615.tistory.com/8 MySQL Undo Log (Undo Tablespace) 알아보기- 목차 소개. MySQL 은 Undo Log 라는 데이터 저장 영역이 있습니다. Undo 란 revert, rollback 과 같이 직전에 수행한 동작을 되돌리는 행위입니다. MySQL 같은 데이터데이스 영역에서의 Undo 란 Write Query (DML Qwestlife0615.tistory.comhttps://westlife0615.tistory.com/17 MySQL Buffer Pool 알아보기- 목차 함께 보면 좋은 글 https://westlife0615.tistory.com/5 MySQL Redo Log 알아보기 - 목차 소개. My..
-
MySQL Buffer Pool 알아보기Database 2023. 10. 30. 10:05
- 목차 함께 보면 좋은 글 https://westlife0615.tistory.com/5 MySQL Redo Log 알아보기 - 목차 소개. MySQL 의 Redo Log 는 Write Query 에 해당하는 데이터의 변경을 저장합니다. Insert, Update, Delete 요청의 타겟이 되는 Rows 들의 변경사항을 기록합니다. 이러한 하나하나의 기록들을 Redo Log Entr westlife0615.tistory.com https://westlife0615.tistory.com/16 MySQL Page 알아보기 - 목차 함께 읽으면 좋은 글 https://westlife0615.tistory.com/8 MySQL Undo Log (Undo Tablespace) 알아보기 - 목차 소개. MySQ..
-
MySQL Undo Log (Undo Tablespace) 알아보기Database 2023. 10. 30. 10:05
- 목차 함께 보면 좋은 글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소개.MySQL 은 Undo Log 라는 데이터 저장 영역이 있습니다. Undo 란 revert, rollback 과 같이 직전에 수행한 동작을 되돌리는 행위입니다. MySQL 같은 데이터데이스 영역에서의 Undo 란 Write Query (DM..
-
MySQL Redo Log 알아보기Database 2023. 10. 30. 10:05
- 목차 함께 보면 좋은 글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 소개. MySQL 의 Redo Log 는 Write Query 에 해당하는 데이터의 변경을 저장합니다. Insert, Update, Delete 요청의 타겟이 되는 Rows 들의 변경사항을 기록합니다. 이러한 하나하나의 기록들을 Redo Log..
-
MySQL Lock 이해하기Database 2023. 9. 20. 06:15
- 목차 소개. MySQL 의 Lock 은 다른 사용자가 특정 데이터를 변경하는 행위를 제한합니다. 즉, 여러 사용자가 하나의 데이터를 조작하는 것을 막아 충돌을 방지합니다. MySQL 의 관점에서 사용자란 Client 가 되는데요. Client 는 하나의 Transaction 으로 표현될 수 있습니다. 즉, 어떤 Transaction 이 특정 데이터에 Lock 을 적용한다면 다른 Transaction 들은 해당 데이터를 변경할 수 없게 됩니다. Lock 의 범위는 Row, Table, Database 단위로 적용됩니다. 만약 아래와 같은 쿼리가 실행된 상태라면 select * from member where name = 'Andy' for share; 다른 Transaction 은 "Andy" 라는 m..
-
MySQL ReplicationDatabase 2023. 9. 11. 15:32
소개 * binary log 는 데이터의 변형 사항을 기록하는 로그 파일입니다. Table 에 대한 create, drop, truncate 와 Row 에 대한 insert, update, delete 에 대한 쿼리을 모두 기록합니다. 해당하는 쿼리들은 binary format 으로 기록되기 때문에 binary log 라고 불립니다. MySQL Replication 은 Source MySQL 에 저장된 binary log 를 적극 활용합니다. Replica MySQL 이 Source MySQL 의 binary log 내용들을 읽어들여 복제를 시도하죠. 이렇게 복제된 2개 이상의 데이터베이스가 가지는 여러 이점들이 있습니다. 먼저, 복제된 서버가 존재하기 때문에 가용성을 높일 수 있습니다. 그리고 읽기 요..
-
MySQL my.cnfDatabase 2023. 9. 11. 09:24
소개 my.cnf 라는 이름은 MySQL 의 설정파일의 이름입니다. cnf 라는 확장자명은 유닉스 환경에서 사용되는 MySQL 설정 파일의 확장자이며, 윈도우 계열에서는 my.ini 라고합니다. 설정 파일은 mysql 의 설정을 위한 내용을 포함하는데요. mysql 을 구성하는 여러가지 요소들이 존재하기 때문에 각각의 구성요소 별로 설정이 가능합니다. 예를 들어, [client] default-character-set = utf8 socket=/var/run/mysqld/mysqld.sock [mysqld] bind-address = 0.0.0.0 soket = /var/mysql/mysql.sock port = 3306 위 예시는 client 와 mysqld 의 설정을 각 block 별로 적용합니다. ..