No Picture
MinervaDB

SQL/JSON patches committed to PostgreSQL 15!

PostgreSQL SQL/JSON: PostgreSQL continues evolving its support for modern data formats with each release. Notably, PostgreSQL 15 introduces significant improvements to handle JSON data more efficiently. These updates bring greater flexibility, performance, and ease of […]

No Picture
MinervaDB

How to gather statistics of PostgreSQL only when stale?

In PostgreSQL, you can gather statistics only when they become stale by using the pg_stat_statements extension along with the track_activity_query_size configuration parameter. Follow these steps to achieve this: CREATE EXTENSION pg_stat_statements; 3. Query the pg_stat_statements […]

No Picture
MinervaDB

How to implement Concurrent Statistics Gathering in PostgreSQL?

Concurrent statistics gathering in PostgreSQL allows for collecting table and column statistics without blocking concurrent read and write operations. This feature helps ensure accurate and up-to-date statistics while minimizing the impact on database performance. Here’s […]

No Picture
MinervaDB

PostgreSQL Query Optimizer: Troubleshooting Unconsidered Hints

PostgreSQL’s query optimizer (or planner) creates optimal execution plans for SQL queries by evaluating multiple possible plans and selecting the fastest one. [^1] Understanding PostgreSQL’s Approach to Optimizer Hints PostgreSQL takes a deliberately cautious approach […]

No Picture
MinervaDB

How to have PostgreSQL execution plan with run-time?

In PostgreSQL, you can obtain the execution plan with runtime information using the EXPLAIN (ANALYZE, VERBOSE) command. This command provides a detailed execution plan along with actual runtime information, including the number of rows processed, […]