"Sql-Features"
- MySQL 8.0 Modern SQL:CTE / window function / JSON_TABLE 的行為與 PostgreSQL 對應特性的差異
MySQL 8.0 補齊 CTE、window function、lateral derived table、JSON_TABLE、hash join 等現代 SQL 特性。本文涵蓋這些特性的 production 場景、跟 PostgreSQL 對應特性的行為差異(特別是 JSON_TABLE vs PG JSONB / jsonb_path_query)、5.7 → 8.0 的配置注意事項,以及 CTE 多次引用的 materialize 行為、window function sort spill、JSON_TABLE 跟 generated column 取捨、hash join 沒觸發、recursive CTE 深度上限等踩雷
- PostgreSQL SQL Features:PG 早就有的、MySQL 8.0 才補的、PG 仍領先的
PG 在 SQL features 上長期領先 MySQL — CTE / window function / lateral / partial index / FTS / JSONB / GIN index / materialized view 在 PG 早 5-15 年。MySQL 8.0(2018)補多數但 *index / storage / extension* 層仍是 PG 結構優勢。本文整理 PG 早期就有的特性、MySQL 8.0 補的差異、PG 仍領先的、跟 MySQL modern-sql-features sibling 反向視角