You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/operate/oss_and_stack/stack-with-enterprise/search/scalable-query-best-practices.md
+112-5Lines changed: 112 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ linkTitle: Best practices for scalable Redis Query Engine
10
10
weight: 25
11
11
---
12
12
13
-
[Vertical scaling of Redis Query Engine]({{<relref "/operate/oss_and_stack/stack-with-enterprise/search/query-performance-factor">}}) requires configuring query performance factors. With careful crafting of search indices and queries, query performance factors allow throughput scaling up to 16X. The following recommendations help queries avoid accessing the keyspace and enable Redis Query Engine to benefit from additional CPUs allocated by query performance factors.
13
+
[Vertical scaling of Redis Query Engine]({{<relref "/operate/oss_and_stack/stack-with-enterprise/search/query-performance-factor">}}) requires configuring query performance factors. With careful crafting of search indexes and queries, query performance factors allow throughput scaling up to 16X. The following recommendations can help optimize your indexes and queries to maximize the performance benefits from additional CPUs allocated by query performance factors.
14
14
15
15
## Best candidates for query performance factor improvements
- Document subsets that are indexed in their [non-normalized]({{<relref "/develop/ai/search-and-query/advanced-concepts/sorting#normalization-unf-option">}}) form
30
34
31
-
## Indexing best practices
35
+
## Best practices
36
+
37
+
If query performance factors have not boosted the performance of your queries as much as expected:
38
+
39
+
1. Verify your index includes all queried and returned fields.
40
+
41
+
1. Identify and avoid query [anti-patterns]({{<relref "/develop/ai/search-and-query/best-practices/scalable-query-best-practices#anti-patterns">}}) that limit scalability.
42
+
43
+
1. Follow best practices to [improve indexing](#improve-indexing).
44
+
45
+
1. Follow best practices to [improve queries](#improve-queries).
46
+
47
+
### Improve indexing
32
48
33
49
Follow these best practices for [indexing]({{<relref "/develop/ai/search-and-query/indexing">}}):
34
50
@@ -40,9 +56,9 @@ Follow these best practices for [indexing]({{<relref "/develop/ai/search-and-que
40
56
41
57
- Use the `NOSTEM` option for `TEXT` fields.
42
58
43
-
##Query best practices
59
+
### Improve queries
44
60
45
-
Follow these best practices for[queries]({{<relref "/develop/ai/search-and-query/query">}}):
61
+
Follow these best practices to optimize[queries]({{<relref "/develop/ai/search-and-query/query">}}):
46
62
47
63
- Specify the result set fields in the `RETURN` or `LOAD` clauses and include them in the index definition. Don’t just return the default result set from [`FT.SEARCH`]({{< relref "commands/ft.search/" >}}) or `LOAD *` from [`FT.AGGREGATE`]({{< relref "commands/ft.aggregate/" >}}).
The following benchmarks show the performance improvements for different query types achieved with query performance factors. Vector, tag, and text queries strongly benefit, while numeric and geographic queries show more limited improvements.
0 commit comments