Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,24 @@ You must have at least [Database Admin](../access-control/role-based-access-cont
| _JSON-serialized policy_ | `string` | :heavy_check_mark: | String literal holding a [JSON property bag](#json-property-bag). |

### JSON property bag

| Property | Type | Required | Description |
| ---------- | ---------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IsEnabled | `Boolean` | :heavy_check_mark: | Indicates whether the policy is enabled. |
| Hot | `Timespan` | :heavy_check_mark: | The hot period defined in the query acceleration policy. Minimum value = 1 d. |
| HotWindows | `DateTime` | | One or more optional time windows. Delta data files created within these time windows are accelerated. |
| MaxAge | `Timespan` | | The external table will return accelerated data if the last index refresh time is greater than @now - MaxAge. Otherwise, external table will operate in non-accelerated mode. Default is 5 minutes. Minimum is 1 minute. |

::: moniker range="microsoft-fabric"
| Property | Type | Required | Description |
| ---------- | ---------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IsEnabled | `Boolean` | :heavy_check_mark: | Indicates whether the policy is enabled. |
| Hot | `Timespan` | :heavy_check_mark: | The hot period defined in the query acceleration policy. Minimum value = 1 d. |
| HotWindows | `DateTime` | | One or more optional time windows. Delta data files created within these time windows are accelerated. |
| MaxAge | `Timespan` | | The external table returns accelerated data if the last index refresh time is greater than @now - MaxAge. Otherwise, the external table operates in non-accelerated mode. Default is 5 minutes. Minimum is 1 minute. |
::: moniker-end

::: moniker range="azure-data-explorer"
| Property | Type | Required | Description |
| ---------- | ---------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IsEnabled | `Boolean` | :heavy_check_mark: | Indicates whether the policy is enabled. |
| Hot | `Timespan` | :heavy_check_mark: | The hot period defined in the query acceleration policy. Minimum value = 1 d. |
| HotWindows | `DateTime` | | One or more optional time windows. Delta data files created within these time windows are accelerated. |
| MaxAge | `Timespan` | | The external table returns accelerated data if the last index refresh time is greater than @now - MaxAge. Otherwise, the external table operates in non-accelerated mode. Default is 5 minutes. Minimum is 1 minute. |
| ManagedIdentity | `string` | | Optional managed identity for which the query acceleration background operations are executed. This identity must have relevant delta table permissions and must be enabled for AutomatedFlows in the cluster / database managed identity policy. For more information, see [Managed identities overview](/azure/data-explorer/managed-identities-overview)|
::: moniker-end
> [!NOTE]
> Query acceleration is applied to data within a specific time period, defined as `timespan`, starting from the `modificationTime` as stated for each file in the [delta log](https://github.com/delta-io/delta/blob/master/PROTOCOL.md#add-file-and-remove-file).

Expand All @@ -60,11 +70,17 @@ The command returns a table with one record that includes the modified policy ob
| EntityType | `string` | The type of the entity the policy applies to - `ExternalTable` |

## Example

::: moniker range="microsoft-fabric"
```Kusto
.alter external table MyExternalTable policy query_acceleration '{"IsEnabled": true, "Hot": "1.00:00:00", "HotWindows":[{"MinValue":"2025-07-06 07:53:55.0192810","MaxValue":"2025-07-06 07:53:55.0192814"}], "MaxAge" : "00:05:00"}'
.alter external table MyExternalTable policy query_acceleration '{"IsEnabled": true, "Hot": "1.00:00:00", "HotWindows":[{"MinValue":"2025-07-07 07:00:00","MaxValue":"2025-07-09 07:00:00"}], "MaxAge": "00:05:00"}'
```
::: moniker-end

::: moniker range="azure-data-explorer"
```Kusto
.alter external table MyExternalTable policy query_acceleration '{"IsEnabled": true, "Hot": "1.00:00:00", "HotWindows":[{"MinValue":"2025-07-07 07:00:00","MaxValue":"2025-07-09 07:00:00"}], "MaxAge": "00:05:00", "ManagedIdentity": "12345678-1234-1234-1234-1234567890ab"}'
```
::: moniker-end
## Related content

- [Query acceleration policy](query-acceleration-policy.md)
Expand Down
8 changes: 3 additions & 5 deletions data-explorer/kusto/management/query-acceleration-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@ To enable query acceleration in the Fabric UI, see [Query acceleration over OneL
## Limitations

* The number of columns in the external table can't exceed 900.
* Delta tables with checkpoint V2 are not supported.
* Delta tables with checkpoint V2 aren't supported.
* Query performance over accelerated external delta tables which have more than 2.5 million data files may not be optimal.
* The feature assumes delta tables with static advanced features, for example column mapping doesn't change, partitions don't change, and so on. To change advanced features, first disable the policy, and once the change is made, re-enable the policy.
* Schema changes on the delta table must also be followed with the respective `.alter` external delta table schema, which might result in acceleration starting from scratch if there was breaking schema change.
* Parquet files larger than 1 GB won't be cached.
::: moniker range="azure-data-explorer"
* Query acceleration isn't supported for external tables with impersonation authentication.
::: moniker-end
* Manual edits to the delta table are not allowed and can lead to unexpected results.

> [!NOTE]
> The query acceleration caching operations are limited by the available query acceleration capacity of your cluster. Run the [.show capacity command](show-capacity-command.md) to view the total, consumed, and remaining query acceleration capacity.

## Known issues

* Data in the external delta table that is optimized with the [OPTIMIZE](/azure/databricks/sql/language-manual/delta-optimize) function will need to be reaccelearted.
* Data in the external delta table that's optimized with the [OPTIMIZE](/azure/databricks/sql/language-manual/delta-optimize) function will need to be reaccelearted.
* If you run frequent MERGE/UPDATE/DELETE operations in delta, the underlying parquet files may be rewritten with changes and Kusto will skip accelerating such files, causing retrieval during query time.
* The system assumes that all artifacts under the delta table directory have the same access level to the selected users. Different files having different access permissions under the delta table directory might result with unexpected behavior.

Expand Down
2 changes: 1 addition & 1 deletion data-explorer/kusto/query/sample-distinct-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ms.date: 01/21/2025

Returns a single column that contains up to the specified number of distinct values of the requested column.

The operator tries to return an answer as quickly as possible rather than trying to make a fair sample.
The operator is optimized for performance rather than fairness; the results may be heavily biased and should not be used for any purpose requiring statistical accuracy.

## Syntax

Expand Down
2 changes: 2 additions & 0 deletions data-explorer/managed-identities-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ After assigning the managed identity to your cluster and configuring the relevan

* **Sql request plugins**: Use a managed identity to authenticate to an external database when using the *sql_request* or *cosmosdb_request* plugins.

* **Query acceleration policy**: In order to accelerate external tables that use impersonation authentication, you must configure the query acceleration policy to run with a managed identity. In this case, the managed identity will be used to access the external table resources. To configure the managed identity, add the managed identity identifier in the external table [`alter policy query-acceleration` command](/kusto/management/alter-query-acceleration-policy-command?view=azure-data-explorer&preserve-view=true). Please note that the `AutomatedFlows` usage needs to be enabled for the managed identity identifier in the cluster / database level managed identity policy.

## Related content

* [Configure managed identities for your cluster](configure-managed-identities-cluster.md)
Expand Down