Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Monitoring Elasticsearch

You're reading from  Monitoring Elasticsearch

Product type Book
Published in Jul 2016
Publisher Packt
ISBN-13 9781784397807
Pages 180 pages
Edition 1st Edition
Languages
Authors (3):
Dan Noble Dan Noble
Profile icon Dan Noble
Pulkit Agrawal Pulkit Agrawal
Mahmoud Lababidi Mahmoud Lababidi
View More author details

Improving query performance


This section highlights common reasons behind certain slow queries on Elasticsearch, and offers instruction to improve performance.

High-cardinality fields

As previously mentioned, running aggregation or sorts against high-cardinality fields (for example, dates precise to the millisecond) can fill up the fielddata cache which leads to OutOfMemoryError exceptions. However, even without these errors, running aggregations and sorts can be detrimental to performance. When it comes to dates, it's generally a good idea to store and use less precise dates in order to speed up query execution time.

Querying smaller indices

As Elasticsearch indices grow larger, query performance will suffer. Another way to improve performance is to run queries against small indices. You can do this by storing our data in several smaller indices instead of one large one.

For example, with Twitter data, you can change the ingestion process to create a new index every day to store tweets. This...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}