some index
data 10G
, execute the following query frequently,
{
"aggs": {
"sold": {
"sum": {
"field": "sold"
}
},
"category": {
"terms": {
"field": "cat",
"size": 100,
"execution_hint": "map"
}
}
},
"sort": [
...
],
"query": {
...
}
}
sold
is the total sales volume of products that meet the query
criteria
category
is the category to which the products that meet the query
criteria are listed
but the above query is very slow. If you only use query
to query the product, the time will be between 8s-15s
, but if you add aggs
, the time will soar to more than 50s
, which can no longer be used normally.
10G
volume, and the number of records is only 1300W
. Is it large in the data for es
?
query
conditions are mostly interval queries, such as price range, sales volume range, query time has reached 10s
, is it normal?
above query+aggs
query, aggs
is there room for optimization?