Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table cost through workload-based learning #58131

Open
elsa0520 opened this issue Dec 10, 2024 · 0 comments
Open

Table cost through workload-based learning #58131

elsa0520 opened this issue Dec 10, 2024 · 0 comments
Assignees
Labels
type/feature-request Categorizes issue or PR as related to a new feature.

Comments

@elsa0520
Copy link
Contributor

elsa0520 commented Dec 10, 2024

Summary

Table cost learning is the first workload based learning feature we build. It measures each table's contribution to workload cost, enabling tools to assess table significance relative to user workloads. For example, "auto analyze" can use this cost to rank tables in its priority queue. The write path is based on a async kernel process that analyze the workload (statement summary) and record the "cost" of each table used in the workload in a ew metadata table. The read path involves caching and updating the new metadata table and consuming the information by the priority queue system.

Catagory

TableCost is one kind of feedback feature in the whole workload-based learning picture

Image

TableCost Overview

Producer part —— Tablecost worker

  1. Load workload data from storage "statement summary table"
  2. Analyze and compute the tablecost value
  3. Write the tablecost into storage "workload values table"
    Consumer part —— Feedback cache worker
  4. Cache the feedback value —— table cost from storage into memory
  5. Stats priority queue uses the table cost directly
    Storage —— New Workload table
  6. Used to save all of the workload values(table cost now) in this table

Only data dependency between the producer part and the consumer part.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant