trino-iceberg-best-practices

Design and maintain high-performance Apache Iceberg tables in Trino.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design and operate production Apache Iceberg tables queried via Trino by preventing common performance and maintenance pitfalls like poor partition pruning, small-file bloat, inefficient layouts, and unmanageable snapshot growth.

Core Features & Use Cases

  • Production Iceberg DDL blueprint: Specifies storage format, compression, format_version, hidden partitioning transforms, and within-file sorting for better pruning and execution efficiency.
  • Maintenance & correctness operations: Covers optimize/compaction, manifest optimization, snapshot expiry, orphan file removal, and safe snapshot/time-travel workflows.
  • Evolution & data lifecycle: Guides schema evolution, partition evolution, and DML patterns (INSERT/UPDATE/DELETE/MERGE) aligned with Iceberg requirements and Trino capabilities.
  • Performance tuning diagnostics: Recommends ANALYZE usage for CBO and shows how to inspect metadata tables ($snapshots, $files, $partitions, $history) to validate file sizing and commit behavior.

Quick Start

Ask an AI to propose a production-ready Trino Iceberg table DDL for a daily partitioned orders dataset and include an operational maintenance schedule with snapshot retention and compaction settings.

Frequently Asked Questions about trino-iceberg-best-practices

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

FAQPage Schema
How do I optimize Apache Iceberg table performance in Trino?

To optimize Apache Iceberg table performance in Trino, enforce format_version=2 for mutable tables, apply hidden partitioning transforms with range predicates, and run ANALYZE to enable cost-based optimization for better partition pruning.

What is the best way to manage Iceberg snapshot growth and metadata bloat?

Manage Iceberg snapshot growth by scheduling regular snapshot expiry, orphan file removal, and manifest optimization to prevent metadata bloat and maintain fast query performance.

How do I run MERGE, UPDATE, or DELETE DML operations on Trino Iceberg tables?

Run MERGE, UPDATE, or DELETE DML on Trino Iceberg tables by enforcing format_version=2 for mutability and validating commit behavior via metadata tables like $history and $snapshots to ensure safe DML patterns.

Does Trino support hidden partitioning and compaction for Iceberg tables?

Yes, Trino supports hidden partitioning transforms and table compaction for Iceberg. Use the optimize command to compact small files and inspect the $files metadata table to validate file sizing and layout.

Why are my Trino Iceberg queries slow despite table partitioning?

Trino Iceberg queries may be slow due to missing partition pruning, small-file bloat, or inefficient layouts. Inspect $partitions and $files metadata, run ANALYZE for CBO, and schedule compaction to resolve these issues.

When do I need to use Iceberg format_version=2 for mutable tables?

Use Iceberg format_version=2 when implementing mutable tables with INSERT, UPDATE, DELETE, or MERGE DML patterns in Trino to ensure correct lifecycle management and safe data evolution.