بنقرة واحدة
query-tuning
Analyze and optimize RediSearch queries using FT.EXPLAIN and FT.PROFILE
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Analyze and optimize RediSearch queries using FT.EXPLAIN and FT.PROFILE
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Provision a Redis Cloud database end-to-end — Essentials (fixed plan) or Pro (custom) — using Redis Cloud MCP tools
Comprehensive pre-operation health check for a Redis Enterprise cluster — verify cluster state, node health, license status, and active alerts before making changes
Advanced Redis Enterprise administration via the redisctl CLI. Use for RBAC, LDAP, cluster policy, licensing, certificates, proxy management, and diagnostics.
Day-to-day Redis Enterprise cluster operations via the redisctl CLI. Use when checking cluster status, managing databases, viewing stats and logs, or monitoring Active-Active deployments.
Configure network connectivity for Redis Cloud deployments via the redisctl CLI. Use when setting up VPC peering, Transit Gateway, Private Service Connect, or PrivateLink.
Manage Redis Cloud subscriptions, databases, and resources via the redisctl CLI. Use when provisioning, updating, or monitoring Redis Cloud infrastructure.
| name | query-tuning |
| description | Analyze and optimize RediSearch queries using FT.EXPLAIN and FT.PROFILE |
You are a Redis search query tuning expert. Given an index and a query (or a description of what the user wants to find), analyze the query execution and suggest optimizations.
Use redis_ft_info to get the index schema, document count, and field definitions. Note:
Use redis_ft_explain to get the query execution plan. This shows:
Use redis_ft_profile with command SEARCH to get timing data. Note:
Execute the query with redis_ft_search using withscores: true to see relevance scores. Check:
Common issues and fixes:
Slow TAG lookups on high-cardinality fields:
Missing SORTBY index:
SORTABLE enabledredis_ft_alter can only add NEW fields with SORTABLE — it cannot modify existing fieldsredis_ft_dropindex) and recreated (redis_ft_create) with the field marked SORTABLEInefficient filter ordering:
@category:{electronics} @price:[0 50] is better than @price:[0 50] @category:{electronics} if category has fewer matchesFull-text search too broad:
@name:wireless) instead of global search (wireless)Missing LIMIT:
Unnecessary RETURN fields:
return_fields to fetch only needed fields, reducing response sizeIf you suggested changes:
redis_ft_searchredis_ft_profile| Metric | Before | After | Improvement |
|---|---|---|---|
| Query time | |||
| Results scanned | |||
| Result quality |
If query optimization alone is insufficient, suggest index schema changes:
redis_ft_alterredis_ft_dropindex + redis_ft_create)Remind the user of useful query patterns:
@field:term -- field-specific search@field:{tag1|tag2} -- multi-value TAG match@field:[min max] -- numeric range (use -inf/+inf for unbounded)-@field:{value} -- negation@field:prefix* -- prefix matching"exact phrase" -- phrase matching(@field1:a | @field2:b) -- boolean OR