From 55fe8f570741ab67373b193c67e4585d75f9b9af Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 22 Aug 2021 16:20:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96WAF=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/db/models/http_access_log_dao.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/db/models/http_access_log_dao.go b/internal/db/models/http_access_log_dao.go index 008f33c4..90e467be 100644 --- a/internal/db/models/http_access_log_dao.go +++ b/internal/db/models/http_access_log_dao.go @@ -255,6 +255,7 @@ func (this *HTTPAccessLogDAO) listAccessLogs(tx *dbs.Tx, lastRequestId string, s } } else { query.Attr("remoteAddr", ip) + query.UseIndex("remoteAddr") } } else { query.Where("JSON_EXTRACT(content, '$.remoteAddr')=:ip1"). @@ -270,6 +271,7 @@ func (this *HTTPAccessLogDAO) listAccessLogs(tx *dbs.Tx, lastRequestId string, s Param("host2", domain) } else { query.Attr("domain", domain) + query.UseIndex("domain") } } else { query.Where("JSON_EXTRACT(content, '$.host')=:host1").