vertica_query_optimization

Diagnose Vertica 11.x EXPLAIN plans and tune projections for query performance.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you reduce slow Vertica query runtimes by diagnosing execution plans and tuning physical design (projections, segmentation, encoding) based on what Vertica actually does.

Core Features & Use Cases

  • EXPLAIN-driven diagnosis: Identify performance bottlenecks by interpreting Vertica EXPLAIN tokens (e.g., JOIN type, RESEGMENT, GROUPBY algorithm, sort activity) and by correlating plan profiles with projections.
  • Projection and physical tuning: Design or adjust projections to match query patterns, including ORDER BY prefix for sort elimination, SEGMENTED BY keys for avoiding resegmentation, and ENCODING choices such as RLE for low-cardinality sorted columns.
  • Performance tuning for DML and diagnostics: Improve INSERT-SELECT, and understand DELETE/UPDATE internals and operational costs; use Data Collector (dc_*) tables to find slow requests and quantify durations.
  • Task fit: Works when you must optimize for joins, GROUP BY, ORDER BY, analytic functions, Top-K/LIMIT behavior, predicate selectivity, and when you need to verify changes by re-running EXPLAIN.

Quick Start

Use this skill to optimize a slow Vertica 11.1 query by running EXPLAIN on the SQL, interpreting the plan (especially JOIN/GROUPBY/RESEGMENT/SORT), then updating the relevant projection design and re-running EXPLAIN to confirm the improvement.

Frequently Asked Questions about vertica_query_optimization

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

FAQPage Schema
How do I optimize slow Vertica SQL query performance using EXPLAIN plan interpretation?

Vertica EXPLAIN plan interpretation identifies query bottlenecks by analyzing JOIN types, RESEGMENT operations, GROUPBY algorithms, and sort activity. Correlating these plan tokens with projection designs reveals segmentation and encoding adjustments needed to improve query performance.

How do I design Vertica projections to avoid resegmentation and improve join performance?

Design Vertica projections by aligning SEGMENTED BY keys with join conditions to prevent resegmentation. Specifying an ORDER BY prefix for sort elimination and applying RLE encoding on low-cardinality sorted columns further reduces scan and join overhead.

Why does my Vertica INSERT-SELECT or DELETE statement run slowly and how can I tune it?

Vertica INSERT-SELECT and DELETE statements run slowly due to internal operational costs and projection overhead. Diagnosing execution plans and querying Data Collector dc_* tables helps identify slow requests and quantify durations to tune DML performance.

Can I diagnose Vertica query bottlenecks using v_catalog and v_monitor views?

Yes, you can diagnose Vertica query bottlenecks using v_catalog and v_monitor plan and projection views. These views provide execution profiles and projection metadata that, combined with Data Collector tables, identify slow requests and quantify durations.

When should I update Vertica statistics with ANALYZE_STATISTICS for SQL performance tuning?

Update Vertica statistics with ANALYZE_STATISTICS before performance tuning to ensure the optimizer generates accurate execution plans. Refreshing statistics after data changes and before re-running EXPLAIN ensures reliable diagnosis of sort elimination and join behavior.

What is the best way to choose RLE encoding for Vertica projection columns?

The best way to choose RLE encoding for Vertica projection columns is to apply it to low-cardinality sorted columns. Using RLE encoding on these columns within your projection design compresses repetitive values, reducing storage footprint and accelerating query scans.