Tagged articles
17 articles
Page 1 of 1
ITPUB
ITPUB
Apr 4, 2026 · Databases

How PostgreSQL and SQL Server Differ in Data Access Strategies

This article compares PostgreSQL and SQL Server data access methods—including sequential scans, index scans, bitmap heap scans, index‑only scans, and parallel query execution—highlighting PostgreSQL's lack of clustered indexes and the performance implications of each approach.

Bitmap ScanData AccessIndex Scan
0 likes · 10 min read
How PostgreSQL and SQL Server Differ in Data Access Strategies
Architect's Guide
Architect's Guide
Dec 5, 2025 · Databases

When Should You Turn Off MySQL’s prefer_ordering_index? A Deep Dive

This article explains the purpose of MySQL's optimizer_switch prefer_ordering_index, shows how it affects ORDER BY and GROUP BY queries with LIMIT, provides code examples and EXPLAIN output, and argues that disabling it often yields better performance for skewed data distributions.

Index Scanmysqloptimizer_switch
0 likes · 7 min read
When Should You Turn Off MySQL’s prefer_ordering_index? A Deep Dive
Top Architect
Top Architect
Nov 29, 2025 · Databases

Should You Disable MySQL’s prefer_ordering_index? A Practical Performance Guide

This article examines MySQL’s optimizer_switch ‘prefer_ordering_index’ setting, explains how it influences ORDER BY/GROUP BY queries with LIMIT, demonstrates cases where keeping it ON harms performance due to costly index scans, and provides concrete SQL examples and recommendations to turn it off in most scenarios.

Index Scanfilesortmysql
0 likes · 8 min read
Should You Disable MySQL’s prefer_ordering_index? A Practical Performance Guide
Architect
Architect
Nov 25, 2025 · Databases

When Should You Disable MySQL’s prefer_ordering_index? A Practical Guide

This article explains the purpose of MySQL’s optimizer_switch ‘prefer_ordering_index’, shows how it affects ORDER BY/GROUP BY queries with LIMIT, provides sample tables and procedures, compares EXPLAIN output with the option ON and OFF, and concludes why disabling it is often the safer choice for most workloads.

Index Scanexplainmysql
0 likes · 8 min read
When Should You Disable MySQL’s prefer_ordering_index? A Practical Guide
dbaplus Community
dbaplus Community
Oct 30, 2025 · Databases

When Should You Turn Off MySQL’s prefer_ordering_index? A Deep Dive

This article explains the purpose of MySQL's optimizer_switch prefer_ordering_index, why the default ON can hurt performance on skewed data, and demonstrates with table creation, data‑loading procedures, and EXPLAIN output how turning the option OFF often yields faster queries.

Index Scanfilesortmysql
0 likes · 7 min read
When Should You Turn Off MySQL’s prefer_ordering_index? A Deep Dive
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 10, 2025 · Databases

Why SELECT … FOR UPDATE Still Reads the Primary Key: MySQL Index Scan Deep Dive

This article examines why a SELECT … FOR UPDATE query that appears to use a covering index in MySQL actually performs a table‑row lookup, detailing indirect evidence from performance_schema locks and direct proof through InnoDB source code, and explains the necessity of accessing the primary key for transaction isolation.

Database InternalsIndex ScanInnoDB
0 likes · 9 min read
Why SELECT … FOR UPDATE Still Reads the Primary Key: MySQL Index Scan Deep Dive
Su San Talks Tech
Su San Talks Tech
Sep 19, 2022 · Databases

How InnoDB Locates the First Record in a B‑Tree Scan Range

This article explains why locating a record in a B‑Tree index is crucial for MySQL InnoDB operations, describes scan intervals, index page structures, and details the step‑by‑step binary and sequential search process used to find the first matching record, including performance optimizations.

B-TreeBinary SearchIndex Scan
0 likes · 28 min read
How InnoDB Locates the First Record in a B‑Tree Scan Range
360 Tech Engineering
360 Tech Engineering
Jan 7, 2019 · Databases

SQL Query Analysis and Access Path Strategies

This article explains how relational optimizers validate, analyze, and transform SQL statements into executable code, detailing the four-step optimization process, query‑analysis factors, cost‑based access‑path selection, table scans, index lookups, and the role of data prefetching in improving performance.

Access PathDatabase PerformanceIndex Scan
0 likes · 12 min read
SQL Query Analysis and Access Path Strategies
dbaplus Community
dbaplus Community
Sep 19, 2017 · Databases

Why PostgreSQL Misestimates Rows When Types Are Cast – and How to Fix It

A recent production issue showed that PostgreSQL dramatically over‑estimated row counts because filter predicates performed implicit type casts, leading to sequential scans and 18‑second queries, but correcting column types or rewriting the predicates restored accurate estimates and reduced execution time to under a second.

Index ScanPostgreSQLQuery Planning
0 likes · 8 min read
Why PostgreSQL Misestimates Rows When Types Are Cast – and How to Fix It
ITPUB
ITPUB
Nov 14, 2016 · Databases

Optimizing Large‑Scale Oracle Queries with Temporary Tables: Strategies and Trade‑offs

This article examines a high‑volume Oracle query scenario, critiques the current multi‑IN approach, and presents three alternative solutions—including a single‑SQL join, a UNION ALL view, and the use of global temporary tables—detailing their performance implications and practical trade‑offs.

Database PerformanceIndex ScanOracle
0 likes · 10 min read
Optimizing Large‑Scale Oracle Queries with Temporary Tables: Strategies and Trade‑offs
ITPUB
ITPUB
Jul 11, 2016 · Databases

Inside PostgreSQL: How the Database Kernel Works and Can Be Extended

This article explains PostgreSQL's kernel architecture, from client connection handling through parsing, rewriting, planning, and execution, illustrates scan and join algorithms, shows how to extend the kernel and build clustered deployments, and introduces Foreign Data Wrappers for integrating external data sources.

ClusterForeign Data WrapperIndex Scan
0 likes · 13 min read
Inside PostgreSQL: How the Database Kernel Works and Can Be Extended
dbaplus Community
dbaplus Community
Nov 18, 2015 · Databases

Demystifying DB2 Optimizer: How Cost Models Shape Query Performance

This article explains the inner workings of the DB2 optimizer, its four-step processing flow, cost‑based decision making, and detailed examples comparing full‑table and index scans, followed by practical tuning tips and a Q&A session for real‑world query optimization.

Cost ModelDB2Database Performance
0 likes · 19 min read
Demystifying DB2 Optimizer: How Cost Models Shape Query Performance