Hacker News new | past | comments | ask | show | jobs | submit login

I wonder if the planner can look at stats of full query execution in addition to the table stats. That way it can fall back to a previous plan (or previous table stats) if things get crazy.



No, we don't collect any optimizer stats during query execution. It's trickier that it seems, because (a) collecting the stats is actually pretty expensive, and (b) when using indexes, you may actually see just a tiny part of the data.

There have been some discussions about "learning" and correcting some of the estimates, but there was no patch so far.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: