addmrpt_1_113_115

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 8

ADDM Report for Task 'TASK_378'

-------------------------------

Analysis Period
---------------
AWR snapshot range from 113 to 115.
Time period starts at 2024-11-04 07:58:14.
Time period ends at 2024-11-04 09:58:17.

Analysis Target
---------------
Database 'ORCLCDB' with DB ID 2954628263.
Database version 21.0.0.0.0.
ADDM performed an analysis of instance ORCLCDB1, numbered 1 and hosted at
db-01.localdomain.
ADDM detected that the database type is MULTITENANT DB.

Activity During the Analysis Period


-----------------------------------
Total database time was 8545 seconds.
The average number of active sessions was 1.19.

Summary of Findings
-------------------
Description Active Sessions Recommendations
Percent of Activity
------------------ ------------------- ---------------
1 Top SQL Statements .87 | 73.68 4
2 PL/SQL Execution .53 | 44.36 2

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Findings and Recommendations


----------------------------

Finding 1: Top SQL Statements


Impact is .87 active sessions, 73.68% of total activity.
--------------------------------------------------------
SQL statements consuming significant database time were found. These
statements offer a good opportunity for performance improvement.

Recommendation 1: SQL Tuning


Estimated benefit is .29 active sessions, 24.44% of total activity.
-------------------------------------------------------------------
Action
Run SQL Tuning Advisor on the SELECT statement with SQL_ID
"5u0dmqrg9qbxb".
Related Object
SQL statement with SQL_ID 5u0dmqrg9qbxb.
SELECT LOCATION_CODE, LOCATION_ID, LOCATION_SUBDOMAIN,
LOCATION_AVATAR, LOCATION_NAME, LOCATION_USE_SITE, LOCATION_DISTANCE,
NEWS_CREATE_DATE FROM ( SELECT LOCATION_CODE, ID LOCATION_ID,
SUBDOMAIN LOCATION_SUBDOMAIN, IMAGE LOCATION_AVATAR, NAME
LOCATION_NAME, LOCATION_USE_SITE, LOCATION_DISTANCE, NEWS_CREATE_DATE
FROM( SELECT T.CODE LOCATION_CODE, T.ID, S.SUBDOMAIN, T.IMAGE,
NVL(L.NAME, T.NAME) NAME, GET_DISTANCE(T.GEO_LOCATION, :B4 )
LOCATION_DISTANCE, T.USE_SITE LOCATION_USE_SITE, T.CREATE_DATE
NEWS_CREATE_DATE FROM PLACE T LEFT JOIN PLACE_LANG L ON L.PLACE_ID =
T.ID AND L.PLACE_CODE = T.CODE AND L.LANGUAGE_ID = :B1 LEFT JOIN
SYS_SITE S ON S.ID = T.SITE_ID WHERE T.STATUS = 1 AND T.CODE = :B3
AND T.UNIT_CODE = :B2 ) WHERE LOCATION_DISTANCE < 100 AND
LOCATION_DISTANCE > 0 ORDER BY LOCATION_DISTANCE) WHERE ROWNUM < :B5
Rationale
The SQL statement executed in container TRAVEL with database ID
3696236241.
Rationale
The SQL spent 100% of its database time on CPU, I/O and Cluster waits.
This part of database time may be improved by the SQL Tuning Advisor.
Rationale
Database time for this SQL was divided as follows: 10% for SQL
execution, 0% for parsing, 90% for PL/SQL execution and 0% for Java
execution.
Rationale
SQL statement with SQL_ID "5u0dmqrg9qbxb" was executed 10318 times and
had an average elapsed time of 0.18 seconds.

Recommendation 2: SQL Tuning


Estimated benefit is .28 active sessions, 23.31% of total activity.
-------------------------------------------------------------------
Action
Run SQL Tuning Advisor on the SELECT statement with SQL_ID
"379b8ndxqpb8s".
Related Object
SQL statement with SQL_ID 379b8ndxqpb8s.
SELECT A.CHAR_TV,A.CHAR_0 FROM BODAU_TIENGVIET A
Rationale
The SQL statement executed in container TRAVEL with database ID
3696236241.
Rationale
The SQL spent 100% of its database time on CPU, I/O and Cluster waits.
This part of database time may be improved by the SQL Tuning Advisor.
Rationale
Database time for this SQL was divided as follows: 100% for SQL
execution, 0% for parsing, 0% for PL/SQL execution and 0% for Java
execution.
Rationale
SQL statement with SQL_ID "379b8ndxqpb8s" was executed 15276392 times
and had an average elapsed time of 0.00012 seconds.

Recommendation 3: SQL Tuning


Estimated benefit is .22 active sessions, 18.55% of total activity.
-------------------------------------------------------------------
Action
Run SQL Tuning Advisor on the SELECT statement with SQL_ID
"9ydrtb3qv1k5r".
Related Object
SQL statement with SQL_ID 9ydrtb3qv1k5r.
SELECT T3.* FROM ( SELECT ROWNUM RN, P1.* FROM (SELECT P.* FROM
(SELECT T.* FROM (SELECT PLACE.CODE AS LOCATION_TYPE, PLACE.ID AS
LOCATION_ID, PLACE.GEO_LOCATION, PLACE.ADDRESS ADDRESS, PLACE.IMAGE
AS LOCATION_AVATAR, NVL(PLACE.TO_AVG_PRICE, 0) AS LOCATION_AVG_PRICE,
NVL(PLACE.FROM_AVG_PRICE, 0) AS LOCATION_FROM_AVG_PRICE, PLACE.NAME
LOCATION_NAME, PLACE.COUNT_VIEW AS LOCATION_TOTAL_VIEW,
PLACE.COUNT_LIKE AS LOCATION_TOTAL_LIKE, PLACE.URL_3D,
PLACE.VIDEO_URL, PLACE.AUDIO_URL, GET_DISTANCE(PLACE.GEO_LOCATION,
:B10 ) AS LOCATION_DISTANCE, SYS_SITE.SUBDOMAIN AS
LOCATION_SUBDOMAIN, PLACE.ADDRESS STREET_NO, PROVINCE.NAME AS
PROVINCE_NAME, CITY.NAME CITY_NAME, WARD.NAME WARD_NAME, STREET.NAME
AS STREET_NAME, NULL START_DATE, NULL END_DATE, u'S\0103\0301p
di\00EA\0303n ra' NEWS_STATUS, 0 NEWS_ORDER, NVL(REVIEW_LIKE.ID, 0)
AS LOCATION_LIKE_ID, NVL(ROUND((SELECT AVG(NVL(P.RATE,0)) FROM
PLACE_REVIEW P WHERE P.PLACE_ID = PLACE.ID AND P.PLACE_CODE =
PLACE.CODE AND P.REVIEW_TYPE = 1)/2,1),0) LOCATION_AVG_REVIEW,
(SELECT COUNT(*) FROM PLACE_REVIEW P WHERE P.PLACE_ID = PLACE.ID AND
P.PLACE_CODE = PLACE.CODE AND P.REVIEW_TYPE = 1)
LOCATION_TOTAL_REVIEW, PLACE.GROUP_ID2, PLACE.CREATE_DATE
CREATE_DATE, '' PHONE FROM PLACE LEFT JOIN SYS_SITE ON PLACE.SITE_ID
= SYS_SITE.ID LEFT JOIN LOCATION PROVINCE ON PLACE.PROVINCE_ID =
PROVINCE.ID AND PROVINCE.CODE = 'PROVINCE' LEFT JOIN LOCATION CITY ON
PLACE.CITY_ID = CITY.ID AND CITY.CODE = 'CITY' LEFT JOIN LOCATION
WARD ON PLACE.WARD_ID = WARD.ID AND WARD.CODE = 'WARD' LEFT JOIN
LOCATION STREET ON PLACE.STREET_ID = STREET.ID AND STREET.CODE =
'STREET' LEFT JOIN (SELECT DISTINCT CREATE_USER_ID, PLACE_CODE,
PLACE_ID, ID, ROW_NUMBER() OVER(PARTITION BY PLACE_CODE, PLACE_ID
ORDER BY PLACE_CODE, PLACE_ID) AS RN FROM PLACE_REVIEW WHERE
REVIEW_TYPE = 4 AND STATUS != -1 AND CREATE_USER_ID = :B1 AND RATE =
4 ) REVIEW_LIKE ON REVIEW_LIKE.PLACE_CODE = PLACE.CODE AND
REVIEW_LIKE.PLACE_ID = PLACE.ID AND REVIEW_LIKE.RN = 1 WHERE ((:B9 IS
NULL) OR PLACE.CODE = UPPER(:B9 ) ) AND UPPER(PLACE.UNIT_CODE) =
UPPER(:B8 ) AND PLACE.STATUS = 1 AND (:B7 IS NULL OR :B7 = 0 OR
(TO_CHAR(NVL(PLACE.OPEN_TIME,:B6 ),'HH24:mi:ss') <= :B5 AND
TO_CHAR(NVL(PLACE.CLOSE_TIME,:B6 ),'HH24:mi:ss') >= :B5 )) AND (:B4
IS NULL OR :B4 = 0 OR :B4 = PLACE.TYPE_ID) AND (:B3 IS NULL OR :B3 =
0 OR :B3 <= ROUND((SELECT AVG(NVL(P.RATE,0)) FROM PLACE_REVIEW P
WHERE P.PLACE_ID = PLACE.ID AND P.PLACE_CODE = PLACE.CODE AND
P.REVIEW_TYPE = 1)/2,1)) AND (:B2 IS NULL OR :B2 = '' OR
(BO_DAU_TIENGVIET(PLACE.NAME,1) LIKE '%' || BO_DAU_TIENGVIET(:B2 , 1)
|| '%' AND :B2 IS NOT NULL)) UNION ALL SELECT NEWS.CODE AS
LOCATION_TYPE, NEWS.ID AS LOCATION_ID, NEWS.GEO_LOCATION,
NEWS.ADDRESS ADDRESS, NEWS.IMAGE_URL AS LOCATION_AVATAR, 0 AS
LOCATION_AVG_PRICE, 0 AS LOCATION_FROM_AVG_PRICE, NEWS.TITLE
LOCATION_NAME, 0 LOCATION_TOTAL_VIEW, 0 LOCATION_TOTAL_LIKE, ''
URL_3D, '' VIDEO_URL, '' AUDIO_URL, GET_DISTANCE(NEWS.GEO_LOCATION,
:B10 ) AS LOCATION_DISTANCE, '' AS LOCATION_SUBDOMAIN, '' AS
STREET_NO, '' AS PROVINCE_NAME, '' CITY_NAME, '' WARD_NAME, '' AS
STREET_NAME, NEWS.START_DATE, NEWS.END_DATE, CASE WHEN NEWS.END_DATE
< :B6 THEN u'\0110\0061\0303 k\00EA\0301t th\00FAc' WHEN
NEWS.START_DATE <= :B6 AND NEWS.END_DATE >= :B6 THEN u'\0110ang
di\00EA\0303n ra' WHEN NEWS.START_DATE >= :B6 THEN u'S\0103\0301p
di\00EA\0303n ra' END NEWS_STATUS, CASE WHEN NEWS.END_DATE < :B6 THEN
3 WHEN NEWS.START_DATE <= :B6 AND NEWS.END_DATE >= :B6 THEN 1 WHEN
NEWS.START_DATE > :B6 THEN 2 END NEWS_ORDER, NVL(REVIEW_LIKE.ID, 0)
AS LOCATION_LIKE_ID, 0 LOCATION_AVG_REVIEW, 0 LOCATION_TOTAL_REVIEW,
0 GROUP_ID2, NULL CREATE_DATE , '' PHONE FROM NEWS LEFT JOIN (SELECT
DISTINCT CREATE_USER_ID, NEWS_CODE, NEWS_ID, ID, ROW_NUMBER()
OVER(PARTITION BY NEWS_CODE, NEWS_ID ORDER BY NEWS_CODE, NEWS_ID) AS
RN FROM NEWS_REVIEW WHERE REVIEW_TYPE = 4 AND STATUS != -1 AND
CREATE_USER_ID = :B1 AND RATE = 4 ) REVIEW_LIKE ON
REVIEW_LIKE.NEWS_CODE = NEWS.CODE AND REVIEW_LIKE.NEWS_ID = NEWS.ID
AND REVIEW_LIKE.RN = 1 WHERE NEWS.CODE = UPPER(:B9 ) AND
UPPER(NEWS.UNIT_CODE) = UPPER(:B8 ) AND NEWS.STATUS = 1 AND (:B4 IS
NULL OR (INSTR(:B4 , 0) > 0 OR (INSTR(:B4 , 1) > 0 AND INSTR(:B4 , 2)
= 0 AND INSTR(:B4 , 3) = 0 AND NEWS.END_DATE < :B6 ) OR (INSTR(:B4 ,
2) > 0 AND INSTR(:B4 , 1) = 0 AND INSTR(:B4 , 3) = 0 AND
NEWS.START_DATE <= :B6 AND NEWS.END_DATE >= :B6 ) OR (INSTR(:B4 , 3)
> 0 AND INSTR(:B4 , 2) = 0 AND INSTR(:B4 , 1) = 0 AND NEWS.START_DATE
> :B6 ) OR (INSTR(:B4 , 1) > 0 AND INSTR(:B4 , 2) > 0 AND
(NEWS.END_DATE < :B6 OR (NEWS.START_DATE <= :B6 AND NEWS.END_DATE >=
:B6 )) ) OR (INSTR(:B4 , 1) > 0 AND INSTR(:B4 , 3) > 0 AND
(NEWS.END_DATE < :B6 OR (NEWS.START_DATE > :B6 )) ) OR (INSTR(:B4 ,
3) > 0 AND INSTR(:B4 , 2) > 0 AND (NEWS.START_DATE > :B6 OR
(NEWS.START_DATE <= :B6 AND NEWS.END_DATE >= :B6 )) ) )) AND (:B2 IS
NULL OR :B2 = '' OR (BO_DAU_TIENGVIET(NEWS.TITLE,1) LIKE '%' ||
BO_DAU_TIENGVIET(:B2 , 1) || '%' AND :B2 IS NOT NULL)) UNION ALL
SELECT 'UTILITY' AS LOCATION_TYPE, UTILITY.ID AS LOCATION_ID,
UTILITY.GEO_LOCATION, UTILITY.ADDRESS ADDRESS, UTILITY.IMAGE AS
LOCATION_AVATAR, 0 AS LOCATION_AVG_PRICE, 0 AS
LOCATION_FROM_AVG_PRICE, UTILITY.NAME LOCATION_NAME, 0 AS
LOCATION_TOTAL_VIEW, 0 AS LOCATION_TOTAL_LIKE, '' URL_3D, ''
VIDEO_URL, '' AUDIO_URL, GET_DISTANCE(UTILITY.GEO_LOCATION, :B10 ) AS
LOCATION_DISTANCE, '' AS LOCATION_SUBDOMAIN, UTILITY.ADDRESS
STREET_NO, '' AS PROVINCE_NAME, '' CITY_NAME, '' WARD_NAME, '' AS
STREET_NAME, NULL START_DATE, NULL END_DATE, u'S\0103\0301p
di\00EA\0303n ra' NEWS_STATUS, 0 NEWS_ORDER, 0 AS LOCATION_LIKE_ID, 0
LOCATION_AVG_REVIEW, 0 LOCATION_TOTAL_REVIEW, 0 GROUP_ID2, NULL
CREATE_DATE , UTILITY.PHONE FROM UTILITY WHERE
UPPER(UTILITY.UNIT_CODE) = UPPER(:B8 ) AND UTILITY.STATUS = 1 AND
UTILITY.PARENT_ID IN (SELECT UC.ID FROM UTILITY UC WHERE
UPPER(UC.UNIT_CODE) = UPPER(:B8 ) AND (:B4 IS NULL OR (UC.ID IN
(SELECT COLUMN_VALUE FROM TABLE(SPLITSTR(:B4 , ','))) AND :B4 IS NOT
NULL)) AND UC.PARENT_ID IN (SELECT U.ID FROM UTILITY U WHERE
(U.PARENT_ID IS NULL AND (:B2 IS NULL OR BO_DAU_TIENGVIET(U.NAME,1)
LIKE '%' || BO_DAU_TIENGVIET(:B2 , 1) || '%')) AND UPPER(U.UNIT_CODE)
= UPPER(:B8 ) ) ) AND (:B2 IS NULL OR :B2 = '' OR
(BO_DAU_TIENGVIET(UTILITY.NAME,1) LIKE '%' || BO_DAU_TIENGVIET(:B2 ,
1) || '%' AND :B2 IS NOT NULL)) ) T ORDER BY T.LOCATION_DISTANCE ) P)
P1 WHERE (:B11 IS NULL OR :B11 = 0 OR LOCATION_DISTANCE <= :B11 ) )
T3 WHERE (RN > (NVL(:B13 , 1) - 1) * NVL(:B12 , 10) AND RN <=
NVL(:B13 , 1) * NVL(:B12 , 10))
Rationale
The SQL statement executed in container TRAVEL with database ID
3696236241.
Rationale
The SQL spent 100% of its database time on CPU, I/O and Cluster waits.
This part of database time may be improved by the SQL Tuning Advisor.
Rationale
Database time for this SQL was divided as follows: 17% for SQL
execution, 0% for parsing, 83% for PL/SQL execution and 0% for Java
execution.
Rationale
SQL statement with SQL_ID "9ydrtb3qv1k5r" was executed 1903 times and
had an average elapsed time of 1.6 seconds.
Rationale
Top level calls to execute the SELECT statement with SQL_ID
"379b8ndxqpb8s" are responsible for 100% of the database time spent on
the SELECT statement with SQL_ID "9ydrtb3qv1k5r".
Related Object
SQL statement with SQL_ID 379b8ndxqpb8s.
SELECT A.CHAR_TV,A.CHAR_0 FROM BODAU_TIENGVIET A

Recommendation 4: SQL Tuning


Estimated benefit is .09 active sessions, 7.39% of total activity.
------------------------------------------------------------------
Action
Run SQL Tuning Advisor on the SELECT statement with SQL_ID
"0x2wsr5tn6jqj".
Related Object
SQL statement with SQL_ID 0x2wsr5tn6jqj.
SELECT T3.* FROM ( SELECT ROWNUM RN, P1.* FROM (SELECT P.* FROM
(SELECT T.* FROM (SELECT PLACE.GEO_LOCATION, PLACE.WARD_ID,
PLACE.CITY_ID, PLACE.PROVINCE_ID, PLACE.NATION_ID, PLACE.CODE AS
LOCATION_TYPE, PLACE.ID AS LOCATION_ID, PLACE.LANGUAGE_ID AS
LOACTION_LANGUAGE_ID, CASE :B2 WHEN 'vi' THEN PLACE.NAME ELSE
PLACE_LANG.NAME END AS LOCATION_NAME, CASE :B2 WHEN 'vi' THEN
PLACE.NAME2 ELSE PLACE_LANG.NAME2 END AS LOCATION_NAME2, CASE :B2
WHEN 'vi' THEN PLACE.ADDRESS ELSE PLACE_LANG.ADDRESS END AS ADDRESS,
PLACE.TYPE_ID AS LOCATION_TYPE_ID, CASE :B2 WHEN 'vi' THEN
GENERAL_CATEGORY.NAME ELSE GENERAL_CATEGORY_LANG.NAME END AS
LOCATION_TYPE_NAME, NVL(PLACE.TO_AVG_PRICE, 0) AS LOCATION_AVG_PRICE,
NVL(PLACE.FROM_AVG_PRICE, 0) AS LOCATION_FROM_AVG_PRICE,
PLACE.CREATE_DATE AS NEWS_CREATE_DATE, PLACE.OPEN_TIME AS
LOCATION_OPEN_TIME, PLACE.CLOSE_TIME AS LOCATION_CLOSE_TIME,
PLACE.COUNT_VIEW AS LOCATION_TOTAL_VIEW, PLACE.COUNT_LIKE AS
LOCATION_TOTAL_LIKE, PLACE.ALTITUDE AS LOCATION_ALTITUDE, PLACE.IMAGE
AS LOCATION_AVATAR, PLACE.UNIT_CODE AS LOCATION_UNIT_CODE,
PLACE.USE_SITE AS LOCATION_USE_SITE, CASE :B2 WHEN 'vi' THEN
PLACE.CONTENT ELSE PLACE_LANG.CONTENT END AS LOCATION_DESCRIPTION,
CASE WHEN :B12 IS NULL THEN 0 ELSE GET_DISTANCE(PLACE.GEO_LOCATION,
:B12 ) END AS LOCATION_DISTANCE, SYS_SITE.SUBDOMAIN AS
LOCATION_SUBDOMAIN, NVL(REVIEW_LIKE.ID, 0) AS LOCATION_LIKE_ID,
PLACE.GROUP_ID2, PLACE.TYPE_ID, CASE :B2 WHEN 'vi' THEN PLACE.ADDRESS
ELSE REPLACE(REPLACE(BO_DAU_TIENGVIET(PLACE.ADDRESS,
1),'so',''),'duong','') || ' street,' END AS STREET_NO, CASE :B2 WHEN
'vi' THEN PROVINCE.NAME ELSE PROVINCE_LANG.NAME END AS PROVINCE_NAME,
CASE :B2 WHEN 'vi' THEN CITY.NAME ELSE CITY_LANG.NAME END AS
CITY_NAME, CASE :B2 WHEN 'vi' THEN WARD.NAME ELSE WARD_LANG.NAME END
AS WARD_NAME, CASE :B2 WHEN 'vi' THEN STREET.NAME ELSE
STREET_LANG.NAME END AS STREET_NAME, PLACE.WEB_URL AS
LOCATION_WEB_URL FROM PLACE LEFT JOIN SYS_SITE ON PLACE.SITE_ID =
SYS_SITE.ID LEFT JOIN (SELECT DISTINCT * FROM PLACE_LANG WHERE
LANGUAGE_ID = :B2 ) PLACE_LANG ON PLACE.CODE = PLACE_LANG.PLACE_CODE
AND PLACE.ID = PLACE_LANG.PLACE_ID LEFT JOIN GENERAL_CATEGORY ON
PLACE.TYPE_ID = GENERAL_CATEGORY.ID AND PLACE.CODE =
GENERAL_CATEGORY.CODE LEFT JOIN GENERAL_CATEGORY_LANG ON
PLACE.TYPE_ID = GENERAL_CATEGORY_LANG.GENERAL_CATEGORY_ID AND
PLACE.CODE = GENERAL_CATEGORY_LANG.GENERAL_CATEGORY_CODE LEFT JOIN
LOCATION PROVINCE ON PLACE.PROVINCE_ID = PROVINCE.ID AND
PROVINCE.CODE = 'PROVINCE' LEFT JOIN LOCATION CITY ON PLACE.CITY_ID =
CITY.ID AND CITY.CODE = 'CITY' LEFT JOIN LOCATION WARD ON
PLACE.WARD_ID = WARD.ID AND WARD.CODE = 'WARD' LEFT JOIN LOCATION
STREET ON PLACE.STREET_ID = STREET.ID AND STREET.CODE = 'STREET' LEFT
JOIN LOCATION_LANG PROVINCE_LANG ON PLACE.PROVINCE_ID =
PROVINCE_LANG.LOCATION_ID AND PROVINCE_LANG.LOCATION_CODE =
'PROVINCE' AND PROVINCE_LANG.LANGUAGE_ID = :B2 LEFT JOIN
LOCATION_LANG CITY_LANG ON PLACE.CITY_ID = CITY_LANG.LOCATION_ID AND
CITY_LANG.LOCATION_CODE = 'CITY' AND CITY_LANG.LANGUAGE_ID = :B2 LEFT
JOIN LOCATION_LANG WARD_LANG ON PLACE.WARD_ID = WARD_LANG.LOCATION_ID
AND WARD_LANG.LOCATION_CODE = 'WARD' AND WARD_LANG.LANGUAGE_ID = :B2
LEFT JOIN LOCATION_LANG STREET_LANG ON PLACE.STREET_ID =
STREET_LANG.LOCATION_ID AND STREET_LANG.LOCATION_CODE = 'STREET' AND
STREET_LANG.LANGUAGE_ID = :B2 LEFT JOIN (SELECT DISTINCT
CREATE_USER_ID, PLACE_CODE, PLACE_ID, ID, ROW_NUMBER() OVER(PARTITION
BY PLACE_CODE, PLACE_ID ORDER BY PLACE_CODE, PLACE_ID) AS RN FROM
PLACE_REVIEW WHERE REVIEW_TYPE = 4 AND STATUS != -1 AND
CREATE_USER_ID = :B1 AND RATE = 4 ) REVIEW_LIKE ON
REVIEW_LIKE.PLACE_CODE = PLACE.CODE AND REVIEW_LIKE.PLACE_ID =
PLACE.ID AND REVIEW_LIKE.RN = 1 WHERE ((:B11 IS NULL) OR
(LOWER(PLACE.CODE) IN (SELECT LOWER(COLUMN_VALUE) FROM
TABLE(SPLITSTR(:B11 , ','))) AND :B11 IS NOT NULL) ) AND
LOWER(PLACE.UNIT_CODE) = LOWER(:B10 ) AND PLACE.STATUS = 1 AND (:B9
IS NULL OR :B8 IS NULL OR (:B9 = 0 AND :B8 = 0 AND
NVL(PLACE.FROM_AVG_PRICE, 0) = 0 AND NVL(PLACE.TO_AVG_PRICE, 0) = 0)
OR (:B9 IS NOT NULL AND :B8 IS NOT NULL AND ( (:B8 = 0 AND
NVL(PLACE.FROM_AVG_PRICE, 0) = 0 AND NVL(PLACE.TO_AVG_PRICE, 0) = 0)
OR (((NVL(PLACE.FROM_AVG_PRICE, 0) <= :B9 AND :B9 <=
NVL(PLACE.TO_AVG_PRICE, 0)) OR (NVL(PLACE.FROM_AVG_PRICE, 0) <= :B8
AND :B8 <= NVL(PLACE.TO_AVG_PRICE, 0)) OR (:B9 <=
NVL(PLACE.FROM_AVG_PRICE, 0) AND NVL(PLACE.FROM_AVG_PRICE, 0) <= :B8
) OR (:B9 <= NVL(PLACE.TO_AVG_PRICE, 0) AND NVL(PLACE.TO_AVG_PRICE,
0) <= :B8 )))))) AND (:B7 IS NULL OR :B7 = '' OR (PLACE.WARD_ID IN
(SELECT COLUMN_VALUE FROM TABLE(SPLITSTR(:B7 , ','))))) AND (:B6 IS
NULL OR :B6 = 'null' OR :B6 = '' OR (PLACE.CITY_ID IN (SELECT
COLUMN_VALUE FROM TABLE(SPLITSTR(:B6 , ','))))) AND (:B5 IS NULL OR
(PLACE.TYPE_ID IN (SELECT COLUMN_VALUE FROM TABLE(SPLITSTR(:B5 ,
','))))) AND (:B4 IS NULL OR (EXISTS ( SELECT 1 FROM (SELECT UNIQUE
PLACE_TYPE_MAP.PLACE_ID, PLACE_TYPE_MAP.PLACE_CODE FROM
PLACE_TYPE_MAP WHERE PLACE_TYPE_MAP.PLACE_ID = PLACE.ID AND
PLACE_TYPE_MAP.PLACE_CODE = PLACE.CODE AND EXISTS ( SELECT 1 FROM (
SELECT REGEXP_SUBSTR(COLUMN_V, '[^_]+', 1, 2) AS SERVICE_ID,
REGEXP_SUBSTR(COLUMN_V, '[^_]+', 1, 1) AS SERVICE_CODE FROM (SELECT
REGEXP_SUBSTR(:B4 , '[^,]+', 1, LEVEL) AS COLUMN_V FROM DUAL CONNECT
BY REGEXP_SUBSTR(:B4 , '[^,]+', 1, LEVEL) IS NOT NULL) ) TMP WHERE
TMP.SERVICE_ID = PLACE_TYPE_MAP.TYPE_ID AND TMP.SERVICE_CODE =
PLACE_TYPE_MAP.TYPE_CODE ) ) T0 WHERE T0.PLACE_ID = PLACE.ID AND
T0.PLACE_CODE = PLACE.CODE ) ) ) AND ((:B3 IS NULL OR :B3 = '' OR
(BO_DAU_TIENGVIET(CASE :B2 WHEN 'vi' THEN PLACE.NAME ELSE
PLACE_LANG.NAME END, 1) LIKE '%' || BO_DAU_TIENGVIET(:B3 , 1) || '%'
AND :B3 IS NOT NULL) OR (BO_DAU_TIENGVIET(PLACE.TAG, 1) LIKE '%' ||
BO_DAU_TIENGVIET(:B3 , 1) || '%' AND :B3 IS NOT NULL) ) OR
(PLACE.CODE = 'RESTAURANT' AND PLACE.ID IN (SELECT V1.PLACE_ID FROM
PLACE_PRODUCT V1 LEFT JOIN PLACE_PRODUCT_LANG V2 ON V1.PLACE_CODE =
V2.PLACE_CODE AND V1.PLACE_ID = V2.PLACE_ID AND V1.ID =
V2.PLACE_PRODUCT_ID WHERE BO_DAU_TIENGVIET(V1.NAME, 1) LIKE '%' ||
BO_DAU_TIENGVIET(:B3 , 1) || '%' OR BO_DAU_TIENGVIET(V2.NAME, 1) LIKE
'%' || BO_DAU_TIENGVIET(:B3 , 1) || '%'))) ) T ORDER BY CASE WHEN
:B14 IS NULL OR :B14 = 0 THEN T.GROUP_ID2 END DESC , CASE WHEN :B14 >
0 THEN T.LOCATION_DISTANCE END ASC , CASE WHEN :B14 IS NULL OR :B14 =
0 THEN T.NEWS_CREATE_DATE END DESC , CASE WHEN :B13 IS NULL OR :B13 =
'' THEN T.LOCATION_DISTANCE END, CASE WHEN ('GROUP_TYPE' IN (SELECT
COLUMN_VALUE FROM TABLE(SPLITSTR(NVL(:B13 , ''), ';')))) THEN
T.GROUP_ID2 END DESC, CASE WHEN ('GROUP_TYPE' IN (SELECT COLUMN_VALUE
FROM TABLE(SPLITSTR(NVL(:B13 , ''), ';')))) THEN T.TYPE_ID END ) P)
P1 WHERE (:B14 IS NULL OR :B14 = 0 OR (LOCATION_DISTANCE <= :B14 AND
(:B12 IS NULL OR (:B12 IS NOT NULL AND LOCATION_DISTANCE > 0)) ) ) )
T3 WHERE (RN > (NVL(:B16 , 1) - 1) * NVL(:B15 , 15) AND RN <=
NVL(:B16 , 1) * NVL(:B15 , 15))
Rationale
The SQL statement executed in container TRAVEL with database ID
3696236241.
Rationale
The SQL spent 100% of its database time on CPU, I/O and Cluster waits.
This part of database time may be improved by the SQL Tuning Advisor.
Rationale
Database time for this SQL was divided as follows: 26% for SQL
execution, 0% for parsing, 74% for PL/SQL execution and 0% for Java
execution.
Rationale
SQL statement with SQL_ID "0x2wsr5tn6jqj" was executed 1952 times and
had an average elapsed time of 0.35 seconds.

