算法对比:
使用方法:
SELECT town,max(price) AS max_price,any(population) AS population
FROM uk_xxx_paid
JOIN uk_xxx_table
ON lower(uk_price_paid.town) = lower(uk_populations_table.city)
GROUP BY town
ORDER BY max_price DESC
SETTINGS join_algorithm = 'hash';
每个算法试试测试一下性能,如果没效果,考虑一下宽表。