trino-file-layout-optimization

Optimize Trino Iceberg table file layout to reduce scan latency.

14|1|Updated May 5, 2026
One-click install
npx skills add https://github.com/ivanshamaev/de-agent-skills --skill trino-file-layout-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trino-file-layout-optimization
Source: https://github.com/ivanshamaev/de-agent-skills/tree/main/group_skills/trino_group_skills/trino_file_layout_optimization
Command: npx skills add https://github.com/ivanshamaev/de-agent-skills --skill trino-file-layout-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you reduce slow Trino query performance caused by inefficient Iceberg file layout, especially when small files cause excessive split counts or when file-level pruning is ineffective.

Core Features & Use Cases

  • Select optimal table file format (Parquet vs ORC) for Trino+Iceberg workloads, defaulting to Parquet and using ORC when migrating from Hive or requiring ORC-specific stripe statistics.
  • Tune file sizing and row group behavior by adjusting iceberg.target-max-file-size and Parquet row group settings to improve compression and pruning effectiveness.
  • Increase data skipping and reduce wasted reads using sorted_by (min/max skipping) and Bloom filter indexes for equality-heavy predicates.
  • Detect and remediate small-file pathologies with targeted Iceberg OPTIMIZE compaction strategies, plus split/parallelism tuning and partition granularity guidance.
  • Use health-check SQL to quantify small files, oversized files, and overall table health from Iceberg metadata tables.

Quick Start

Ask the AI to propose an Iceberg layout plan for your Trino workload and generate the specific CREATE TABLE/property changes and OPTIMIZE commands to reduce small files and improve pruning.

Frequently Asked Questions about trino-file-layout-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix slow Trino scans caused by too many small Iceberg files?

Improve Trino Iceberg pruning by applying sorted_by for min/max skipping and adding Bloom filter indexes for equality predicates. These settings reduce wasted reads by skipping irrelevant file blocks during scan execution.

What is the best way to choose between Parquet and ORC for Trino Iceberg tables?

Choose Parquet as the default optimal file format for Trino Iceberg workloads, but use ORC when migrating from Hive or requiring ORC-specific stripe statistics. This selection improves compression and file-level pruning effectiveness.

How do I check Iceberg table health to detect small or oversized files in Trino?

Check Iceberg table health by running health-check SQL queries against Iceberg metadata tables. This quantifies small files, oversized files, and overall table layout health to identify scan performance bottlenecks.

How do I tune Parquet row group and file size settings to improve Trino query performance?

Tune Parquet row group buffering and adjust iceberg.target-max-file-size to improve compression and pruning effectiveness. Properly sized row groups and files reduce split overhead and enhance data skipping.