clickzetta-query-optimizer

Diagnose and optimize ClickZetta Lakehouse SQL queries with EXPLAIN analysis and tuning steps.

8|3|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/yunqiqiliang/clickzetta-skills --skill clickzetta-query-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clickzetta-query-optimizer
Source: https://github.com/yunqiqiliang/clickzetta-skills/tree/main/clickzetta-query-optimizer
Command: npx skills add https://github.com/yunqiqiliang/clickzetta-skills --skill clickzetta-query-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Diagnose and optimize ClickZetta Lakehouse SQL queries to improve performance.

Core Features & Use Cases

  • End-to-end performance diagnosis covering EXPLAIN and EXPLAIN EXTENDED analysis, slow-query identification, and plan-driven tuning.
  • Optimization techniques including Result Cache enablement, OPTIMIZE for small-file consolidation, MapJoin hints, and Sort Key recommendations.
  • Use Case: When users observe slow SQL or complex joins, apply guided steps to speed up workloads on a general-purpose cluster.

Quick Start

Explain a slow query using EXPLAIN and implement the recommended optimization steps.

Frequently Asked Questions about clickzetta-query-optimizer

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

FAQPage Schema
How do I optimize slow ClickZetta Lakehouse SQL queries on a general-purpose cluster?

You can troubleshoot slow SQL by analyzing execution plans with EXPLAIN and EXPLAIN EXTENDED, identifying bottlenecks, and applying targeted tuning steps like MapJoin hints and Sort Key recommendations to improve query throughput.

What is the best way to consolidate small files in ClickZetta Lakehouse to improve SQL performance?

The best way to consolidate small files for ClickZetta SQL performance is running the OPTIMIZE command, which merges small files to accelerate query reads and reduce job overhead on the Lakehouse.

When should I use MapJoin hints in ClickZetta SQL?

You should use MapJoin hints in ClickZetta SQL when joining large tables with small dimension tables, enabling the small table to load into memory for faster join execution and reduced data shuffle.

Does ClickZetta support result caching for repeated SQL queries?

Yes, ClickZetta supports Result Cache enablement for repeated SQL queries, storing previous query results to skip recomputation, significantly reducing latency for frequent analytical workloads.

How do I design Sort Keys in ClickZetta to speed up Lakehouse queries?

To design Sort Keys for ClickZetta Lakehouse queries, identify frequently filtered columns in your SQL, apply Sort Key recommendations to physically order data, and accelerate range pruning during execution.