Skip to content

Docs: FACETS DISTINCT/STATS/HIERARCHY/AFTER, facet.searchValues and GROUP BY acceleration #526

Open

Description

@robfrank

Document the columnar faceting features delivered by ArcadeDB PRs #11338 to #11346 (umbrella ArcadeData/arcadedb#10355, release 26.12.1). Source material: docs/superpowers/specs/2026-10-18-columnar-faceting-design.md (the design, the syntax in section 8) and docs/superpowers/plans/2026-10-19-columnar-faceting-0-roadmap.md (limits, costs, open items) in the ArcadeDB repository. Style: American English, uppercase SQL.

1. The index

  • CREATE INDEX ON Type (prop) COLUMNAR, BY ITEM for multi-valued properties, dropping it, and which property types are supported.
  • What it costs: writes on a type with a COLUMNAR index are about +6% (inserts) and +10% (updates) in wall time against the same workload without it, no cost for other types, no per-index off switch (drop the index).
  • The projection is updated in the background and lives in a columnar/ directory next to the database files. Say what happens on backup and restore, export and import, a snapshot install and an unclean shutdown (the projection is rebuilt or re-applied by itself; facets stay exact meanwhile).

2. The FACETS clause

  • Syntax and every facet kind: TERMS (TOP, MIN_COUNT, ORDER BY, FILTER, INCLUDE, AFTER paging, MISSING on the last page), RANGES, HISTOGRAM (numeric and calendar with a time zone), HIERARCHY (cycles and self-parents are tolerated), DISTINCT (exact by default, HyperLogLog above PRECISION n, about 0.81% standard error, strings stay exact, exact says which), STATS (SQL sum()/avg() typing, float sums may differ in the last bits).
  • FACETS goes before LIMIT; with FACETS the planner turns LIMIT pushdown off, so the facets always count every match, and a capped query (LIMIT 1) still pays for the full facet pass (bounded by the statement TIMEOUT and the memory budget).
  • facet.searchValues('Type', 'property', 'prefix', limit): string columns only.
  • The 13 new keywords are also valid identifiers.

3. The answer

  • The facets object: meta (exact, patched, lagMs) and one member per alias with type, source (index, scan, unavailable), optional reason, buckets, otherCount, missing. List the unavailable and fallback reasons and what each means for the caller.
  • Exactness: the projection lags the commits, and the answer is patched at read time. What lagMs and patched tell you.
  • Where it shows: HTTP JSON and ndjson, OpenAPI, gRPC (unary and CURSOR; PAGED streams refuse FACETS), RemoteDatabase and RemoteGrpcDatabase, EXPLAIN and PROFILE. Python: Columnar faceting: Python support for COLUMNAR and FACETS arcadedb-python#289.

4. Behavior and security

  • Bucket-level access: a restricted user's facets, distinct counts and PROFILE figures never include a bucket they cannot read. There is no property or record masking in ArcadeDB.
  • Types with BEFORE READ or AFTER READ triggers or listeners are answered by a scan, not from the projection, bounded by arcadedb.columnar.maxFallbackScans.
  • High availability: every node maintains its own projection (followers learn pages, not records); behavior after a leader change and after a snapshot install.

5. Settings (arcadedb.columnar.*)

Reference table with default, scope and meaning: topMax (1000), queryMemoryBudget (256 MB per JVM), queryBudgetWait, parallelCountTasks (4), parallelMinMatches, maxFallbackScans, groupByAcceleration (true), applyInterval, applyMaxLag, applyThreads, maintenanceThreads, rebuildConcurrency, flushInterval, flushMinRows, flushMaxRows, flushMaxAge, mergeDeadRatio, mergeMaxSegments, maxCardinality, segmentBlockRows, dictionaryCompactRatio, patchBudget, patchBudgetRatio. Say which ones rarely need tuning. A histogram is capped at 100,000 buckets.

6. GROUP BY acceleration

Eligibility rules, that it is on by default for types with a COLUMNAR index, the kill switch arcadedb.columnar.groupByAcceleration, and that MIN/MAX of a DOUBLE or FLOAT group (and the STATS facet) may return 0.0 where a plain scan returns -0.0.

7. Operations

Add a short migration note to the upgrade page: no change for existing queries, new on-disk directory only for databases that create a COLUMNAR index.

Activity

  1. self-assigned this
    on Nov 6, 2026
  2. added
    documentation
    on Nov 6, 2026
  3. added 3 commits that reference this issue on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions