Skip to content

Commit 9b74abf

Browse files
update doc: prevent ui crashes from large queries
1 parent 0a538eb commit 9b74abf

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

docs/user-guide/best-practices/prevent-ui-crashes-from-large-queries.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
OpenObserve does not restrict the number of records returned or the length of the time range in a query.
1+
OpenObserve does not restrict the number of records returned or the length of the time range in a query. You can query a few minutes or a longer time range, depending on your data retention settings (by default, 1 year, may vary by configuration).
22

3-
You can query a few minutes or a longer time range, based on your data retention settings. The default retention is 1 year, but this may vary by configuration.
3+
!!! warning
4+
Queries that return a **large number of records** or **generate a large payload** can overload the browser. This may cause the UI to crash, particularly on the **Log Search** page or in **Dashboard panels**.
45

5-
However, queries that return a large number of results, especially those with small time intervals, breakdown fields, or large text fields, can overload the browser.
6-
This may cause the UI to become unresponsive or crash, particularly on the **Logs** page or in **Dashboard Panels**.
6+
This typically happens when:
77

8-
Two scenarios where this risk is significant:
8+
- A small interval is used over a long time range, resulting in too many rows.
9+
- Large text fields, such as `log.body`, are included, increasing payload size.
10+
11+
12+
13+
Use the guidance below to understand these risks and avoid them when building queries and dashboards.
914

1015
## 1. Long Range Queries with Small Intervals
1116

@@ -29,18 +34,21 @@ ORDER BY log_time_interval ASC
2934

3035
The above query returns the number of logs collected every 5 minutes. When run over a 7-day period, it generates more than 2,000 time buckets, each representing a row that the browser must load and render. This volume of data can cause the UI to become unresponsive or crash.
3136

32-
> **Note:** <br>
33-
>**In Dashboard Panels- Breakdown Fields Multiply the Problem**<br>
34-
>In dashboard panels, if you add a breakdown to the query (e.g., by `log.level`), it multiplies the number of rows. <br> For example,
35-
>
36-
>- You already have 2,000 time buckets
37-
>- `log.level` has 5 unique values: `INFO`, `ERROR`, `DEBUG`, `WARN`, `TRACE`
38-
>
39-
>The result becomes: 2,000 time buckets × 5 breakdown values = 10,000 rows
40-
>
41-
>That is 5X more data than without the breakdown.
42-
>
43-
>All of it must be fetched, loaded, and rendered in your browser. It ends up crashing the UI.
37+
38+
!!! Note
39+
**In Dashboard Panels- Breakdown Fields Multiply the Problem**
40+
41+
In dashboard panels, if you add a breakdown to the query (e.g., by `log.level`), it multiplies the number of rows. If the query is long range and has small time interval, adding breakdown to the Panels would further worsen the problem.
42+
<br> For example,
43+
44+
- You already have 2,000 time buckets
45+
- `log.level` has 5 unique values: `INFO`, `ERROR`, `DEBUG`, `WARN`, `TRACE`
46+
47+
The result becomes: 2,000 time buckets × 5 breakdown values = 10,000 rows
48+
49+
That is 5X more data than without the breakdown.
50+
51+
All of it must be fetched, loaded, and rendered in your browser. It ends up crashing the UI.
4452

4553
## 2. Tables that Include Large Text Fields
4654

0 commit comments

Comments
 (0)