一种基于树型Transformer的索引效益估计模型
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

国家自然科学基金(62272066);四川省科技计划(2025ZNSFSC0044,2025YFHZ0194);成都市区域科技创新合作项目(2025-YF11-00050-HZ);网络空间安全教育部重点实验室及河南省网络空间态势感知重点实验室开放基金(KLCS20240106);网络空间大数据智能安全教育部重点实验室开放基金(CBDIS202404)


A tree-based Transformer model for index benefit estimation
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    在关系型数据库领域,索引选择是提升查询性能的关键,准确高效地估计候选索引配置效益对优化查询性能至关重要.针对传统基于"what-if"调用工具的代价估计方法存在效率低下、准确性不足以及难以应对大规模复杂查询负载等问题,提出一种基于树型 Transformer 的索引效益估计模型Tree-IBE(Tree-based Transformer Index Benefit Estimation Model),利用Transformer架构的自注意力机制和高效的特征编码技术,能够直接从查询计划和索引配置中学习索引代价,无需依赖"what-if"调用工具.Tree-IBE首先通过查询计划节点编码器和索引编码器进行特征编码,全面捕捉查询计划和索引配置的关键信息,然后利用树型Transformer层的多头注意力机制,并行从多个表示子空间捕捉执行计划节点间的依赖关系,精准表示执行计划的结构和性能特性,结合轻量级的估计层输出估计的索引效益.在JOB、TPC-H和TPC-DS三个标准数据集上验证模型的性能,实验结果表明:Tree-IBE 在准确性和效率上均优于现有方法,尤其在复杂查询负载下具有显著优势.

    Abstract:

    In the field of relational databases,index selection is key to improving query performance.Accurately and efficiently estimating the benefits of candidate index configurations is crucial for query optimization.Traditional cost estimation methods based on "what-if" call tools suffer from low efficiency and insufficient accuracy,making it difficult to meet the requirements of large-scale and complex query workloads.Therefore,this paper proposes a Tree-based Transformer Index Benefit Estimation model (Tree-IBE).The model utilizes the self-attention mechanism of the Transformer architecture and efficient feature encoding techniques to directly learn index costs from query plans and index configurations,without relying on "what-if" call tools.Tree-IBE first performs feature encoding via a query plan node encoder and index encoder,comprehensively capturing key information from both.Then,it uses the multi-head attention mechanism of the Tree-Transformer layer to capture the dependencies between execution plan nodes in parallel across multiple representation subspaces.This allows it to accurately model the structure and performance characteristics of the execution plan before a lightweight estimation layer outputs the estimated index benefits.Finally,the model's performance is evaluated on three standard datasets:JOB,TPC-H,and TPC-DS.The results show that Tree-IBE outperforms existing methods in both accuracy and efficiency,particularly in complex query workloads.

    参考文献
    相似文献
    引证文献
引用本文

唐榕敏,何兵,董文安,乔少杰,刘亿臻,韩楠.一种基于树型Transformer的索引效益估计模型[J].南京信息工程大学学报(自然科学版),2026,18(4):476-489
TANG Rongmin, HE Bing, DONG Wenan, QIAO Shaojie, LIU Yizhen, HAN Nan. A tree-based Transformer model for index benefit estimation[J]. Journal of Nanjing University of Information Science & Technology, 2026,18(4):476-489

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-05-06
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2026-07-14
  • 出版日期:
文章二维码

地址:江苏省南京市宁六路219号    邮编:210044

联系电话:025-58731025    E-mail:nxdxb@nuist.edu.cn

南京信息工程大学学报 ® 2026 版权所有  技术支持:北京勤云科技发展有限公司