scan-optimization

Optimize SQL scan and filter operations using predicate pushdown and SIMD filtering.

71|8|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/SolidLao/GenDB --skill scan-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scan-optimization
Source: https://github.com/SolidLao/GenDB/tree/main/.claude/skills/scan-optimization
Command: npx skills add https://github.com/SolidLao/GenDB --skill scan-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill optimizes how data is read from and filtered within large tables in database queries, significantly speeding up query execution by reducing unnecessary data processing and I/O.

Core Features & Use Cases

  • Predicate Pushdown: Evaluates filters as early as possible.
  • Late Materialization: Loads only necessary columns for qualifying rows.
  • Selection Vectors: Efficiently handles low-selectivity filters by gathering row indices.
  • SIMD Filtering: Leverages CPU vector instructions for fast, parallel filtering.
  • Use Case: When querying a multi-billion row fact table with a WHERE clause on a specific date range and a few other columns, this skill ensures only the relevant data blocks and columns are accessed, drastically reducing scan time.

Quick Start

Use the scan-optimization skill to optimize a query with a WHERE clause on a large table.

Frequently Asked Questions about scan-optimization

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

FAQPage Schema
How do I optimize SQL query scan performance on large tables?

To optimize SQL query scan performance on large tables, you can apply techniques like predicate pushdown, late materialization, selection vectors, and SIMD filtering to reduce unnecessary data processing and I/O during execution.

What is predicate pushdown and how does it speed up WHERE clause execution?

Predicate pushdown speeds up WHERE clause execution by evaluating filters as early as possible in the query planning phase, ensuring that only relevant data blocks are accessed and drastically reducing scan time.

When should I use late materialization for filtering multi-billion row fact tables?

Use late materialization when filtering multi-billion row fact tables to load only necessary columns for qualifying rows, minimizing I/O and accelerating query execution for low-selectivity filters.

How do selection vectors and SIMD filtering improve low-selectivity query performance?

Selection vectors improve low-selectivity query performance by efficiently gathering qualifying row indices, while SIMD filtering leverages CPU vector instructions to process data in parallel for rapid filtering.

Does query scan optimization require specific hardware or data distribution knowledge?

Query scan optimization requires an understanding of hardware characteristics and data distributions to navigate query execution trade-offs effectively during planning, generation, and optimization phases.