Skip to content

ESQL: improve performance - Merge functions into loaders (sometimes)Β #103636

@nik9000

Description

@nik9000

Description

Sometimes it'd be much more efficient to "fuse" a function into the loading of a field rather than load the whole field and apply the function. Take, for example, MV_MIN:

FROM foo | EVAL f = MV_MIN(f) | STATS SUM(f)

This'd be faster because:

  1. Numeric doc values are stored in sorted order. Instead of loading them all we could just get the first one.
  2. Instead of making a Block and then running the MV_MIN implementation to turn it into a Vector, we could save the block allocations entirely.

There are likely a bunch of cases that could benefit slightly from this, but things like SUBSTRING and MV_MIN and MV_MAX feel like they'd get the most benefit right now because they'd save on allocations.

But the real killer use case is for when we implement geo_shape style points, specifically, we'll end up with a function to simplify the geometry

CC @iverase and @craigtaverner and @costin

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions