wuziniu / FactorJoin

A new cardinality estimation scheme for join query estimation
31 stars 14 forks source link

How to do single table query inferencing with imdb-light model #2

Open caiji762 opened 3 weeks ago

caiji762 commented 3 weeks ago

I'm using imdb-light's data to train the model, and I have no problem doing tests on 70 query statements in the imdb-light workload, but I have some problems testing the scale and synthetic datasets (using the same base data as imdb-light), mainly because these two workloads contain queries to a single table. How can I solve this? Thanks for your help!

wuziniu commented 3 weeks ago

FactorJoin is a framework for join queries and allows plugging-in different single table estimators, so the current implementation only works for join queries. To handle single-table queries, you can use the trained BayesCard model for that corresponding table. https://github.com/wuziniu/FactorJoin/blob/master/Evaluation/training.py#L38 provides an example of how to use a BayesCard model to estimate it.