Forum Discussion
Partitioning Strategy
- 1 year ago
Hi coolie,
Thank you for reaching out to Microsoft Fabric Community.
The issue here is due to exceeding the number of files per table guardrail, which can lead to query performance. This happens because excessive small Parquet files generated by daily updates.
- Use an OPTIMIZE or MERGE operation regularly to merge small files into larger ones. Enable Auto-Compaction and update existing records instead of creating new files daily.
- The current partitioning strategy creates too many partitions and small files, if possible remove the day partition to reduce file count, so the structure becomes: Product ā Year ā Month
- Implement the data retention policies to delete or archive older data
These steps will reduce the file count and improves the performance.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" ā Iād truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
Hi coolie ,
I agree with what has been set. There are a lot of neat automatic features helping you to optimize your parquet files, using OPTIMIZE when you read in the data is one of them.
However, OPTIMIZE will only reduce the number of files to a minimum of 1 per partition. Since you specified the partitions columns yourself, you can check the size of the individual files to check whether or not you chose them to granular. 1 - 2 GB per file partitions is indeed a good amount and not too much. If your files are much smaller than that, you might want to overthink the partioning.
Good luck! š
Niels