Umair
Umair

Reputation: 469

Elastic Search DSL vs SQL performance

I am using elastic search and came to know that we can also use SQL syntax as well in Elastic. Is querying through SQL access API or querying through DSL have any differences, which is faster in searching?

Upvotes: 3

Views: 1487

Answers (1)

Val
Val

Reputation: 217284

According to an article published when the SQL client came out (see "Implementation Internals"), the SQL query is running in different phases, but at some point it is transformed to a DSL query.

So, going the SQL way can be seen as adding a very thin layer on top of the DSL one. It is safe to admit that this layer doesn't add any significant latency to the query, at least it has not yet been demonstrated, but your mileage may vary.

Always best to try for yourself and test.

Upvotes: 6

Related Questions