# CHANGELOG ## 1.0.3 * perf: **stripe-level min/max pruning for colcompress scans** — before reading any stripe, the scan aggregates the per-column min/max statistics from `engine.chunk` across all chunks of the stripe and tests the resulting stripe-wide ranges against the query's WHERE predicates using `predicate_refuted_by`. Any stripe whose range is provably disjoint from the predicate is skipped entirely — no decompression, no I/O. The pruned count is shown in `EXPLAIN`: ``` Engine Stripes Removed by Pruning: N ``` Pruning applies to both the serial scan path and the parallel DSM path (parallel workers only receive stripe IDs that survive the filter). Effectiveness scales directly with data sortedness; combine with `engine.colcompress_merge()` and the `orderby` table option to maximise it. ## 1.0.2 * fix: **index corruption during `COPY` into colcompress tables** — `engine_multi_insert` was calling `ExecInsertIndexTuples()` internally, while COPY's `CopyMultiInsertBufferFlush` also calls it after `table_multi_insert` returns. The double insertion corrupted every B-tree index on tables loaded via `COPY`. Fixed by removing all executor infrastructure from the per-tuple loop; index insertion is the caller's responsibility, matching `heap_multi_insert` semantics. * fix: **index corruption when `orderby` and indexes coexist** — when sort-on-write is active, `ColumnarWriteRow()` buffers rows and returns `COLUMNAR_FIRST_ROW_NUMBER` (= 1) as a placeholder for every row. The executor then indexed all rows with TID `(0,1)`, making every index lookup return the first row. Fixed in `engine_init_write_state()`: sort-on-write is disabled when the target relation has `relhasindex = true`. Tables with indexes already have fast key access; sort ordering is redundant and was silently lethal. * perf: fast `ANALYZE` via chunk-group stride sampling — samples at most `N / stride` chunk groups (`stride = max(1, nchunks / 300)`) instead of reading the entire table, making `ANALYZE` on large colcompress tables milliseconds instead of minutes. > **Migration note (1.0.1 → 1.0.2):** any colcompress table that has indexes > and was written with `COPY` or `colcompress_merge` using a prior version must > be rebuilt: `REINDEX TABLE CONCURRENTLY