Skip to content

Commit 58eca6e

Browse files
igorlukaninovr
authored andcommitted
docs: CUBESQL_SQL_NO_IMPLICIT_ORDER update
1 parent 4edb2bb commit 58eca6e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

docs/pages/product/apis-integrations/queries.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ The following defaults apply to all queries run by Cube.
1818

1919
### Order
2020

21-
By default, Cube will apply ordering to [any query](#query-types) that does not
21+
By default, for [REST API][ref-rest-api] and [GraphQL API][ref-graphql-api]
22+
queries, Cube will apply ordering to [any query](#query-types) that does not
2223
set it explicitly. The default heuristics are to sort the result set by a time
2324
dimension, if any; otherwise, sort it by the first measure, if any; otherwise,
24-
sort it by the first dimension, if any. This will provide a result set that works
25-
great for most data visualization purposes.
26-
27-
[SQL API][ref-sql-api] queries do not get a default ordering if they are
28-
[ungrouped](#ungrouped-query). You can opt out from default ordering for all SQL API
29-
queries by setting `CUBESQL_SQL_NO_IMPLICIT_ORDER` to `true`.
30-
31-
For [REST API][ref-rest-api] and [GraphQL API][ref-graphql-api] queries, you can opt
32-
out from default ordering by passing an empty array (`[]`) object as `order`.
25+
sort it by the first dimension, if any. These heuristics provide a result set
26+
that works great for most data visualization purposes. You can opt out from
27+
default ordering by passing an empty array (`[]`) object as `order`.
28+
29+
[SQL API][ref-sql-api] queries do not get a default ordering in case there's no
30+
`ORDER BY` clause in the query. You can opt in for default ordering for SQL API
31+
queries (except for [ungrouped](#ungrouped-query) ones) by setting
32+
`CUBESQL_SQL_NO_IMPLICIT_ORDER` to `false`.
3333

3434
### Row limit
3535

docs/pages/reference/configuration/environment-variables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ clause](/product/apis-integrations/queries#order) for [SQL API][ref-sql-api] que
993993

994994
| Possible Values | Default in Development | Default in Production |
995995
| --------------- | ---------------------- | --------------------- |
996-
| `true`, `false` | `false` | `false` |
996+
| `true`, `false` | `true` | `true` |
997997

998998
## `CUBESQL_REWRITE_MAX_NODES`
999999

0 commit comments

Comments
 (0)