문자 재전송 쿼리 성능개선

This commit is contained in:
itn 2023-10-19 18:50:13 +09:00
parent d4d432b76e
commit 479353e3a3

View File

@ -267,6 +267,7 @@
, orderByCode AS orderByCode , orderByCode AS orderByCode
, RESULT AS msgResult , RESULT AS msgResult
, sendKind AS sendKind , sendKind AS sendKind
, MSG_KIND AS msgKind
FROM FROM
( SELECT ( SELECT
B.USER_ID B.USER_ID
@ -291,6 +292,7 @@
, A.RSLT_CODE , A.RSLT_CODE
, A.RSLT_CODE2 , A.RSLT_CODE2
, B.SEND_KIND as sendKind , B.SEND_KIND as sendKind
, B.MSG_KIND
, CASE , CASE
WHEN B.MSG_TYPE = '6' WHEN B.MSG_TYPE = '6'
AND B.FILE_CNT > 0 AND B.FILE_CNT > 0
@ -413,10 +415,10 @@
</isNotEmpty> </isNotEmpty>
<isNotEmpty property="msgSentType"> <isNotEmpty property="msgSentType">
<isEqual property="msgSentType" compareValue="01" > <isEqual property="msgSentType" compareValue="01" >
AND SUBSTR(SMS_TXT, 1, 8) != '(선거운동정보)' AND MSG_KIND != 'C'
</isEqual> </isEqual>
<isEqual property="msgSentType" compareValue="02" > <isEqual property="msgSentType" compareValue="02" >
AND SUBSTR(SMS_TXT, 1, 8) = '(선거운동정보)' AND MSG_KIND = 'C'
</isEqual> </isEqual>
</isNotEmpty> </isNotEmpty>
GROUP BY MSG_GROUP_ID GROUP BY MSG_GROUP_ID