limit.asciidoc 584 B

12345678910111213141516171819202122232425262728293031
  1. [discrete]
  2. [[esql-limit]]
  3. === `LIMIT`
  4. **Syntax**
  5. [source,esql]
  6. ----
  7. LIMIT max_number_of_rows
  8. ----
  9. *Parameters*
  10. `max_number_of_rows`::
  11. The maximum number of rows to return.
  12. *Description*
  13. The `LIMIT` processing command enables you to limit the number of rows that are
  14. returned. If not specified, `LIMIT` defaults to `500`.
  15. A query does not return more than 10,000 rows, regardless of the `LIMIT` value.
  16. You can change this with the `esql.query.result_truncation_max_size` static
  17. cluster setting.
  18. *Example*
  19. [source,esql]
  20. ----
  21. include::{esql-specs}/docs.csv-spec[tag=limit]
  22. ----