Files
openobserve/src/cli/data
Hengfei Yangandoasisk e1097f86e2 feat: add fast mode for query (#2876)
Use **Fast Mode** when dealing with thousands of fields. It retrieves
the first N fields for a quicker response.

Enable it through this configuration: 

```
ZO_FAST_MODE_NUM_FIELDS=50
ZO_FAST_MODE_STRATEGY=first/last/both
```

And use the search API:

```json
{
	"query": {
		"sql": "select * from default ",
		"start_time": 1709711116396000,
		"end_time": 1709712016396000,
		"from": 0,
		"size": 250,
		"sql_mode": "full",
		"fast_mode": true
	}
}
```

When the backend identifies a request:
- Using `fast_mode` 
- With an `SQL` prefix of `select *` 
- Where schema fields exceed `ZO_FAST_MODE_NUM_FIELDS` 

It will then rewrite the `SQL` to `select f1,f2,f3`, where 'fn'
represents the first 'n' fields from schema. The value of 'n' is
determined by `ZO_FAST_MODE_NUM_FIELDS`.

In the end you can set `ZO_FAST_MODE_STRATEGY=first/last/both` to
control the order for pickup fields from schema.

---------

Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
2024-03-06 19:50:30 +05:30
..
2023-12-18 10:49:08 +08:00
2023-12-18 10:49:08 +08:00