Skip to content

Commit 9fbb0a0

Browse files
authored
Merge pull request #174595 from jovanpop-msft/patch-221
Update best-practices-serverless-sql-pool.md
2 parents 8f7bbaa + 0930197 commit 9fbb0a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

articles/synapse-analytics/sql/best-practices-serverless-sql-pool.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,18 @@ Serverless SQL pool relies on statistics to generate optimal query execution pla
9191

9292
### Use appropriate data types
9393

94-
The data types you use in your query affect performance. You can get better performance if you follow these guidelines:
94+
The data types you use in your query affect performance and concurrency. You can get better performance if you follow these guidelines:
9595

9696
- Use the smallest data size that will accommodate the largest possible value.
9797
- If the maximum character value length is 30 characters, use a character data type of length 30.
9898
- If all character column values are of fixed size, use **char** or **nchar**. Otherwise, use **varchar** or **nvarchar**.
9999
- If the maximum integer column value is 500, use **smallint** because it's the smallest data type that can accommodate this value. You can find integer data type ranges in [this article](/sql/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql?view=azure-sqldw-latest&preserve-view=true).
100100
- If possible, use **varchar** and **char** instead of **nvarchar** and **nchar**.
101+
- Use **varchar** type with some UTF8 collation if you are reading data from Parquet, CosmosDB, Delta Lake, or CSV with UTF-8 encoding.
102+
- Use **varchar** type without UTF8 collation if you are reading data from CSV non-Unicode files (for example, ASCII).
103+
- Use **nvarchar** type if you are reading data from CSV UTF-16 file.
101104
- Use integer-based data types if possible. SORT, JOIN, and GROUP BY operations complete faster on integers than on character data.
102-
- If you're using schema inference, [check inferred data types](#check-inferred-data-types).
105+
- If you're using schema inference, [check inferred data types](#check-inferred-data-types) and override them explicitly with the smaller types if possible.
103106

104107
### Check inferred data types
105108

0 commit comments

Comments
 (0)