YHYinjun Han

Yinjun Han

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article

Previous Organizations / Institutes

The organizations / institutes from the scholar's other articles in the past ten years


Yinjun Han has a total of 20 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    MoEPlan: A Lazy Learned Query-Selection Optimizer via Mixture of Optimizer Experts

    by Suchen Liu, Jun Gao, Yinjun Han, Yang Lin

    Learned plan-selection optimizers combine the conventional and learned approaches by generating diverse candidate plans through multiple optimizers and selecting the best via value models. However, these eagerly-generated plans incur high optimization overhead, as they require multiple invocations of the native optimizer. In this article, we propose MoEPlan, which learns a routing policy to select top- \( k \) experts (different optimizers) via query embedding and learnable parameters, avoiding pre-generation of candidate plans. Our approach integrates two optimization strategies: (1) a virtual ideal expert to guide the best plan selection through learned plan similarities, and (2) a query-irrelevant expert sampling strategy to balance the training cost and effectiveness of selected plans in the first round of expert selection. Furthermore, we design a two-phase training process: the first phase pre-trains the model with complete expert feedback, while the second phase filters the full expert pool to yield a promising subset and refines the selection to pinpoint the optimal expert. Experimental studies show that MoEPlan, with only two plans generated, takes less inference time, while still producing more efficient plans than other learned plan-selection optimizers.

  • Open Access

    Divo: Learning a Stable and Effective Query Optimizer with a Diverse Workload

    by Tianyi Chen, Jun Gao, Yaofeng Tu, Yang Lin, Mo Xu, Yinjun Han

    Learned query optimizers (LQOs) have shown remarkable progress in recent years. Despite achieving competitive performance compared with traditional methods, current LQOs struggle to retain stability and generate efficient plans when exposed to workloads with substantial diversity, presenting a major challenge in real-world deployment. Divo is a learned query optimizer designed to overcome performance degradation observed in training on diverse workloads. First, Divo proposes a template-evolving query generator to provide diverse queries for sufficient training. By modifying and combining query templates, the query generator synthesizes 3,000 informative new queries with fidelity to existing workloads. Second, Divo establishes a two-phase model training pipeline to enhance RL training with numerous plans collected in advance. We collected over 100,000 plans from public workloads and diverse generated queries to form static experiences, which are effectively leveraged on various training workload configurations to enhance Divo's plan generation through augmenting auxiliary components. Third, Divo proposes a diversity-aware loss function to learn from diversified input queries stably. By learning to predict probability distributions of latencies, Divo flexibly handles various queries and tolerates inconsistent ground truth latencies from training queries. We evaluate Divo's performance on PostgreSQL using a complicated mixed workload of JOB, DSB, Extended JOB, Stack, and generated queries, with three different training and testing workload configurations split by template. Experiments demonstrate Divo's advantage on total execution latency with a 1.3× speedup relative to PostgreSQL, which is 14.9× better than six existing LQOs on average.


  • Open Access

    LLM4Hint: Leveraging Large Language Models for Hint Recommendation in Offline Query Optimization

    by Suchen Liu, Jun Gao, Yinjun Han, Yang Lin

    Query optimization is essential for efficient SQL query execution in DBMS, and remains attractive over time due to the growth of data volumes and advances in hardware. Existing traditional optimizers struggle with the cumbersome hand-tuning required for complex workloads, and the learning-based methods face limitations in ensuring generalization. With the great success of Large Language Model (LLM) across diverse downstream tasks, this paper explores how LLMs can be incorporated to enhance the generalization of learned optimizers. Though promising, such an incorporation still presents challenges, mainly including high model inference latency, and the substantial fine-tuning cost and suboptimal performance due to inherent discrepancy between the token sequences in LLM and structured SQL execution plans with rich numerical features. In this paper, we focus on recurring queries in offline optimization to alleviate the issue of high inference latency, and propose \textbf{LLM4Hint} that leverages moderate-sized backbone LLMs to recommend query optimization hints. LLM4Hint achieves the goals through: (i) integrating a lightweight model to produce a soft prompt, which captures the data distribution in DBMS and the SQL predicates to provide sufficient optimization features while simultaneously reducing the context length fed to the LLM, (ii) devising a query rewriting strategy using a larger commercial LLM, so as to simplify SQL semantics for the backbone LLM and reduce fine-tuning costs, and (iii) introducing an explicit matching prompt to facilitate alignment between the LLM and the lightweight model, which can accelerate convergence of the combined model. Experiments show that LLM4Hint, by leveraging the LLM's stronger capability to understand the query statement, can outperform the state-of-the-art learned optimizers in terms of both effectiveness and generalization.


  • DDUC: an erasure-coded system with decoupled data updating and coding

    by Yaofeng Tu, Rong Xiao, Yinjun Han, Zhenghua Chen, Hao Jin, Xuecheng Qi, Xinyuan Sun

    In distributed storage systems, replication and erasure code (EC) are common methods for data redundancy. Compared with replication, EC has better storage


  • JG2Time: A Learned Time Estimator for Join Operators Based on Heterogeneous Join-Graphs

    by Hao Miao, Jiazun Chen, Yang Lin, Mo Xu, Yinjun Han, Jun Gao