DROP STATISTICS (U-SQL)
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!
Drop_Statistics_Statement := 'DROP' 'STATISTICS' ['IF' 'EXISTS'] Statistic_Name 'ON' Table_Name.
Statistic_Name := Quoted_or_Unquoted_Identifier.
Table_Name := Identifier.
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 the statistic does not exist or the user does not have permissions, then an error is raised, unless
IF 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.
- 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
DROP STATISTICS IF EXISTS ordersStats ON TestReferenceDB.dbo.Orders;