Skip to content

Commit dc3cb7c

Browse files
committed
updates
1 parent 2ad2296 commit dc3cb7c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/reference/query-languages/esql/esql-commands.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,10 @@ If multiple documents in the lookup index match a single row in your results, th
702702

703703
**Examples**
704704

705+
::::{tip}
706+
In case of name collisions, the newly created columns will override existing columns.
707+
::::
708+
705709
**IP Threat correlation**: This query would allow you to see if any source IPs match known malicious addresses.
706710

707711
```esql
@@ -724,10 +728,18 @@ FROM app_logs
724728
| LOOKUP JOIN service_owners ON service_id
725729
```
726730

727-
In case of name collisions, the newly created columns will override existing columns.
731+
`LOOKUP JOIN` is generally faster when there are fewer rows to join with. ES|QL will try and perform any `WHERE` clause before the `LOOKUP JOIN` where possible. The first example below has the `WHERE` clause before the `LOOKUP JOIN`. This is not needed, the optimizer will move the filter before the lookup. Both examples will have the same results.
728732

729733
```esql
734+
FROM Left
735+
| WHERE Language IS NOT NULL
736+
| LOOKUP JOIN Right ON Key
737+
```
730738

739+
```esql
740+
FROM Left
741+
| LOOKUP JOIN Right ON Key
742+
| WHERE Language IS NOT NULL
731743
```
732744

733745
## `MV_EXPAND` [esql-mv_expand]

0 commit comments

Comments
 (0)