No Picture
MinervaDB

MySQL Scalar Subquery Unnesting transformation

Scalar subquery unnesting is a transformation technique used by the MySQL optimizer to optimize queries that involve scalar subqueries. Scalar subqueries are subqueries that return a single value, typically used in expressions or as part […]

No Picture
MinervaDB

How to gather statistics of PostgreSQL only when stale?

In PostgreSQL, you can gather statistics only when they are stale by utilizing the pg_stat_statements extension and the track_activity_query_size configuration parameter. Here’s how you can achieve this: CREATE EXTENSION pg_stat_statements; 3. Query the pg_stat_statements View: […]

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

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, […]