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/develop/interact/search-and-query/best-practices/scalable-query-best-practices.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -35,14 +35,14 @@ Below are some basic steps to ensure good performance of the Redis Query Engine
35
35
- Put only those fields used in your queries in the index.
36
36
- Only make fields [`SORTABLE`]({{< relref "/develop/interact/search-and-query/advanced-concepts/sorting" >}}) if they are used in [`SORTBY`]({{< relref "/develop/interact/search-and-query/advanced-concepts/sorting#specifying-sortby" >}})
37
37
queries.
38
-
- Use [`DIALECT 4`]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects#dialect-4" >}}).
38
+
- Use [`DIALECT 2`]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects#dialect-2" >}}).
39
39
40
40
### Threaded (query performance factor or QPF) search
41
41
- Put both query fields and any projected fields (`RETURN` or `LOAD`) in the index.
42
42
- Set all fields to `SORTABLE`.
43
43
- Set TAG fields to [UNF]({{< relref "/develop/interact/search-and-query/advanced-concepts/sorting#normalization-unf-option" >}}).
44
44
- Optional: Set `TEXT` fields to `NOSTEM` if the use case will support it.
45
-
- Use [`DIALECT 4`]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects#dialect-4" >}}).
45
+
- Use [`DIALECT 2`]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects#dialect-2" >}}).
46
46
47
47
## Query optimization
48
48
@@ -140,11 +140,11 @@ The following query is better suited for vertical scaling:
140
140
FT.AGGREGATE jsonidx:profiles '@t:[1299 1299]'
141
141
LOAD 6 id t name lastname loc ver
142
142
LIMIT 0 10
143
-
DIALECT 3
143
+
DIALECT 2
144
144
```
145
145
146
146
Improvements:
147
147
148
148
- Targeted projection: the `LOAD` clause specifies only essential fields (`id, t, name, lastname, loc, ver`), reducing memory and network overhead.
149
149
- Limited results: the `LIMIT` clause ensures the query retrieves only the first 10 results, avoiding large result sets.
150
-
-[`DIALECT 3`]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects#dialect-3" >}}): enables the latest RQE syntax and features, ensuring compatibility with modern capabilities.
150
+
-[`DIALECT 2`]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects#dialect-2" >}}): enables the latest RQE syntax and features, ensuring compatibility with modern capabilities.
0 commit comments