surrealql-performance
/surrealql-performance
Przyspiesza zapytania SurrealDB przez projekt identyfikatorów rekordów, dobór indeksów i pola wyliczane, sprawdzane przez EXPLAIN.
- Autor
- surrealdb ↗
- Repozytorium
- agent-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 29.09.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 4
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 29.09.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Przyspiesza zapytania SurrealDB przez projekt identyfikatorów rekordów, dobór indeksów i pola wyliczane, sprawdzane przez EXPLAIN.
Oryginalny opis (EN)
Optimize SurrealDB performance through record ID and key design, indexing strategy, and computed/derived fields. Use when queries are slow, when designing record IDs for locality and range scans, choosing between standard/unique/full-text/vector indexes, verifying index usage with EXPLAIN, or deciding whether to precompute values with computed fields, views, or events. Triggers: slow query, performance, record id design, range scan, DEFINE INDEX, EXPLAIN, computed field, FUTURE, DEFINE TABLE AS SELECT.
Jak działa
- When to use this skill
- Topic map
- Top rules
Podgląd SKILL.md
--- name: surrealql-performance description: "Optimize SurrealDB performance through record ID and key design, indexing strategy, and computed/derived fields. Use when queries are slow, when designing record IDs for locality and range scans, choosing between standard/unique/full-text/vector indexes, verifying index usage with EXPLAIN, or deciding whether to precompute values with computed fields, views, or events. Triggers: slow query, performance, record id design, range scan, DEFINE INDEX, EXPLAIN, computed field, FUTURE, DEFINE TABLE AS SELECT." metadata: author: surrealdb version: "0.1.0" --- # SurrealQL Performance Techniques for making SurrealDB queries fast: structuring record IDs and keys for data locality, choosing and verifying the right indexes, and precomputing values with computed fields and views instead of recomputing them on every read. Target the **latest** stable SurrealDB release. Confirm version-sensitive syntax (record ranges, `COMPUTED` fields, `FULLTEXT` index options) against `https://surrealdb.com/docs`, and validate examples with `surreal validate`. See the `surrealql` skill for version detection. ## When to use this skill - A query is slow or scans more records than expected - Designing record IDs to support efficient lookups and range scans - Choosing between standard, `UNIQUE`, full-text `SEARCH`, or vector indexes - Confirming whether an index is actually used (`EXPLAIN`) - Deciding whether to store a derived value vs. compute it on read ## Topic map | Topic | Reference | | --- | --- | | Record ID & key structuring for locality and range scans | [references/keys.md](references/keys.md) | | Index types, composite order, verifying usage, rebuild cost | [references/indexing.md](references/indexing.md) | | Computed fields, precomputed views, event-maintained values | [references/computed-fields.md](references/computed-fields.md) | ## Top rules - **Design IDs for access patterns.** Record IDs are stored in sorted order. Put the most selective, range-friendly component first (e.g. `weather:['London', d'2025-02-13T05:00Z']`) so related records sit together and range queries avoid full-table scans. See [references/keys.md](references/keys.md). - **Prefer record ranges over `WHERE` on the ID.** `SELECT * FROM person:1..1000` uses key ordering directly; filtering with `WHERE` after a full scan does not. - **Index the fields you filter, sort, or join on — but no more.** Every index adds write cost. Order composite index fields from most to least selective and to match your query's filter/sort order. See [references/indexing.md](references/indexing.md). - **Verify, don't assume.** Run `EXPLAIN` (or `EXPLAIN FULL`) to confirm a query uses the index you expect before concluding it is optimized. - **Precompute expensive, read-heavy values.** Use computed fields, a `DEFINE TABLE ... AS SELECT` view, or a `DEFINE EVENT` to maintain derived data rather than recomputing aggregates on every query. See [references/computed-fields.md](references/computed-fields.md). - **Use bound parameters.** Parameterized queries are safer and let the engine reuse query plans.
Pliki w paczce (4)
- SKILL.md 3 KB
- references/computed-fields.md 3 KB
- references/indexing.md 3 KB
- references/keys.md 3 KB
Wersje
W bazie nie ma innych skilli o nazwie surrealql-performance.
Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki bf44ef2503d5 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100surrealql
Pisze i poprawia zapytania SurrealQL: obsługę rekordów, schematy, relacje grafowe i zapytania na żywo. - 100surrealdb
Pomaga w SurrealDB 3: modelowanie danych, zapytania SurrealQL, grafy, wektory, uprawnienia, wdrożenia i integracje SDK. - 100surrealql-functions
Wyszukuje wbudowane funkcje SurrealQL i ich dokładne sygnatury dla zainstalowanej wersji, korzystając z serwera LSP i gramatyki. - 100sql-optimization-patterns
Przyspiesza wolne zapytania PostgreSQL przez EXPLAIN ANALYZE, strategię indeksów, eliminację N+1 i widoki zmaterializowane. - 100postgresql-indexing
Prowadzi indeksowanie PostgreSQL w Prowler: projekt indeksów, indeksy częściowe, tabele partycjonowane, weryfikacja przez EXPLAIN ANALYZE, operacje współbieżne, monitoring i utrzymanie. - 100sql-optimizer
Analizuje zapytania SQL pod kątem brakujących indeksów, wzorca N+1, słabych złączeń i pełnych skanów tabel.