浏览代码

feat:sql优化

wangchuanjin 2 年之前
父节点
当前提交
4be53f2084

+ 1 - 1
pushentchange/src/match/matcher/membermatch.go

@@ -33,7 +33,7 @@ func NewMemberUser(lastTime int64) *MemberUser {
 	}
 }
 func (m *MemberUser) LoadFollowEnts() bool {
-	q := `select * from follow_ent_monitor`
+	q := `select id,s_userid,s_entname,l_createtime from follow_ent_monitor`
 	if len(Config.TestIds) > 0 {
 		q += ` where s_userid in ('` + strings.Join(Config.TestIds, "','") + `')`
 	}

+ 1 - 1
pushfollowent/src/match/matcher/match.go

@@ -24,7 +24,7 @@ func NewFMatchUser() *FMatchUser {
 }
 
 func (m *FMatchUser) OnceUserBatch(batchIndex int, lastId *string, count *int64) (int, map[string]*FollowInfo) {
-	q := `select * from ` + FollowEnt
+	q := `select id,s_userid,s_entname,l_createtime from ` + FollowEnt
 	if len(Config.TestIds) > 0 {
 		q += ` where s_userid in ('` + strings.Join(Config.TestIds, "','") + `')`
 	} else {

+ 1 - 1
pushfollowproject/src/match/matcher/match.go

@@ -175,7 +175,7 @@ func (m *FMatchUser) Match(followInfos map[string]*FollowInfo) {
 
 //
 func (m *FMatchUser) OnceUserBatch(batchIndex int, lastId *string, count *int64) (int, map[string]*FollowInfo) {
-	q := `select * from ` + FollowProject
+	q := `select id,s_id,s_userid,l_createtime,l_lastpushtime from ` + FollowProject
 	if len(Config.TestIds) > 0 {
 		q += ` where s_userid in ('` + strings.Join(Config.TestIds, "','") + `')`
 	} else {