Sort-Merge Join in SQL databases: Oracle, SQL Server, PostgreSQL
use-the-index-luke.com/sql/join/sort-merge-joinSort-merge joins do not need indexes on the join predicates.
MySQL does not support sort-merge joins at all.
Partial Objects in ORMs: loading a subset of properties
use-the-index-luke.com/sql/join/hash-join-partial-objectsIndex the independent
where
predicates to improve hash join performance.
Indexing join predicates doesn’t improve hash join performance.
Indexing a hash join is independent of the join order.
Select fewer columns to improve hash join performance.
Hash joins do not need indexes on the join predicates. They use the hash table instead.
A hash join uses indexes only if the index supports the independent predicates.
Reduce the hash table size to improve performance; either horizontally (less rows) or vertically (less columns).
Hash joins cannot perform joins that have range conditions in the join predicates.
Tuning SQL LIKE using indexes
use-the-index-luke.com/sql/where-clause/searching-for-ranges/like-performance-tuningAvoid LIKE expressions with leading wildcards (e.g., '%TERM').
Indexing SQL range conditions less than, greater than and between
use-the-index-luke.com/sql/where-clause/searching-for-ranges/greater-less-between-tuning-sql-access-filter-predicatesRule of thumb: index for equality first—then for ranges.