elasticsearch icon indicating copy to clipboard operation
elasticsearch copied to clipboard

SQL: Set track_total_hits to false when not needed

Open luigidellaquila opened this issue 3 years ago • 2 comments

track_total_hits has some performance cost, that in many cases can be avoided.

This PR sets track_total_hits=false in all cases where the execution plan did not explicitly declare that track_total_hits is needed.

Fixes #88764

luigidellaquila avatar Aug 04 '22 09:08 luigidellaquila

Hi @luigidellaquila, I've created a changelog YAML for you.

elasticsearchmachine avatar Aug 04 '22 09:08 elasticsearchmachine

Pinging @elastic/es-ql (Team:QL)

elasticsearchmachine avatar Aug 08 '22 11:08 elasticsearchmachine

@elasticmachine update branch

luigidellaquila avatar Aug 22 '22 09:08 luigidellaquila

@luigidellaquila according to this PR's labels, I need to update the changelog YAML, but I can't because the PR is closed. Please either update the changelog yourself on the appropriate branch, or adjust the labels. Specifically:

  • The PR is labelled release highlight but the changelog has no highlight section

elasticsearchmachine avatar Aug 26 '22 09:08 elasticsearchmachine

I added the release highlight label based on the speedup we observed in nightly benchmarks with this change: https://elasticsearch-benchmarks.elastic.co/index.html#tracks/sql/nightly/default/30d

jpountz avatar Aug 26 '22 09:08 jpountz