Tosska SQL Tuning Expert Pro for PostgreSQL


ALTERNATIVE WISDOM –

The Ultimate Optimization Suite with PG_HINT_PLAN, HypoPG, Automatic SQL Rewrite & Advanced GUC Tuning

Struggling with PostgreSQL’s query Planner/Optimizer limitations or tangled SQL code? The Tosska SQL Tuning Expert Pro empowers teams to optimize SQL performance with surgical precision, combining four powerhouse technologies: PG_HINT_PLAN, HypoPG, Automatic SQL Rewrite, and Advanced GUC Parameter Tuning. Designed for DBAs and developers, Tosska automates complex tuning tasks, turning hours of manual work into minutes of AI-guided efficiency—even in environments where extensions like PG_HINT_PLAN are unavailable.

Automatic SQL Recursive Rewrite: Break Free from Planner/Optimizer Limitations
The Challenge: PostgreSQL’s optimizer has inherent plan space limitations—it can’t explore every possible execution strategy due to computational constraints. Complex queries often hit these limits, resulting in suboptimal plans even with perfect indexes or statistics.

How Tosska Solves It:
Tosska’s Recursive SQL Rewrite Technology doesn’t stop at a single optimization pass. It iteratively refactors SQL into semantically equivalent variants, forcing the Planner/Optimizer to explore untapped execution paths. Combined with PG_HINT_PLAN and GUC tuning, this approach overcomes the optimizer’s blind spots and unlocks plans that traditional methods miss.

Download Free Trial | Buy License

How Recursive Rewrite Works

  1. Recursive Rewrite:
    Generate alternative SQL structures (e.g., CTEs → derived tables, IN → EXISTS, explicit JOIN order permutations).
  2. Plan Space Expansion:
    Each rewritten SQL variant exposes new optimization opportunities to the Planner/Optimizer, bypassing its default heuristics.
  3. Synergy with PG_HINT_PLAN & GUC:
    For each rewritten SQL variant, Tosska layers hints or adjusts GUC parameters to test hybrid strategies.

Why This Matters:

  • Discover Hybrid Plans: A rewritten SQL + hint combo might enable various index scans that the original query’s structure blocked.

PG_HINT_PLAN + GUC Parameter Tuning: Master Execution Plans
PG_HINT_PLAN allows you to override PostgreSQL’s query Planner/Optimizer decisions by embedding optimizer hints in SQL comments. But what if PG_HINT_PLAN isn’t installed or permitted? Tosska’s Advanced GUC Tuning seamlessly steps in, adjusting PostgreSQL’s runtime configuration parameters to nudge the Planner/Optimizer toward optimal decisions.

How Tosska Delivers Dual Control:

  • PG_HINT_PLAN Optimization:
    • AI-Powered Hints: Automatically injects hints such as IndexScan, HashJoin, or Leading to enforce faster execution plans through the recursive application of hint combinations.
    • Plan Validation: Test multiple hinted strategies side-by-side.
  • GUC Parameter Tuning (When Hints Aren’t Available)
    • Planner/Optimizer Behavior Control: Tosska dynamically adjusts GUC parameters like enable_hashjoin, enable_indexscan, enable_nestloop, enable_seqscan, and enable_bitmapscan to nudge the Planner/Optimizer toward optimal strategies.
    • Session-Level Safety: Applies changes temporarily, avoiding risky global configuration overrides.

Intelligent Index Recommendations: AI-Driven Index Discovery with HypoPG
Conventional index recommendations typically concentrate on individual indexes, often overlooking the potential for multiple indexes and functional indexes that could significantly enhance performance. Tosska’s AI goes beyond mere index suggestions; it uncovers synergistic combinations of indexes specifically designed for your SQL patterns, data distribution, and workload. By leveraging HypoPG alongside virtual index simulations, Tosska evaluates thousands of virtual index configurations to identify the most effective combination of indexes for optimizing a SQL statement.

The following example shows that two indexes are recommended to improve the SQL statement.

Download Free Trial | Buy License

Why Select Tosska?
Tosska SQL Tuning Expert Pro is the definitive solution for PostgreSQL optimization, offering unmatched capabilities that set it apart in a crowded market. Here’s why leading enterprises and technical teams choose Tosska:

  • Comprehensive Optimization Suite:
    Tosska uniquely integrates PG_HINT_PLAN, HypoPG, Automatic SQL Recursive Rewrite, and Advanced GUC Tuning into a single platform. This holistic approach addresses every layer of SQL performance, from query structure to Planner/Optimizer behavior, ensuring no bottleneck goes unresolved.
  • Breakthrough Plan Discovery:
    While PostgreSQL’s optimizer struggles with inherent limitations, Tosska’s Recursive SQL Rewrite Technology generates semantically equivalent query variants, forcing the Planner/Optimizer to explore untapped execution paths.
  • AI-Driven Intelligence:
    Tosska’s AI automates labor-intensive tuning tasks, testing thousands of hint combinations, virtual indexes (via HypoPG), and GUC configurations to identify the optimal setup. It eliminates guesswork, turning hours of manual analysis into minutes of precision-guided results.
  • Adaptability & Safety:
    Even in restricted environments where PG_HINT_PLAN isn’t available, Tosska’s Advanced GUC Tuning dynamically adjusts session-level parameters (e.g., enable_hashjoin, enable_seqscan) to steer the Planner/Optimizer toward better decisions—without risky global configuration changes.
  • Synergistic Index Recommendations:
    Unlike tools that suggest isolated indexes, Tosska’s AI identifies multi-index combinations tailored to your data patterns, unlocking performance gains competitors overlook.

No other tool combines this level of automation, intelligence, and flexibility. Whether you’re a DBA battling Planner/Optimizer quirks or a developer optimizing high-stakes queries, Tosska empowers you to achieve peak PostgreSQL performance—reliably, efficiently, and without expertise barriers.

Free Trial Available at Download Free Trial – Experience the future of SQL tuning today.

Tosska SQL Tuning Expert Pro (TSEP Pro™) for PostgreSQL® - System Requirements
Before installing Tosska SQL Tuning Expert Pro (TSEP Pro™) for PostgreSQL®, please make sure your system meets the following minimum ...
Tosska SQL Tuning Expert Pro (TSEP Pro™) for PostgreSQL 1.1.0 Release Notes
Click to view Tosska SQL Tuning Expert Pro (TSEP Pro™) for PostgreSQL 1.1.0 Release Notes ...