Intelligent shard key selector based on learning SQL queries