Finding 2: PL/SQL Execution


Impact is .53 active sessions, 44.36% of total activity.
--------------------------------------------------------
PL/SQL execution consumed significant database time.

Recommendation 1: SQL Tuning


Estimated benefit is .32 active sessions, 27.32% of total activity.
-------------------------------------------------------------------
Action
Tune the entry point PL/SQL ID 76869. Refer to the PL/SQL documentation
for addition information.
Rationale
The SQL statement executed in container TRAVEL with database ID
3696236241.
Rationale
Subprogam ID 186 of PL/SQL ID 1821 spent 1263 seconds in execution.
Rationale
Subprogam ID 1 of PL/SQL ID 76869 spent 1070 seconds in execution.

Recommendation 2: SQL Tuning


Estimated benefit is .2 active sessions, 17.04% of total activity.
------------------------------------------------------------------
Action
Tune the entry point PL/SQL ID 76865. Refer to the PL/SQL documentation
for addition information.
Rationale
The SQL statement executed in container TRAVEL with database ID
3696236241.
Rationale
Subprogam ID 1 of PL/SQL ID 76865 spent 1456 seconds in execution.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Additional Information
----------------------

Miscellaneous Information
-------------------------
Wait class "Application" was not consuming significant database time.
Wait class "Cluster" was not consuming significant database time.
Wait class "Commit" was not consuming significant database time.
Wait class "Concurrency" was not consuming significant database time.
Wait class "Configuration" was not consuming significant database time.
CPU was not a bottleneck for the instance.
Wait class "Network" was not consuming significant database time.
Wait class "User I/O" was not consuming significant database time.
The network latency of the cluster interconnect was within acceptable limits
of 1 milliseconds.
Session connect and disconnect calls were not consuming significant database
time.
Hard parsing of SQL statements was not consuming significant database time.

You might also like