Not sure I'd put a production site on a overclocked machine, but yeah the i7-7700K will most likely spit out results faster in similarly configured machines, the dual 5620 will have some help since it has 16 threads vs the 8 from the 7700, and it's cpu cache is 50% larger.
Sql queries are more about tweaking your application to make sure it's running at 100%, you can always add more memory since mysql will use more if given more. Also your drive that is holding the database can make a huge difference in how fast you get results. And most importantly make sure you really need to hit the database, a good caching solution can speed up a site 10x with no sql changes at all.
