컬럼형 스토리지 / 분석
Oracle
-- Database In-Memory: keep the table in memory in columnar format
ALTER TABLE sale INMEMORY;
-- With priority and compression:
ALTER TABLE sale INMEMORY PRIORITY HIGH
MEMCOMPRESS FOR QUERY HIGH;Oracle Database In-Memory(12.1.0.2+)는 디스크의 행 형식을 유지하면서(dual format) 테이블을 메모리에 컬럼 형식(In-Memory Column Store, IM)으로 보관해 분석 쿼리 속도를 높인다. INMEMORY는 별도 라이선스 옵션이다. inmemory_size 파라미터가 IM 영역 크기를 지정한다.
PostgreSQL
-- Core PostgreSQL is row-based; columnar storage needs an extension:
-- Citus columnar access method:
CREATE EXTENSION IF NOT EXISTS citus;
CREATE TABLE sale_columnar (...) USING columnar;
-- Alternatives: the Hydra/cstore_fdw extensions.기본 PostgreSQL은 행 기반(heap) 스토리지만 제공한다. 컬럼형 스토리지에는 Citus 'columnar' 접근 방식(USING columnar), Hydra 또는 오래된 cstore_fdw 확장을 사용하며, 분석/데이터 웨어하우스 워크로드에 압축과 스캔 속도를 제공한다.
MySQL
-- Not applicable: core InnoDB does not offer columnar storage.
-- For analytics: MySQL HeatWave (cloud, in-memory columnar)
-- or integration with external ClickHouse/Apache Doris.표준 MySQL(InnoDB)은 행 기반이며 내장 columnstore가 없다. 분석 가속에는 MySQL HeatWave(Oracle Cloud의 인메모리 컬럼형 가속기)를 사용한다. 온프레미스에서는 보통 ClickHouse나 Apache Doris 같은 외부 컬럼형 엔진을 사용한다.
SQL Server
-- Clustered columnstore index (for analytic tables):
CREATE CLUSTERED COLUMNSTORE INDEX cci_sale ON dbo.sale;
-- Nonclustered columnstore on a rowstore table (HTAP):
CREATE NONCLUSTERED COLUMNSTORE INDEX ncci_sale
ON dbo.sale (city, product, amount, created_at);SQL Server columnstore 인덱스(2012에서 읽기 전용 nonclustered, 2014에서 갱신 가능한 clustered, 2016에서 갱신 가능한 nonclustered)는 데이터를 컬럼 단위로 높은 압축률로 저장하며, batch mode와 함께 집계/스캔 중심 분석 쿼리를 크게 가속한다. clustered는 데이터 웨어하우스에, nonclustered는 HTAP에 적합하다.
MongoDB
-- Not applicable: MongoDB is document (row-like) based.
-- For analytics: dedicated Analytics Nodes in Atlas
-- or export to a columnar format ($out)/an external engine.MongoDB는 문서를 행과 유사한 BSON으로 저장하며 내장 컬럼형(columnstore) 스토리지가 없다. 분석 워크로드에는 Atlas replica set의 전용 Analytics Node, Atlas Data Federation, 또는 컬럼형 시스템(예: Parquet)으로의 데이터 내보내기를 사용한다.
Redis
-- Not applicable: there is no concept of columnar storage.Redis는 인메모리 키-값 저장소이며 행/컬럼 스토리지 구분이 없다. 분석 집계는 Sorted Set, HyperLogLog(근사 집계), RedisTimeSeries 같은 특수 구조로 수행하며, 대규모 OLAP에는 적합하지 않다.
Elasticsearch
# doc_values: fields are stored column-wise on disk (enabled by default).
# Required for sorting/aggregation; active on non-text fields.
PUT sale
{ "mappings": { "properties":
{ "amount": { "type": "double", "doc_values": true } } } }정렬과 집계를 위해 Elasticsearch는 필드를 doc_values라는 디스크 기반 컬럼형 구조로 보관한다(numeric/keyword/date 필드에서 기본 활성화). 이 컬럼형 배치가 분석/aggregation 쿼리 속도를 높이며, text 필드에서는 기본적으로 비활성화되어 있다.