我现在使用斜率一进行推荐。
如何从结果中排除访问过的项目?
我不能简单地通过not in (visited_id_list)
过滤那些访问过的来做到这一点,因为它会对老用户产生可伸缩性问题!
我想出了一个没有的解决方案not in
:</p>
select b.property,count(b.id) total from propertyviews a
left join propertyviews b on b.cookie=a.cookie
left join propertyviews c on c.cookie=0 and b.property=c.property
where a.property=1 and a.cookie!=0 and c.property is null
group by b.property order by total;