[논문 리뷰] ResQ: Realistic Performance-Aware Query Generation
ResQ는 익명화된 프로덕션 트레이스로부터 쿼리별 실행 대상과 연산자 분포를 충실히 재현하는 실행 가능한 SQL 워크로드를 생성하며, 두 단계의 쿼리 그래프 생성, 반복 인식 쿼리 풀, 및 비용 인식 최적화를 사용한다.
Database research and development rely heavily on realistic user workloads for benchmarking, instance optimization, migration testing, and database tuning. However, acquiring real-world SQL queries is notoriously challenging due to strict privacy regulations. While cloud database vendors have begun releasing anonymized performance traces to the research community, these traces typi- cally provide only high-level execution statistics without the origi- nal query text or data, which is insufficient for scenarios that require actual execution. Existing tools fail to capture fine-grained perfor- mance patterns or generate runnable workloads that reproduce these public traces with both high fidelity and efficiency. To bridge this gap, we propose ResQ, a fine-grained workload synthesis sys- tem designed to generate executable SQL workloads that faithfully match the per-query execution targets and operator distributions of production traces. ResQ constructs execution-aware query graphs, instantiates them into SQL via Bayesian Optimization-driven pred- icate search, and explicitly models workload repetition through reuse at both exact-query and parameterized-template levels. To ensure practical scalability, ResQ combines search-space bounding with lightweight local cost models to accelerate optimization. Ex- periments on public cloud traces (Snowset, Redset) and a newly released industrial trace (Bendset) demonstrate that ResQ signif- icantly outperforms state-of-the-art baselines, achieving 96.71% token savings and a 86.97% reduction in runtime, while lowering maximum Q-error by 14.8x on CPU time and 997.7x on scanned bytes, and closely matching operator composition.
연구 동기 및 목표
- 프라이버시 제약 하에서 클라우드 데이터베이스 벤치마킹에 필요한 현실적이고 쿼리별 워크로드의 필요성을 동기화한다.
- 익명화된 트레이스로부터 구조와 실행 목표를 만족하는 쿼리를 생성하는 문제를 형식화한다.
- 원본 데이터에 접근하지 않고 실행 가능 SQL을 산출하는 두 단계의 성능 인식 생성 파이프라인을 제안한다.
- 대규모 벤치마크를 지원하기 위해 가벼운 비용 모델로 반복 인식 합성 및 확장 가능한 생성을 가능하게 한다.
제안 방법
- 쿼리를 SQL 구문 이전의 연산자와 데이터 흐름을 포착하는 실행 지향 그래프(Query Graph G)로 표현한다.
- 두 단계 프로세스를 사용한다: Phase I는 데이터 접근 및 비용 타당성으로 탐색 공간을 한정하여 실행 가능한 기본 그래프를 생성하고, Phase II는 프레디케이트 검색을 수행하여 CPU 시간 타깃과 일치시킨다.
- 전용 번역기를 통해 쿼리 그래프의 간선을 실행 가능한 SQL로 구체화하고, 방언별 세부 정보에 대해 LLM의 도움을 받는다.
- 가볍고 지역적인 성능 모델을 활용해 CPU 시간을 추정하고 베이지안 최적화를 안내하여 비용이 큰 실행을 줄인다.
- 정확한 재사용과 매개변수화 재사용으로 반복을 회수하고 효율성을 개선하기 위해 쿼리 풀을 유지한다.
실험 결과
연구 질문
- RQ1익명화된 트레이스로부터 구조 인식 제약과 실행 목표를 충족하는 실행 가능한 SQL 쿼리를 합성하는 방법은?
- RQ2데이터 인식 두 단계 그래프 생성 approach가 반복성 및 연산자 분포를 재현하는 고충실도 워크로드를 생성할 수 있는가?
- RQ3대규모로 확장 가능한 프라이버시 보존 워크로드 생성을 가능하게 하는 메커니즘(예: 현지 비용 모델, BO, 쿼리 풀)은 무엇인가?
주요 결과
- ResQ는 대상 트레이스에 대한 높은 충실도를 달성하면서 비용을 줄인다: 최대 96.71% 토큰 절감 및 86.97% 런타임 감소.
- ResQ은 CPU 시간과 스캔된 바이트에서 최대 Q-오류를 각각 14.8×, 997.7× 감소시켰다.
- ResQ는 연산자 구성에 근접하게 일치하고 거친 창(window) 기반 접근을 넘어 쿼리별 타깃 매칭에 대해 미세한 조정이 가능하다.
- Phase I 데이터 인식 한정은 predicate tuning 이전에 스캔된 바이트를 효과적으로 가지치기하여 실행 불가능한 그래프를 줄인다.
- Phase II는 predicate tuning을 위한 두 단계의 베이지안 최적화를 사용하여 대상 CPU 시간 근처의 탐색과 활용을 개선한다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.