We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ErikEJ/SqlServer.Rules'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
SML026.md•968 B
# SQL Server Rule: SML026
| | |
|----|----|
| Assembly | TSQLSmellSCA |
| Namespace | TSQLSmellSCA |
| Class | TSQLSmellSCA26 |
## Rule Information
| | |
|----|----|
| Id | SML026 |
| Friendly Name | RANGE windows are much slower then ROWS (Implicit use) |
| Category | CodeSmells |
| Ignorable | false |
| Applicable Types | Model |
## Description
RANGE windows are much slower then ROWS (Implicit use)
### Examples
```sql
/* Default is Range UNBOUNDED PRECEDING ( Defining the frame )*/
Create Procedure dbo.ImplicitRangeWindow
as
Set nocount on
select sum(TestTableSSDT.Col1) over(partition by TestTableSSDT.IdCol
order by TestTableSSDT.Col2
) as RollingBalance,
row_number() over(partition by TestTableSSDT.IdCol
order by TestTableSSDT.Col2 ) as Rown
from dbo.TestTableSSDT
order by Col1,Col2;
-- SML026
```
<sub><sup>Generated by a tool</sup></sub>