저번 글에 이어 Index Type에 대해 알아본다.
몇 가지 유형의 Index는 모든 행을 스캔하지 않고도
효율적인 방법을 제공하여 데이터 검색 속도를 높일 수 있다.
Clustered Index에서 이야기했듯이
일반적으로 PK를 기준으로 Clustered Index Table이 생성이 되고
Disk에서의 물리적인 순서 또한 PK를 기준으로 정렬되어 보관된다.
PK가 아닌 특정 컬럼을 기준으로
데이터를 필터링하거나 정렬하는 쿼리에 대해선
Secondary Index를 활용하는 것이 좋다.
Secondary Index는 테이블의
물리적인 순서는 건드리지 않고
테이블에서 특정 값의 주소값을 참조하는
Non-clustered Index 형태를 갖게 된다.
언제 사용해야 할까?
단점
2024년 Dev History
2023 Dev History에 이어
2024년에도 내가 어떤것에 관심을 갖고
어떤 공부를 했고 그로 인해 어떤 성장을 했는지 기록해두자.
Given a 2D integer array nums, return all elements of nums in diagonal order as shown in the below images.
You are given an array nums that consists of non-negative integers. Let us define rev(x) as the reverse of the non-negative integer x. For example, rev(123) = 321, and rev(120) = 21. A pair of indices (i, j) is nice if it satisfies all of the following conditions:
- 0 <= i < j < nums.length
- nums[i] + rev(nums[j]) == nums[j] + rev(nums[i])
Return the number of nice pairs of indices. Since that number can be too large, return it modulo 109 + 7.
1편에서는 DB와 Redis를 사용하여 MQ를 구현하는 방법에 대해 알아봤다.
DB와 Redis만으로도 충분히 MQ의 목적을 살릴 수 있지만
그보다 MQ에 특화된 솔루션인 RabbitMQ와 Kafka에 대해 알아보자.