A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
Hi Kyler Dreyer & thx for join me at Q&A platform,
ur testing is pretty thorough, and I think u've already ruled out the most obvious query-level explanations.
Partition elimination using filepath() is documented as supported for Azure SQL Database Data Virtualization, including Parquet files accessed through OPENROWSET. Microsoft's own example uses wildcard folders and a filepath(1) predicate in the WHERE clause, so ur approach is consistent with the documented syntax.
The interesting part is that ur direct OPENROWSET query still takes around 43 seconds, compared with 5 seconds when the partition is specified directly in BULK. That makes this worth investigating as a possible optimizer or external scan pushdown issue, particularly because Azure SQL Database Data Virtualization is still in preview.
One distinction worth making, tho: seeing Remote Scan → Filter in the execution plan doesn't necessarily prove that every Parquet file was downloaded and scanned. The engine may enumerate files before applying partition selection, and the execution plan doesn't always expose how much filtering happened inside the external scan. The timing difference is compelling, but I'd want storage-side evidence before concluding that all partitions are being fully read.
I'd enable Azure Storage diagnostic logging temporarily and compare the actual Blob read operations for the wildcard query against the explicit year=2025/*.parquet query. Look at which blob paths receive read requests, how many files are accessed, and the volume of data transferred. That should help distinguish full file scanning from expensive wildcard enumeration or metadata processing.
Regarding collation, Latin1_General_100_BIN2_UTF8 is relevant to certain Parquet string predicate pushdown optimizations, but folder partition elimination through filepath() is a different mechanism. So I wouldn't expect changing the collation to fix this particular issue.
You've also tested the predicate directly against OPENROWSET, which means the view isn't the root cause. And I don't see a different documented syntax that u should need for a simple filepath(1) = '2025' filter.
As a practical workaround, if the year is known when constructing the query, use an explicit path such as year=2025/*.parquet. For multiple years, the application could generate separate queries or a UNION ALL over explicitly targeted paths. That's less convenient than automatic partition pruning, but it avoids scanning the wildcard folder structure unnecessarily.
I'd raise this with the Azure SQL Database Data Virtualization engineering team and provide the actual execution plans, query timings, storage request metrics, database compatibility level, and @@VERSION output. Specifically, ask whether filepath() partition pruning is currently functioning as documented in the Azure SQL Database preview and whether there are known limitations or regressions affecting wildcard Parquet paths.
One question: do ur storage logs show actual reads against the 2021–2024 Parquet files when filtering for 2025? If they do, that would be strong evidence that partition elimination isn't being applied, rather than just being hidden by the execution plan.
rgds,
Alex
p.s. if my answer is help - pls mark it as an answer