I have faced some performance issue at the database and while investigating I’v noticed the below dynamic sampling queries. Note that the dynamic sampling parameter is 2, and the table statistics is up to date.
Taking on consideration the queries doesn’t include a dynamic sampling hint and I have searched in the AWR for such hint which I couldn’t find.
My questions is ,why I am facing this queries? is the high value of sharable memory count affect the SGA memory and what is the impact of it ?
Example of the queries
SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE RESULT_CACHE(SNAPSHOT=3600) opt_param('parallel_execution_enabled', 'false') NO_PARALLEL(SAMPLESUB) NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1), 0),
NVL(SUM(C2), 0), NVL(SUM(C3), 0), COUNT(DISTINCT C4),
NVL(SUM(CASE WHEN C4 IS NULL THEN 1 ELSE 0 END), 0),
COUNT(DISTINCT C5), NVL(SUM(CASE WHEN C5 IS NULL THEN 1 ELSE 0 END), 0)
FROM (SELECT /*+ IGNORE_WHERE_CLAUSE NO_PARALLEL("table") FULL("table") NO_PARALLEL_INDEX("table") */