DQN-Guided Rule-Class Selection for Search-Based Query Rewriting
| dc.contributor.author | Liu, Shengchen | |
| dc.contributor.supervisor | Kantere, Verena | |
| dc.date.accessioned | 2026-09-16T22:17:44Z | |
| dc.date.issued | 2026-09-16 | |
| dc.description.abstract | Query rewrite transforms a SQL query into a semantically equivalent form expected to execute more efficiently. Search-based rewriters such as LearnedRewrite organize alternative rewrite orders as a policy tree and explore it with Monte Carlo Tree Search. In the publicly released LearnedRewrite implementation, expansion enumerates every applicable rule class at each search node, and each candidate triggers a rewrite execution and a PostgreSQL EXPLAIN call, making expansion a measurable contributor to rewrite latency. This thesis formulates expansion-time rule-class selection as a state-dependent decision problem and proposes DQRS (DQN-Guided Rule-Class Selection), which ranks the legal rule classes at each state with a Deep Q-Network and forwards only the top k to the unchanged rewriter routine. On an in-domain workload derived from the TPC-H benchmark at k = 1, average rewrite latency falls from 15.3 ms to 4.0 ms and average policy-tree size from 9.9 to 2.4 nodes, reductions of about 74% and 76%. Average cost reduction is preserved while the median falls from 156 to 103, so the method exposes an explicit operating point on the efficiency–quality trade-off rather than dominating the baseline. Under an identical legal-action mask and at the same node count, learned ranking attains a median cost reduction of 103 against 13 for random selection. Transferred without retraining to a workload derived from the TPC-DS benchmark at k = 4, DQRS reduces latency by about 24% and node count by about 30% at unchanged cost reduction, but in this saturated regime it is not distinguishable from random selection. The baseline throughout is the released implementation, which omits the learned cost estimator of the original paper, and all quality figures are optimizer-side estimates rather than measured execution time. Extending the evaluation from optimizer estimates to end-to-end execution time is the primary direction for future work. | |
| dc.identifier.uri | http://hdl.handle.net/10393/52054 | |
| dc.language.iso | en | |
| dc.publisher | Université d'Ottawa / University of Ottawa | |
| dc.subject | Query rewrite | |
| dc.subject | SQL query optimization | |
| dc.subject | Deep reinforcement learning | |
| dc.subject | Deep Q-Network | |
| dc.subject | Rule selection | |
| dc.subject | Database management systems | |
| dc.subject | Policy tree search | |
| dc.title | DQN-Guided Rule-Class Selection for Search-Based Query Rewriting | |
| dc.type | Thesis | en |
| thesis.degree.discipline | Génie / Engineering | |
| thesis.degree.level | Masters | |
| thesis.degree.name | MCS | |
| uottawa.department | Science informatique et génie électrique / Electrical Engineering and Computer Science |
Fichiers
Trousse originale
1 - 1 sur 1
En cours de chargement...
- Nom:
- Liu_Shengchen_2026_thesis.pdf
- Taille:
- 1.76 MB
- Format:
- Adobe Portable Document Format
Trousse de licence
1 - 1 sur 1
En cours de chargement...
- Nom:
- license.txt
- Taille:
- 2.51 KB
- Format:
- Item-specific license agreed upon to submission
- Description:
