Hi,
We are using Redis Enterprise Cloud, and switching to FT.AGGREGATE from FT.SEARCH has introduced significant performance problems - our instance is using Redis 5.0.4/ Redisearch 1.4.6.
Here is a query that takes 3 seconds to return:
“FT.AGGREGATE” “trips_hash_index” “(@VisibleToCompanyIDs:{2}) (@TripMainTypeID:{6|4|1|3|2}) (@TripStatusID:{1|5|4|6|3})” “SORTBY” “8” “@CreatedDateTimeUTC” “DESC” “@TripStartDate” “ASC” “@TripEndDate” “ASC” “@TripID” “DESC” “LIMIT” “0” “10”
``
with FT.SEARCH it is quite quick:
“FT.SEARCH” “trips_hash_index” “(@VisibleToCompanyIDs:{2}) (@TripMainTypeID:{6|4|1|3|2}) (@TripStatusID:{1|5|4|6|3})” “SORTBY” “TripID” “DESC” “LIMIT” “0” “10”
``
And here is what the index looks like:
ft.info trips_hash_index
-
index_name
-
“trips_hash_index”
-
fields
-
-
- PrimaryKey
-
-
type
-
TEXT
-
WEIGHT
-
“1”
-
SORTABLE
-
- TripID
-
type
-
NUMERIC
-
SORTABLE
-
- UserID
-
type
-
TAG
-
SEPARATOR
-
,
-
- TripDescription
-
type
-
TEXT
-
WEIGHT
-
“1”
-
- TripStartDate
-
type
-
NUMERIC
-
SORTABLE
-
- TripEndDate
-
type
-
NUMERIC
-
SORTABLE
-
- TripTypeID
-
type
-
TAG
-
SEPARATOR
-
,
-
- TripMainTypeID
-
type
-
TAG
-
SEPARATOR
-
,
-
- TripStatusID
-
type
-
TAG
-
SEPARATOR
-
,
-
- CreatedDateTimeUTC
-
type
-
NUMERIC
-
SORTABLE
-
- VisibleToCompanyIDs
-
type
-
TAG
-
SEPARATOR
-
,
-
- ParentTripID
-
type
-
TAG
-
SEPARATOR
-
,
-
- Supplier
-
type
-
TAG
-
SEPARATOR
-
,
-
- TripCarrierTypeID
-
type
-
TAG
-
SEPARATOR
-
,
-
- ClientIDs
-
type
-
TAG
-
SEPARATOR
-
,
-
index_options
-
- “NOOFFSETS”
-
gc_stats
-
- current_hz
-
“3.0289804935455322”
-
bytes_collected
-
(integer) 68723
-
effectiv_cycles_rate
-
“0.036071268224674498”
-
cursor_stats
-
- global_idle
-
(integer) 0
-
global_total
-
(integer) 0
-
index_capacity
-
(integer) 128
-
index_total
-
(integer) 0
-
num_docs
-
(integer) 599715
-
max_doc_id
-
(integer) 600432
-
num_terms
-
(integer) 878752
-
num_records
-
(integer) 4937876
-
inverted_sz_mb
-
“4.6262814823090749e+18”
-
offset_vectors_sz_mb
-
“0”
-
doc_table_size_mb
-
“4.6329217579703337e+18”
-
key_table_size_mb
-
“4.6255695592675082e+18”
-
records_per_doc_avg
-
“8.2337043428962087”
-
bytes_per_record_avg
-
“4.2159641108849231”
-
offsets_per_term_avg
-
“0”
-
offset_bits_per_record_avg
-
“nan”
``
Any thoughts on what the problem might be?
Thanks!