Tag

User Variables

1 views collected around this technical thread.

Top Architect
Top Architect
Dec 7, 2022 · Databases

Ranking Student Scores with MySQL: Table Setup, User Variables, and Window Functions

This article demonstrates how to create a score table in MySQL, insert sample data, and implement ranking of students using both user‑defined variables for pre‑8.0 versions and modern window functions like RANK(), DENSE_RANK() and ROW_NUMBER() to handle ties and gaps.

MySQLRankingSQL
0 likes · 7 min read
Ranking Student Scores with MySQL: Table Setup, User Variables, and Window Functions
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 10, 2021 · Databases

Understanding MySQL 8.0 Derived Condition Pushdown Optimization and Its Impact on User Variables

The article explains MySQL 8.0.22's new optimizer_switch variable derived_condition_pushdown, shows how enabling it can cause unexpected results with user‑defined variables in outer WHERE clauses, provides test cases, explains the underlying behavior, and offers three practical solutions.

MySQLOptimizer SwitchPerformance
0 likes · 7 min read
Understanding MySQL 8.0 Derived Condition Pushdown Optimization and Its Impact on User Variables