Selective Use of Yannakakis' Algorithm to Improve Query Performance: Machine Learning to the Rescue