Bible, Lee, Data
Faith, software, data, and everyday life.
indexAll posts
How to Read SQL Execution Plans with EXPLAIN
When a SQL query is slow, the first instinct is often to add an index.That may solve the problem, but it may also miss the real cause. The query might already have a usable index that the optimizer decided not to use. The join order may be inefficient, the optimizer may have estimated the wrong number of rows, or the database may be sorting a large intermediate result.Consider the following quer..
Database Indexes and SQL Execution Plans
Suppose we have the following orders table:CREATE TABLE orders ( order_id BIGINT PRIMARY KEY, customer_id BIGINT NOT NULL, order_status VARCHAR(20) NOT NULL, ordered_at DATETIME NOT NULL, total_amount BIGINT NOT NULL);When the table contains only a few hundred rows, the following query returns almost immediately:SELECT *FROM ordersWHERE customer_id = 1001;The situation changes whe..
[AWS] 매핑 (Mapping): 자료형, 비교 연산자, 키바나 시각화
🌿매핑 (Mapping) PUT { "mapping": { "properties": { "": { "type": "", } } } } 위의 방법으로 인덱스에 대한 매핑을 적용할 수 있다. 이때, 한 번 만들어진 매핑은 수정이 불가능하다. 필드명을 중복하면 똑같은 이름의 컬럼을 만드는 것이 되기 때문에 중복될 수 없다. 매핑 정보를 수정해야 한다면 인덱스를 삭제하고 다시 인덱스를 생성하는 것을 권장한다. 기본 설정 $ sudo systemctl start 패키지명 $ sudo systemctl stop 패키지명 $ sudo systemctl status 패키지명 $ sudo systemctl restart 패키지명 http://localhost:9200 > elasticsearch http://localh..
[AWS] 데이터 색인 (Index): 역인덱스, 애널라이저, 형태소 분석기(Snowball, Nori)
🌿데이터 색인 Elasticsearch는 Oracle보다 훨씬 더 많은 양의 데이터를 검색한다. Elasticsearch는 데이터를 저장할 때 색인을 거쳐서 저장이 된다는 특징이 있다. Full Text Search [AWS] Elasticsearch 검색: Multitenancy, Full Text Search, QueryDSL 🌿Elasticsearch 검색 Elasticsearch는 관계형 데이터베이스에 비해 다양하고 효과적인 검색 기능을 제공한다. 가장 주된 특징은 풀 텍스트 검색(Full Text Search)을 지원한다는 점이다. 누군가 Elasticsearch isaac-christian.tistory.com 앞서 사용할 Elasticsearch 검색 방법은 위 글을 참고한다. Elastic..