Skip to content

Commit 9d4f24f

Browse files
Update scalable-query-best-practices.md (#1426)
* Update scalable-query-best-practices.md Updating DIALECT 4 and 3 references. * Apply suggestions from code review --------- Co-authored-by: David Dougherty <david.dougherty@redis.com>
1 parent 679320f commit 9d4f24f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/develop/interact/search-and-query/best-practices/scalable-query-best-practices.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ Below are some basic steps to ensure good performance of the Redis Query Engine
3535
- Put only those fields used in your queries in the index.
3636
- 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" >}})
3737
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" >}}).
3939

4040
### Threaded (query performance factor or QPF) search
4141
- Put both query fields and any projected fields (`RETURN` or `LOAD`) in the index.
4242
- Set all fields to `SORTABLE`.
4343
- Set TAG fields to [UNF]({{< relref "/develop/interact/search-and-query/advanced-concepts/sorting#normalization-unf-option" >}}).
4444
- 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" >}}).
4646

4747
## Query optimization
4848

@@ -140,11 +140,11 @@ The following query is better suited for vertical scaling:
140140
FT.AGGREGATE jsonidx:profiles '@t:[1299 1299]'
141141
LOAD 6 id t name lastname loc ver
142142
LIMIT 0 10
143-
DIALECT 3
143+
DIALECT 2
144144
```
145145

146146
Improvements:
147147

148148
- Targeted projection: the `LOAD` clause specifies only essential fields (`id, t, name, lastname, loc, ver`), reducing memory and network overhead.
149149
- 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

Comments
 (0)