Created
January 2, 2024 20:05
-
-
Save nik9000/bfd78dfa81e86db4b6e11d6450ba7867 to your computer and use it in GitHub Desktop.
no data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '{ | |
"settings": { | |
"mapping.total_fields.limit": 10000, | |
"number_of_shards": 10, | |
"number_of_replicas": 0 | |
}, | |
"mappings": { | |
"properties": { | |
"f00000": {"type": "long"}' > /tmp/idx | |
for f in {1..9999}; do printf ', | |
"f%04d": {"type": "long"}' $f >> /tmp/idx; | |
done | |
echo ' | |
} | |
} | |
}' >> /tmp/idx | |
for i in {0..99}; do | |
printf "%02d: " $i; | |
curl -XDELETE -uelastic:password localhost:9200/$(printf "idx%02d" $i); | |
curl -XPUT -HContent-Type:application/json -uelastic:password localhost:9200/$(printf "idx%02d" $i) -d @/tmp/idx; | |
echo; | |
done | |
while true; do | |
time curl -XPOST -uelastic:password -HContent-Type:application/json localhost:9200/_query -d'{ | |
"query": "FROM *" | |
}' | |
done | |
# Before: | |
# [2024-01-02T14:43:40,607][INFO ][o.e.x.e.a.RestEsqlQueryAction] [runTask-0] Beginning execution of ESQL query. | |
# Query string: [FROM *] | |
# [2024-01-02T14:43:41,446][INFO ][o.e.x.e.a.EsqlResponseListener] [runTask-0] Failed execution of ESQL query. | |
# Query string: [FROM *] | |
# Execution time: [839]ms | |
# After: | |
# [2024-01-02T14:35:55,945][INFO ][o.e.x.e.a.RestEsqlQueryAction] [runTask-0] Beginning execution of ESQL query. | |
# Query string: [FROM *] | |
# [2024-01-02T14:35:56,085][INFO ][o.e.x.e.a.EsqlResponseListener] [runTask-0] Finished execution of ESQL query. | |
# Query string: [FROM *] | |
# Execution time: [140]ms | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment