AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Surrealql Performance

skill-surrealdb-agent-skills-surrealql-performance · by surrealdb

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, perfo…

No reviews yet
0 installs
3 views
0.0% view→install

Install

$ agentstack add skill-surrealdb-agent-skills-surrealql-performance

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-surrealdb-agent-skills-surrealql-performance)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Surrealql Performance? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.