databend icon indicating copy to clipboard operation
databend copied to clipboard

feat: task_advice system table

Open bohutang opened this issue 2 years ago • 5 comments

Summary

Add a system table for advice the background serivice:

catalog_name database_name table_name task_type need_run task_sql reason(variant)
default db xx COMPACT 1 optimize table xx compact limit 3 "{status in json}"
default db xx AGGREGATING_INDEX 0 refresh aggregating index xx_agg_idx limit 10 "{status in json}"
default db yy ADD_CLUSTER_KEY 1 alter table yy cluster by(col1) "{status in json}"

bohutang avatar Jan 15 '24 04:01 bohutang

@ZhiHanZ this task_advice table need your advices :/

bohutang avatar Jan 15 '24 04:01 bohutang

SHOW ADVICES FOR TABLE xxx;

flaneur2020 avatar May 17 '24 09:05 flaneur2020

The compaction service needs to know the endpoints of the query nodes to fetch the result from advice table. But the query nodes are serverless and multi-tenant.

Since the compaction service must depend on S3 and metaservice, why not fetch the advice in the compaction service on schedule?

sundy-li avatar May 18 '24 13:05 sundy-li

why not fetch the advice in the compaction service on schedule?

We can execute the advices in the cloud background service. However, this issue extends beyond just background services; Aims to give some advices for the tables in databases, and tell the user how to do next.

bohutang avatar May 19 '24 01:05 bohutang

Reference: Oracle Database Advisors: https://blogs.oracle.com/coretec/post/oracle-database-advisors-overview

bohutang avatar May 19 '24 01:05 bohutang