@lotics/app-sdk 0.49.0 → 0.49.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/docs/queries.md +20 -11
  2. package/package.json +1 -1
package/docs/queries.md CHANGED
@@ -763,17 +763,26 @@ slice, and within it:
763
763
  layer** — `select`/`select_member`/`select_record_link` `has_any_of` / `has_all_of`, and
764
764
  `is_current_member`. These compile to containment the JSONB GIN index serves.
765
765
  - **Trigram-served:** `from_table.search` (§7).
766
- - **Partition scan (linear in table size):** everything else — text `contains`/`equals`,
767
- number and date range predicates, negations (`has_none_of`, `is_none_of`, `not_*`),
768
- emptiness, files predicates. Fine on thousands of rows; on very large tables these dominate
769
- latency and are the usual timeout cause.
770
-
771
- **Filter shape drives latency.** Lead with a GIN-served membership filter or `search` where you
772
- can; let the scan-shaped predicates refine the already-narrowed set. Derived-layer filters run
773
- over the subquery result (no index), so **filter at the source layer whenever the field exists
774
- there** the runtime filter is for caller-driven refinement, not for the main cut. (The engine
775
- pushes eligible filter-over-union predicates down automatically, but don't rely on that for
776
- other shapes.)
766
+ - **B-tree-served (automatic for deployed queries):** text `equals`, number and date
767
+ comparisons (exact and range), and `sort` fields — for fields referenced in a **deployed
768
+ named query's template**. The platform provisions a partial expression index per referenced
769
+ field automatically: built online on `app deploy` and `app query set`, re-synced daily,
770
+ capped at 8 per table (fields past the cap fall back to the scan tier, with a server WARN).
771
+ A `{{params.…}}` value hole doesn't change this the field key is static in the template,
772
+ so it still gets its index. Index-seek speed at any table size once provisioned.
773
+ - **Partition scan (linear in table size):** everything else text `contains`, negations
774
+ (`has_none_of`, `is_none_of`, `not_*`), emptiness, files predicates, and predicates/sorts on
775
+ fields that appear **only** in the runtime `filter`/`sort` options rather than the deployed
776
+ template. Fine on thousands of rows; on very large tables these dominate latency and are the
777
+ usual timeout cause.
778
+
779
+ **Filter shape drives latency.** Equality/range/sort predicates in the deployed template are
780
+ index-served; lead with those or a GIN-served membership filter / `search`, and let scan-shaped
781
+ predicates refine the already-narrowed set. Derived-layer filters run over the subquery result
782
+ (no index), so **filter at the source layer whenever the field exists there** — the runtime
783
+ filter is for caller-driven refinement, not for the main cut (a runtime-only field gets no
784
+ managed index). (The engine pushes eligible filter-over-union predicates down automatically,
785
+ but don't rely on that for other shapes.)
777
786
 
778
787
  ### The authoring rules
779
788
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.49.0",
3
+ "version": "0.49.1",
4
4
  "description": "Runtime SDK for Lotics custom-code apps — typed hooks, postMessage bridge, mount entry point",
5
5
  "type": "module",
6
6
  "exports": {