1. 首页
  2. 数据库
  3. 其它
  4. PV、UV的几种写法

PV、UV的几种写法

上传者: 2021-02-01 08:19:44上传 PDF文件 20.33KB 热度 14次
一、HQL写法 uv: count(distinct)太影响性能,以下为改进: select tmp.shop,count(1) as uv from (select user_id,shop from second_visit group by user_id,shop)tmp group by shop; pv select shop,count(uid) from second_visit group by shop; 二、MR写法 待填坑 三、spark写法 val conf = new SparkConf() conf.setAppName(pv_uv)
用户评论