Skip to content

Commit 91eea8a

Browse files
Merge pull request #223019 from ilijazagorac/patch-1
Wildcard expansion issue
2 parents e27df14 + 57db980 commit 91eea8a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

articles/synapse-analytics/sql/resources-self-help-sql-on-demand.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,21 @@ This error might indicate that some internal process issue happened in serverles
707707

708708
Describe anything that might be unusual compared to the regular workload. For example, perhaps there was a large number of concurrent requests or a special workload or query started executing before this error happened.
709709

710+
### Wildcard expansion timed out
711+
712+
As described in the [Query folders and multiple files](../sql/query-folders-multiple-csv-files.md) section, Serverless SQL pool supports reading multiple files/folders by using wildcards. There is a maximum limit of 10 wildcards per query. You must be aware that this functionality comes at a cost. It takes time for the serverless pool to list all the files that can match the wildcard. This introduces latency and this latency can increase if the number of files you are trying to query is high. In this case you can run into the following error:
713+
714+
```
715+
"Wildcard expansion timed out after X seconds."
716+
```
717+
718+
There are several mitigation steps that you can do to avoid this:
719+
- Apply best practices described in [Best Practices Serverless SQL Pool](../sql/best-practices-serverless-sql-pool.md).
720+
- Try to reduce the number of files you are trying to query, by compacting files into larger ones. Try to keep your file sizes above 100MB.
721+
- Make sure that filters over partitioning columns are used wherever possible.
722+
- If you are using delta file format, use the optimize write feature in Spark. This can improve the performance of queries by reducing the amount of data that needs to be read and processed. How to use optimize write is described in [Using optimize write on Apache Spark](../spark/optimize-write-for-apache-spark.md).
723+
- To avoid some of the top-level wildcards by effectively hardcoding the implicit filters over partitioning columns use [dynamic SQL](../sql/develop-dynamic-sql.md).
724+
710725
## Configuration
711726

712727
Serverless SQL pools enable you to use T-SQL to configure database objects. There are some constraints:

0 commit comments

Comments
 (0)