U
U
user_of_toster2021-06-03 09:48:38
elasticsearch
user_of_toster, 2021-06-03 09:48:38

In what cases is Elastic inferior to relational databases?

I use postgres for storage, I want to connect elasticsearch for selections. I understand that you need to take measurements yourself, but first, while there is no data, I want to ask here.

Is it possible to replace all select queries from relational db to elastic? Are there cases where relational database lookups are better than ES lookups? Request example:

select * from products where id = 1;
select * from products where price > 100;
select * from products join rating on ..... where score > 100;
select * from products join rating left join users .... where score > 100 and is_liked_by_user = true order by price

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-06-03
@user_of_toster

In what sense "when search in relational DB is more optimal, than search in ES"? If the information in the RDBMS is homogeneous, the correct indexes are hung, and the DBMS itself is configured correctly, the search in it will usually be faster.
Elastic is by no means used as a "faster" replacement for an RDBMS. It is possible that the speed will indeed be higher in the case of multi-threaded fetches from several nodes at once (although in postgres you can implement approximately the same thing using partitioning / sharding), but in terms of resources it will be significantly more expensive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question