一个简单的group by 语句竟然报错。好像是超过了限制条件。
语句
select a07, a22, a14, count(*) from K_HN..t_wj_data
where flow_id = '4701'
and is_last_record = 1
group by a07, a22, a14
having count(*) > 1
报错
Server Message: Number 414, Severity 16
Server 'BJFYDS', Line 1:
The current query would generate a key size of 765 for a work table. This exceeds the maximum allowable limit of 600.
我猜,是由于group的字段长度总和超过了限制条件 600。
有时间再具体看看