数据有2张表
1:z_user
2:z_businesslog
z_user 表中有locationcode作为和z_businesslog中的locationcode连接使用,并且z_user中有字段atime(开户时间),要求计算atime到当前日期的天数,并且统计z_user中的每条数据在z_businesslog中的统计数量,我写了如下SQL语句,但是执行效率相当低,大概需要33秒左右,其中z_user有数据300条,z_businesslog中有数据3W条多,请大家帮忙分析一下: z_user
1:z_user
2:z_businesslog
z_user 表中有locationcode作为和z_businesslog中的locationcode连接使用,并且z_user中有字段atime(开户时间),要求计算atime到当前日期的天数,并且统计z_user中的每条数据在z_businesslog中的统计数量,我写了如下SQL语句,但是执行效率相当低,大概需要33秒左右,其中z_user有数据300条,z_businesslog中有数据3W条多,请大家帮忙分析一下: z_user