cmu-db / peloton

The Self-Driving Database Management System
http://pelotondb.io
Apache License 2.0
2.03k stars 623 forks source link

Join cost calculation uses default value of -1 #1353

Open GustavoAngulo opened 6 years ago

GustavoAngulo commented 6 years ago

It seems that in certain cases during three way joins, when one of the children of a join is a join itself, its cardinality estimate will be -1, so the cost model will use that -1 value to compute the cost for the overall join (which is bad). This is most likely due to the optimizer not properly updating the cardinality of intermediate joins here

GustavoAngulo commented 6 years ago

Looks like we're not generating stats immediately after creating new groups, the DeriveStats task is being executed too late. My guess is this is most likely being caused because of group expression equivalence not working properly. This should hopefully (fingers crossed) disappear when we fix that.

chenboy commented 6 years ago

Is this blocking you now? I think I'll have time to look at the duplicate group expression bug in the next few days.

GustavoAngulo commented 6 years ago

Possibly, this might affect our benchmarking results for our class project, but its hard to say.