Lets say that I was providing a service to customers that requires
customers to sign up to use my service. I'm also using elasticsearch to
store analytics data about each customer.
The number of documents recorded for each customer is completely arbitrary
(some customers may have 1million + documents, some may have less than
1000).
Which solution would be better?
Give each customer their own index
Put all customer's data into a single index
Argument for solution #1: In my personal tests, I can see that if I have
1million documents in index A, and 1000 documents in index B, then queries
run on index B aren't being slowed down by the amount of documents in index
A. However, when I put them all into the same index and separate them by a
unique key, then index B's queries are slowed down by the number of
documents in index A.
*Argument for solution #2: *I've only heard that having an arbitrary number
of indicies is bad for performance in the long term.
Lets say that I was providing a service to customers that requires
customers to sign up to use my service. I'm also using elasticsearch to
store analytics data about each customer.
The number of documents recorded for each customer is completely arbitrary
(some customers may have 1million + documents, some may have less than
1000).
Which solution would be better?
Give each customer their own index
Put all customer's data into a single index
Argument for solution #1: In my personal tests, I can see that if I
have 1million documents in index A, and 1000 documents in index B, then
queries run on index B aren't being slowed down by the amount of documents
in index A. However, when I put them all into the same index and separate
them by a unique key, then index B's queries are slowed down by the number
of documents in index A.
*Argument for solution #2: *I've only heard that having an arbitrary
number of indicies is bad for performance in the long term.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.