DROP STATISTICS (U-SQL)
Updated: March 10, 2017
U-SQL provides the DROP STATISTICS statement to drop the specified statistic of a table.
Note that dropping statistics may have negative impact on the performance on queries over the associated table.
This operation cannot be undone! |
| Syntax |
|---|
Drop_Statistics_Statement :=
'DROP' 'STATISTICS' ['IF' 'EXISTS']
Statistic_Name 'ON' Table_Name. |
Semantics of Syntax Elements
Statistic_Name ON Table_Name
Specifies the name (either a quoted or unquoted identifier) of the statistic of the given table to be dropped.IF EXISTS
If the statistic does not exist or the user does not have permissions, then an error is raised, unlessIF EXISTSis specified. In that case, if the user has at least enumeration permission on the table, the operation will silently complete without action. If the user has no enumeration permission, an error is raised.
Example
- The example can be executed in Visual Studio with the Azure Data Lake Tools plug-in.
- The script can be executed locally. An Azure subscription and Azure Data Lake Analytics account is not needed when executed locally.
The following example drops the statistics, ordersStats, within the table Orders in TestReferenceDB.
DROP STATISTICS IF EXISTS ordersStats ON TestReferenceDB.dbo.Orders;