This document discusses query processing and outlines several models including query plan, iterator model, materialization model, and vectorization model which are approaches used to process queries in a database.
The document discusses concurrency control techniques for indexes including locks versus latches, latch modes, latch crabbing/coupling, examples of using latches for DELETE and INSERT operations, and a better latching algorithm.
This document discusses query processing and outlines several models including query plan, iterator model, materialization model, and vectorization model which are approaches used to process queries in a database.
The document discusses concurrency control techniques for indexes including locks versus latches, latch modes, latch crabbing/coupling, examples of using latches for DELETE and INSERT operations, and a better latching algorithm.
Breadth first search is a technique for exploring all neighboring nodes of a graph before moving to nodes farther away. It begins by exploring all nodes connected to the starting node by a single edge, then all nodes that are two edges away, and so on layer by layer until no new nodes can be added. The numbers in the document represent a graph being explored using breadth first search, with nodes being visited in order of their distance from the starting point.
Breadth first search is a technique for exploring all neighboring nodes of a graph before moving to nodes farther away. It begins by exploring all nodes connected to the starting node by a single edge, then all nodes that are two edges away, and so on layer by layer until no new nodes can be added. The numbers in the document represent a graph being explored using breadth first search, with nodes being visited in order of their distance from the starting point.
2. Access Method - Sequential Scan
• 각 테이블의 페이지마다…
• Buffer Pool 로 가져와 데이터를 탐색
• 각 튜플을 반복(Iterate)해가면서 해당 튜플이 필요(?)한지를 판단
• DBMS 가 쿼리를 실행시키는 상황에서 거의 항상 최악의 경우
• 몇가지 Optimization
3. Optimization - Zone Maps
• 각 페이지마다 속성 값을 미리 계산해놓는다.
• DBMS 는 쿼리 실행에 해당 페이지의 엑세스가 필요한지를 우선 zone map 을 확인하여 결정한다.
• 원래 데이터를 가진 페이지와 분리된 다른 페이지에 저장하며, 저장되는 데이터의 크기가 작기 때문에 하나의
Zone map 페이지에 여러 페이지의 결과 데이터를 저장한다.
5. Multi-Index Scan
만약 DBMS 가 쿼리를 위해 사용할 수 있는 다중 Index 가 있다면
• 각각의 매칭되는 인덱스를 이용해 Record ID 의 셋을 계산한다.
• 쿼리의 기술에 기초해 위의 셋을 결합시킨다(union vs. intersect).
• 결합된 레코드를 탐색한 다음 남은 과정을 진행한다.
6. Index Scan Page Sorting
인덱스는 ID 에 대해 순서가 정해져 있지 않다.
따라서 인덱스 스캔으로 가져온
Record ID 셋으로 튜플 스캔을 진행할 때,
페이지 fetch 에 있어 효율적이지 못할 수 있다