Learning to Speed Up Query Planning in Graph Databases