Query giving performance issues.
Hi All,
Following query is giving performance issues. Query execution is taking around 11 minutes. Our client requirement is to get the data for the query in 30 sec to 1 min. Please suggest.
SELECT
DISTINCT r.rptid, p.product_id, p.vnd_dscr, p.vendor_cd, p.Firm_Cd, a.is_mm_sweep IsMoneyMarket
FROM
dev.ac_cube a,
dev.rpt_master_rep_list_view r,
dev.cur_ps_cube p
WHERE a.repid = r.rep_id
AND a.accountkey = p.accountkey
AND p.product_id IS NOT NULL
AND p.product_id != 'CASH'
AND r.RPTID = '42817'
Number of distinct records fetched by above query : 34445
Number of records in dev.ac_cube table : 13.6 million
Number of records in dev.cur_ps_cube table : 7 million
Number of records in dev.rpt_master_rep_list_view for RPTID '42817' : 118354
repid, product_id is indexed column in dev.ac_cube table. accountkey is primary key in dev.ac_cube table.
rep_id is indexed column in base table on which dev.rpt_master_rep_list_view view is created
The output is not complete as i expected. Have you followed the steps I have mentioned in my earlier post
Also when posting output enclose between two {*code*} ...{*code*} (remove * within braces). It displays everything between the tags as proper formatted output otherwise its really hard to read and understand
See sample below. However you need to get the session id, sql id, display_cursor output exactly in same way as mentioned in my previous post
SQL> set arraysize 200 timing on serveroutput on linesize 200;
SQL> set autotrace traceonly explain statistics;
SQL> select level from dual connect by level <= 10000;
10000 rows selected.
Elapsed: 00:00:00.09
Execution Plan
Plan hash value: 1236776825
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 2 (0)| 00:00:01 |
| 1 | CONNECT BY WITHOUT FILTERING| | | | |
| 2 | FAST DUAL | | 1 | 2 (0)| 00:00:01 |
Statistics
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
57406 bytes sent via SQL*Net to client
919 bytes received via SQL*Net from client
51 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
10000 rows processed
SQL>
{code}
Similar Messages
-
SQL Query Having performance issues
I need help on rewriting this query, I am having performance issues with the way it is now. I create a temporary table and query against it. Any help will be appreciated. Thanks, Antonio
Here it is:
create global temporary table pr_php_elig_tmp
on commit preserve rows as
SELECT UNIQUE A.SAK_PROV, A.CDE_SERVICE_LOC, a.sak_short
FROM T_PR_PHP_ELIG A,
T_PR_TYPE C
WHERE C.SAK_PROV = A.SAK_PROV
AND C.CDE_SERVICE_LOC = A.CDE_SERVICE_LOC
AND C.CDE_PROV_TYPE not in ('01', '03', '08', '24', '27', '31')
AND A.SAK_PROV_PGM not in (11, 13)
AND A.DTE_END >= :il_current_date
AND A.DTE_EFFECTIVE <= :il_prev_18_months
AND NOT EXISTS (
SELECT 'X'
FROM T_PR_GRP_MBR T
WHERE T.SAK_PROV = A.SAK_PROV
AND T.CDE_SVC_LOC_MBR = A.CDE_SERVICE_LOC)
AND NOT EXISTS (
select a.sak_prov, a.cde_service_loc
from t_pmp_svc_loc d
where a.sak_prov = d.sak_prov
and a.cde_service_loc = d.cde_service_loc
and d.dte_end >= :il_current_date)
ORDER BY A.SAK_PROV, A.CDE_SERVICE_LOC;
select * from pr_php_elig_tmp
minus
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_dntl_dtl temp01
WHERE temp01.sak_prov_perf = a.sak_prov
and temp01.cde_svc_loc_perf = a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp01.DTE_FIRST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp01.DTE_FIRST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_dntl_hdr temp02
WHERE ( (temp02.prov_billing = a.sak_prov
and temp02.cde_service_loc = a.cde_service_loc)
OR (temp02.sak_prov_perf = a.sak_prov
and temp02.cde_perf_svc_loc = a.cde_service_loc)
OR (temp02.sak_prov_referring = a.sak_prov
and temp02.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp02.sak_prov_referring_2 = a.sak_prov
and temp02.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp02.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp02.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_phrm_hdr temp03
WHERE ( (temp03.prov_billing = a.sak_prov and
temp03.cde_service_loc = a.cde_service_loc)
OR (temp03.sak_prov_rendering = a.sak_prov and
temp03.cde_svc_loc_rend = a.cde_service_loc)
OR (temp03.sak_presc_prov = a.sak_prov and
temp03.cde_svc_loc_presc = a.cde_service_loc)
OR temp03.id_prov_prescrb = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp03.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp03.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_phys_dtl temp04
WHERE ( (temp04.sak_prov_perf = a.sak_prov
and temp04.cde_svc_loc_rend = a.cde_service_loc)
OR (temp04.sak_prov_referring = a.sak_prov
and temp04.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp04.sak_prov_referring_2 = a.sak_prov
and temp04.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp04.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp04.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_phys_hdr temp05
WHERE ( (temp05.prov_billing = a.sak_prov
and temp05.cde_service_loc = a.cde_service_loc)
OR (temp05.sak_prov_perf = a.sak_prov
and temp05.cde_perf_svc_loc = a.cde_service_loc)
OR (temp05.sak_prov_referring = a.sak_prov
and temp05.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp05.sak_prov_referring_2 = a.sak_prov
and temp05.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp05.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp05.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_ub92_dtl temp06
WHERE ( (temp06.sak_pr_other = a.sak_prov
and temp06.cde_scv_loc_other = a.cde_service_loc)
OR (temp06.sak_pr_other_2 = a.sak_prov
and temp06.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp06.sak_pr_attend = a.sak_prov
and temp06.cde_svc_loc_attend = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp06.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp06.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_ub92_hdr temp07
WHERE ( (temp07.prov_billing = a.sak_prov
and temp07.cde_service_loc = a.cde_service_loc)
OR (temp07.sak_pr_facility = a.sak_prov
and temp07.cde_svc_loc_fa = a.cde_service_loc)
OR (temp07.sak_pr_other = a.sak_prov
and temp07.cde_svc_loc_other = a.cde_service_loc)
OR (temp07.sak_pr_other_2 = a.sak_prov
and temp07.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp07.sak_pr_attend = a.sak_prov
and temp07.cde_svc_loc_attend = a.cde_service_loc)
OR temp07.id_prov_attend = to_char(a.sak_prov) || a.cde_service_loc
OR temp07.id_prov_other = to_char(a.sak_prov) || a.cde_service_loc
OR temp07.id_prov_other_2 = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp07.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp07.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_dntl_dtl temp08
WHERE temp08.sak_prov_perf = a.sak_prov
and temp08.cde_svc_loc_perf = a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp08.DTE_FIRST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp08.DTE_FIRST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_dntl_hdr temp09
WHERE ( (temp09.prov_billing = a.sak_prov
and temp09.cde_service_loc = a.cde_service_loc)
OR (temp09.sak_prov_perf = a.sak_prov
and temp09.cde_perf_svc_loc = a.cde_service_loc)
OR (temp09.sak_prov_referring = a.sak_prov
and temp09.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp09.sak_prov_referring_2 = a.sak_prov
and temp09.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp09.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp09.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_pharm_hdr temp10
WHERE ( (temp10.prov_billing = a.sak_prov
and temp10.cde_service_loc = a.cde_service_loc)
OR (temp10.sak_prov_rend = a.sak_prov
and temp10.cde_svc_loc_rend = a.cde_service_loc)
OR (temp10.sak_presc_prov = a.sak_prov
and temp10.cde_svc_loc_presc = a.cde_service_loc)
OR temp10.id_prov_prescrb = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp10.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp10.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_phys_dtl temp11
WHERE ( (temp11.sak_prov_perf = a.sak_prov
and temp11.cde_svc_loc_rend = a.cde_service_loc)
OR (temp11.sak_prov_referring = a.sak_prov
and temp11.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp11.sak_prov_referring_2 = a.sak_prov
and temp11.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp11.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp11.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_phys_hdr temp12
WHERE ( (temp12.prov_billing = a.sak_prov
and temp12.cde_service_loc = a.cde_service_loc)
OR (temp12.sak_prov_perf = a.sak_prov
and temp12.cde_perf_svc_loc = a.cde_service_loc)
OR (temp12.sak_prov_referring = a.sak_prov
and temp12.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp12.sak_prov_referring_2 = a.sak_prov
and temp12.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp12.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp12.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_ub92_dtl temp13
WHERE ( (temp13.sak_pr_other = a.sak_prov
and temp13.cde_scv_loc_other = a.cde_service_loc)
OR (temp13.sak_pr_other_2 = a.sak_prov
and temp13.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp13.sak_pr_attend = a.sak_prov
and temp13.cde_svc_loc_attend = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp13.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp13.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_ub92_hdr temp14
WHERE ( (temp14.prov_billing = a.sak_prov
and temp14.cde_service_loc = a.cde_service_loc)
OR (temp14.sak_pr_facility = a.sak_prov
and temp14.cde_svc_loc_fa = a.cde_service_loc)
OR (temp14.sak_pr_other_2 = a.sak_prov
and temp14.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp14.sak_pr_attend = a.sak_prov
and temp14.cde_svc_loc_attend = a.cde_service_loc)
OR (temp14.sak_pr_other = a.sak_prov
and temp14.cde_svc_loc_other = a.cde_service_loc)
OR temp14.id_prov_attend = to_char(a.sak_prov) || a.cde_service_loc
OR temp14.id_prov_other = to_char(a.sak_prov) || a.cde_service_loc
OR temp14.id_prov_other_2 = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp14.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp14.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_dental_dtl temp15
WHERE temp15.sak_prov_perf = a.sak_prov
and temp15.cde_svc_loc_perf = a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp15.DTE_FIRST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp15.DTE_FIRST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_dental_hdr temp16
WHERE ( (temp16.sak_prov_perf = a.sak_prov
and temp16.cde_perf_svc_loc = a.cde_service_loc)
OR (temp16.sak_prov_referring = a.sak_prov
and temp16.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp16.sak_prov_referring_2 = a.sak_prov
and temp16.cde_svc_loc_ref_2 = a.cde_service_loc)
OR (temp16.prov_billing = a.sak_prov
and temp16.cde_service_loc = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING ((MAX(temp16.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp16.DTE_LAST_SVC),0) = 0)
and (MAX(temp16.DTE_BILLED) >= :il_prev_18_months
OR NVL(MAX(temp16.DTE_BILLED),0) = 0) )
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_phrm_hdr temp17
WHERE ( (temp17.prov_billing = a.sak_prov
and temp17.cde_service_loc = a.cde_service_loc)
OR (temp17.sak_prov_rend = a.sak_prov
and temp17.cde_svc_loc_rend = a.cde_service_loc)
OR (temp17.sak_presc_prov = a.sak_prov
and temp17.cde_svc_loc_presc = a.cde_service_loc)
OR temp17.id_prov_prescrb = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp17.DTE_BILLED) >= :il_prev_18_months
OR NVL(MAX(temp17.DTE_BILLED),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_phys_dtl temp18
WHERE ( (temp18.sak_prov_perf = a.sak_prov
and temp18.cde_svc_loc_rend = a.cde_service_loc)
OR (temp18.sak_prov_referring = a.sak_prov
and temp18.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp18.sak_prov_referring_2 = a.sak_prov
and temp18.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp18.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp18.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_phys_hdr temp19
WHERE ( (temp19.prov_billing = a.sak_prov
and temp19.cde_service_loc = a.cde_service_loc)
OR (temp19.sak_prov_perf = a.sak_prov
and temp19.cde_perf_svc_loc = a.cde_service_loc)
OR (temp19.sak_prov_referring = a.sak_prov
and temp19.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp19.sak_prov_referring_2 = a.sak_prov
and temp19.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING ((MAX(temp19.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp19.DTE_LAST_SVC),0) = 0)
and (MAX(temp19.DTE_BILLED) >= :il_prev_18_months
OR NVL(MAX(temp19.DTE_BILLED),0) = 0) )
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_ub92_dtl temp20
WHERE ( (temp20.sak_pr_other = a.sak_prov
and temp20.cde_scv_loc_other = a.cde_service_loc)
OR (temp20.sak_pr_other_2 = a.sak_prov
and temp20.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp20.sak_pr_attend = a.sak_prov
and temp20.cde_svc_loc_attend = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp20.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp20.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_ub92_hdr temp22
WHERE ( (temp22.prov_billing = a.sak_prov
and temp22.cde_service_loc = a.cde_service_loc)
OR (temp22.sak_pr_facility = a.sak_prov
and temp22.cde_svc_loc_fa = a.cde_service_loc)
OR (temp22.sak_pr_other_2 = a.sak_prov
and temp22.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp22.sak_pr_attend = a.sak_prov
and temp22.cde_svc_loc_attend = a.cde_service_loc)
OR (temp22.sak_pr_other = a.sak_prov
and temp22.cde_svc_loc_other = a.cde_service_loc)
OR temp22.id_prov_attend = to_char(a.sak_prov) || a.cde_service_loc
OR temp22.id_prov_other = to_char(a.sak_prov) || a.cde_service_loc
OR temp22.id_prov_other_2 = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp22.DTE_BILLED) >= :il_prev_18_months
OR NVL(MAX(temp22.DTE_BILLED),0) = 0
);Perhaps an approach like this would work better. No promises, but it's worth a try.
SELECT *
FROM pr_php_elig_tmp a
WHERE NOT EXISTS (
SELECT a.sak_prov,
a.cde_service_loc,
a.sak_short
FROM aim01.t_deny_dntl_dtl temp01
WHERE temp01.sak_prov_perf = a.sak_prov
AND temp01.cde_svc_loc_perf = a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX (temp01.dte_first_svc) >= :il_prev_18_months
OR NVL (MAX (temp01.dte_first_svc), 0) = 0)
AND NOT EXISTS (
SELECT a.sak_prov,
a.cde_service_loc,
a.sak_short
FROM aim01.t_deny_dntl_hdr temp02
WHERE ( ( temp02.prov_billing = a.sak_prov
AND temp02.cde_service_loc = a.cde_service_loc)
OR ( temp02.sak_prov_perf = a.sak_prov
AND temp02.cde_perf_svc_loc = a.cde_service_loc)
OR ( temp02.sak_prov_referring = a.sak_prov
AND temp02.cde_svc_loc_ref_1 = a.cde_service_loc)
OR ( temp02.sak_prov_referring_2 = a.sak_prov
AND temp02.cde_svc_loc_ref_2 = a.cde_service_loc))
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX (temp02.dte_final) >= :il_prev_18_months
OR NVL (MAX (temp02.dte_final), 0) = 0) -
Query on Performance issues relating to a report
Hi Group,
I have an issue while running a report which was creating Business Partners for (both Company and the Contact person and as well as relationship b/w them).
This report was having BAPI( for creating Business Partners ) and also for creating relationships and the report was taking too much of response time.
I was thinking it to be the reason for calling BAPIs. But, I want to know from you that is that the real cause or it might be the other cause.
So please kindly let me know inputs from your side on this.
thanks in advance.
Regards,
Vishnu.Hi
I think it's always better to use the provided standard fm's and bapi's to make changes to the data in the system instead of directly placing them in the tables.
One thing you can do is try to use parallel processing. E.g 10.000 BP's should be created. In that case schedule 4 jobs to create the Bp's instead of 1 job creating the whole lot.
Kind regards, Rob Dielemans -
Performance issue with JEST table
Moved to correct forum by moderator
Hi all,
I have a report which is giving performance issue.
It hits the function module "status_read", which in turn hits the table JEST..
The select query is:
SELECT SINGLE * FROM JSTO CLIENT SPECIFIED
WHERE MANDT = MANDT
AND OBJNR = OBJNR.
I know we should not use client specified, but this is a SAP standard code..
Since this query is hit many times, it results in TIME_OUT error..
I observed that the table JEST has 133,523,962 entries in production and in technical details, the size catagory is metnioned as 3 - (Data records expected: 280,000 to 1,100,000).
Since here, the data size is exceeded, if i change the size catagory to 4 would improve the performance?
Or should I request Client to archive this table? If yes, please guide me how to go for it? I have heard there are archiving objects.. please specify which objects should be considered for archiving...
I could only think of above two solutions, please let me know if there is any other workaround...
thanks!
Edited by: Matt on Jan 27, 2009 11:12 AMHi,
I'm not sure the exact archiving object for this, here are some archiving objects related to tabel JEST
MM_EBAN
MM_EKKO
MM_MATNR
PP_ORDER
PR_ORDER
PM_NET
pl. go thru them using tcode: SARA
thanks\
Mahesh -
Performance issue with joins on table VBAK, VBEP, VBKD and VBAP
hi all,
i have a report where there is a join on all 4 tables VBAK, VBEP, VBKD and VBAP.
the report is giving performance issues because of this join.
all the key fields are used for the joining of tables. but some of the non-key fields like vbap-vstel, vbap-abgru and vbep-wadat are also part of select query and are getting filled.
because of these there is a performance issue.
is there any way i can improve the performance of the join select query?
i am trying "for all entries" clause...
kindly provide any alternative if possible.
thanks.Hi,
Pls perform some of the below steps as applicable for the performance improvement:
a) Remove join on all the tables and put joins only on header and item (VBAK & VBAP).
b) code should have separate select for VBEP and VBKD.
c) remove the non key fields from the where clause. Once you retrieve data from the database into the internal table, sort the table and delete the entries which are not part of the non-key fields like vstel, abgru and wadat.
d) last option is you can create index in the VBAP & VBEP table with respect to the fields vstel, abgru & wadat ( not advisable)
e) buffering option on database tables also possible.
f) select only the fields into the internal table that are applicable for the processing logic and also the select query should contaian the field names in the same order as mentioned in the database table.
Hope this helps.
Regards
JLN -
Hello
i am making a change to an existing custom report.I have to pull all the orders except CANCELLED Orders for a parameters passed by user.
I made a change as FLOW_STATUS_CODE<>'CANCELLED' in rdf.The not equal is causing performance issues...and it is taking lot of time to complete.
can any one sujjest what will be the best to use in place of not equal.
ThanksIs there an index on column FLOW_STATUS_CODE?
Run your query in sqlplus through explain plan, and check the execution plan if a query has performance issues.
set pages 999
set lines 400
set trimspool on
spool explain.lst
explain plan for
<your statement>;
select * from table(dbms_xplan.display);
spool offFor optimization questions you'd better go to the SQL forum. -
Performance Issue in Program /VIRSA/ZVRAT_U03
Hi,
The Program /VIRSA/ZVRAT_U03(eport the user SOD voilations and the correspocnding user access) is giving performance issue ,
Ideally it gives Time out error after some time.
As this program is a Standard program from : VIRSA SYSTEMS INC., and there are no available OSS notes available.
I would like to know , how to proceed in this screnario.
Thanks is Advance.
Cheers
IrfanHi Irfan,
run the program in background mode to avoid the timeout.
If the runtime is not acceptable open a message with details: (runtime, variant, objects processed, ...).
Kind regards,
Hermann -
Performance issues with respect scheme registration,select & insert query
I am facing performance issues with respect to schema registration,Select & insert query towards 10.2.0.3 version.It is taking around 45 minutes to register schema and it is taking around 5 min to insert a single document into xml db where as it was taking less than min to insert a single document into xml db of 9.2.0.6 version.Would like to know the issue and solution to resolve this issue.Please help me out on this as it is very urgent for me
Since it appears that this is an XML DB specific question, you're probably better off posting in the XML DB. The folks over there have much more experience with the ins and outs of that particular product.
Justin -
Performance issues when creating a Report / Query in Discoverer
Hi forum,
Hope you are can help, it involves a performance issues when creating a Report / Query.
I have a Discoverer Report that currently takes less than 5 seconds to run. After I add a condition to bring back Batch Status that = Posted we cancelled the query after reaching 20 minutes as this is way too long. If I remove the condition the query time goes back to less than 5 seconds.
Please see attached the SQL Inspector Plan:
Before Condition
SELECT STATEMENT
SORT GROUP BY
VIEW SYS
SORT GROUP BY
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
AND-EQUAL
INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N2
INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
INDEX RANGE SCAN GL.GL_JE_LINES_N1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
TABLE ACCESS BY INDEX ROWID GL.GL_JE_BATCHES
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
INDEX RANGE SCAN GL.GL_PERIODS_U1
After Condition
SELECT STATEMENT
SORT GROUP BY
VIEW SYS
SORT GROUP BY
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
TABLE ACCESS FULL GL.GL_JE_BATCHES
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
INDEX RANGE SCAN GL.GL_JE_HEADERS_N1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
INDEX RANGE SCAN GL.GL_JE_LINES_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
INDEX UNIQUE SCAN GL.GL_CODE_COMBINATIONS_U1
TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
INDEX RANGE SCAN GL.GL_PERIODS_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
Is there anything i can do in Discoverer Desktop / Administration to avoid this problem.
Many thanks,
LanceHi Rod,
I've tried the condition (Batch Status||'' = 'Posted') as you suggested, but the qeury time is still over 20 mins. To test i changed it to (Batch Status||'' = 'Unposted') and the query was returned within seconds again.
Ive been doing some more digging and have found the database view that is linked to the Journal Batches folder. See below.
I think the problem is with the column using DECODE. When querying the column in TOAD the value of P is returned. But in discoverer the condition is done on the value Posted. Im not too sure how DECODE works, but think this could be the causing some sort of issue with Full Table Scans. How do we get around this?
Lance
DECODE( JOURNAL_BATCH1.STATUS,
'+', 'Unable to validate or create CTA',
'+*', 'Was unable to validate or create CTA',
'-','Invalid or inactive rounding differences account in journal entry',
'-*', 'Modified invalid or inactive rounding differences account in journal entry',
'<', 'Showing sequence assignment failure',
'<*', 'Was showing sequence assignment failure',
'>', 'Showing cutoff rule violation',
'>*', 'Was showing cutoff rule violation',
'A', 'Journal batch failed funds reservation',
'A*', 'Journal batch previously failed funds reservation',
'AU', 'Showing batch with unopened period',
'B', 'Showing batch control total violation',
'B*', 'Was showing batch control total violation',
'BF', 'Showing batch with frozen or inactive budget',
'BU', 'Showing batch with unopened budget year',
'C', 'Showing unopened reporting period',
'C*', 'Was showing unopened reporting period',
'D', 'Selected for posting to an unopened period',
'D*', 'Was selected for posting to an unopened period',
'E', 'Showing no journal entries for this batch',
'E*', 'Was showing no journal entries for this batch',
'EU', 'Showing batch with unopened encumbrance year',
'F', 'Showing unopened reporting encumbrance year',
'F*', 'Was showing unopened reporting encumbrance year',
'G', 'Showing journal entry with invalid or inactive suspense account',
'G*', 'Was showing journal entry with invalid or inactive suspense account',
'H', 'Showing encumbrance journal entry with invalid or inactive reserve account',
'H*', 'Was showing encumbrance journal entry with invalid or inactive reserve account',
'I', 'In the process of being posted',
'J', 'Showing journal control total violation',
'J*', 'Was showing journal control total violation',
'K', 'Showing unbalanced intercompany journal entry',
'K*', 'Was showing unbalanced intercompany journal entry',
'L', 'Showing unbalanced journal entry by account category',
'L*', 'Was showing unbalanced journal entry by account category',
'M', 'Showing multiple problems preventing posting of batch',
'M*', 'Was showing multiple problems preventing posting of batch',
'N', 'Journal produced error during intercompany balance processing',
'N*', 'Journal produced error during intercompany balance processing',
'O', 'Unable to convert amounts into reporting currency',
'O*', 'Was unable to convert amounts into reporting currency',
'P', 'Posted',
'Q', 'Showing untaxed journal entry',
'Q*', 'Was showing untaxed journal entry',
'R', 'Showing unbalanced encumbrance entry without reserve account',
'R*', 'Was showing unbalanced encumbrance entry without reserve account',
'S', 'Already selected for posting',
'T', 'Showing invalid period and conversion information for this batch',
'T*', 'Was showing invalid period and conversion information for this batch',
'U', 'Unposted',
'V', 'Journal batch is unapproved',
'V*', 'Journal batch was unapproved',
'W', 'Showing an encumbrance journal entry with no encumbrance type',
'W*', 'Was showing an encumbrance journal entry with no encumbrance type',
'X', 'Showing an unbalanced journal entry but suspense not allowed',
'X*', 'Was showing an unbalanced journal entry but suspense not allowed',
'Z', 'Showing invalid journal entry lines or no journal entry lines',
'Z*', 'Was showing invalid journal entry lines or no journal entry lines', NULL ), -
QUERY PERFORMANCE AND DATA LOADING PERFORMANCE ISSUES
WHAT ARE QUERY PERFORMANCE ISSUES WE NEED TO TAKE CARE PLEASE EXPLAIN AND LET ME KNOW T CODES...PLZ URGENT
WHAT ARE DATALOADING PERFORMANCE ISSUES WE NEED TO TAKE CARE PLEASE EXPLAIN AND LET ME KNOW T CODES PLZ URGENT
WILL REWARD FULL POINT S
REGARDS
GURUBW Back end
Some Tips -
1)Identify long-running extraction processes on the source system. Extraction processes are performed by several extraction jobs running on the source system. The run-time of these jobs affects the performance. Use transaction code SM37 Background Processing Job Management to analyze the run-times of these jobs. If the run-time of data collection jobs lasts for several hours, schedule these jobs to run more frequently. This way, less data is written into update tables for each run and extraction performance increases.
2)Identify high run-times for ABAP code, especially for user exits. The quality of any custom ABAP programs used in data extraction affects the extraction performance. Use transaction code SE30 ABAP/4 Run-time Analysis and then run the analysis for the transaction code RSA3 Extractor Checker. The system then records the activities of the extraction program so you can review them to identify time-consuming activities. Eliminate those long-running activities or substitute them with alternative program logic.
3)Identify expensive SQL statements. If database run-time is high for extraction jobs, use transaction code ST05 Performance Trace. On this screen, select ALEREMOTE user and then select SQL trace to record the SQL statements. Identify the time-consuming sections from the results. If the data-selection times are high on a particular SQL statement, index the DataSource tables to increase the performance of selection (see no. 6 below). While using ST05, make sure that no other extraction job is running with ALEREMOTE user.
4)Balance loads by distributing processes onto different servers if possible. If your site uses more than one BW application server, distribute the extraction processes to different servers using transaction code SM59 Maintain RFC Destination. Load balancing is possible only if the extraction program allows the option
5)Set optimum parameters for data-packet size. Packet size affects the number of data requests to the database. Set the data-packet size to optimum values for an efficient data-extraction mechanism. To find the optimum value, start with a packet size in the range of 50,000 to 100,000 and gradually increase it. At some point, you will reach the threshold at which increasing packet size further does not provide any performance increase. To set the packet size, use transaction code SBIW BW IMG Menu on the source system. To set the data load parameters for flat-file uploads, use transaction code RSCUSTV6 in BW.
6)Build indexes on DataSource tables based on selection criteria. Indexing DataSource tables improves the extraction performance, because it reduces the read times of those tables.
7)Execute collection jobs in parallel. Like the Business Content extractors, generic extractors have a number of collection jobs to retrieve relevant data from DataSource tables. Scheduling these collection jobs to run in parallel reduces the total extraction time, and they can be scheduled via transaction code SM37 in the source system.
8). Break up your data selections for InfoPackages and schedule the portions to run in parallel. This parallel upload mechanism sends different portions of the data to BW at the same time, and as a result the total upload time is reduced. You can schedule InfoPackages in the Administrator Workbench.
You can upload data from a data target (InfoCube and ODS) to another data target within the BW system. While uploading, you can schedule more than one InfoPackage with different selection options in each one. For example, fiscal year or fiscal year period can be used as selection options. Avoid using parallel uploads for high volumes of data if hardware resources are constrained. Each InfoPacket uses one background process (if scheduled to run in the background) or dialog process (if scheduled to run online) of the application server, and too many processes could overwhelm a slow server.
9). Building secondary indexes on the tables for the selection fields optimizes these tables for reading, reducing extraction time. If your selection fields are not key fields on the table, primary indexes are not much of a help when accessing data. In this case it is better to create secondary indexes with selection fields on the associated table using ABAP Dictionary to improve better selection performance.
10)Analyze upload times to the PSA and identify long-running uploads. When you extract the data using PSA method, data is written into PSA tables in the BW system. If your data is on the order of tens of millions, consider partitioning these PSA tables for better performance, but pay attention to the partition sizes. Partitioning PSA tables improves data-load performance because it's faster to insert data into smaller database tables. Partitioning also provides increased performance for maintenance of PSA tables for example, you can delete a portion of data faster. You can set the size of each partition in the PSA parameters screen, in transaction code SPRO or RSCUSTV6, so that BW creates a new partition automatically when a threshold value is reached.
11)Debug any routines in the transfer and update rules and eliminate single selects from the routines. Using single selects in custom ABAP routines for selecting data from database tables reduces performance considerably. It is better to use buffers and array operations. When you use buffers or array operations, the system reads data from the database tables and stores it in the memory for manipulation, improving performance. If you do not use buffers or array operations, the whole reading process is performed on the database with many table accesses, and performance deteriorates. Also, extensive use of library transformations in the ABAP code reduces performance; since these transformations are not compiled in advance, they are carried out during run-time.
12)Before uploading a high volume of transaction data into InfoCubes, activate the number-range buffer for dimension IDs. The number-range buffer is a parameter that identifies the number of sequential dimension IDs stored in the memory. If you increase the number range before high-volume data upload, you reduce the number of reads from the dimension tables and hence increase the upload performance. Do not forget to set the number-range values back to their original values after the upload. Use transaction code SNRO to maintain the number range buffer values for InfoCubes.
13)Drop the indexes before uploading high-volume data into InfoCubes. Regenerate them after the upload. Indexes on InfoCubes are optimized for reading data from the InfoCubes. If the indexes exist during the upload, BW reads the indexes and tries to insert the records according to the indexes, resulting in poor upload performance. You can automate the dropping and regeneration of the indexes through InfoPackage scheduling. You can drop indexes in the Manage InfoCube screen in the Administrator Workbench.
14)IDoc (intermediate document) archiving improves the extraction and loading performance and can be applied on both BW and R/3 systems. In addition to IDoc archiving, data archiving is available for InfoCubes and ODS objects.
Hope it Helps
Chetan
@CP.. -
Performance Issue Executing a BEx Query in Crystal Report E 4.0
Dear Forum
I'm working for a customer with big performance issue Executing a BEx Query in Crystal via transient universe.
When query is executed directly against BW via RSRT query returns results in under 2 seconds.
When executed in crystal, without the use of subreports multiple executions (calls to BICS_GET_RESULTS) are seen. Runtimes are as long as 60 seconds.
The Bex query is based on a multiprovider without ODS.
The RFC trace shows BICS connection problems, CS as BICS_PROV_GET_INITIAL_STATE takes a lot of time.
I checked the note 1399816 - Task name - prefix - RSDRP_EXECUTE_AT_QUERY_DISP, and itu2019s not applicable because the customer has the BI 7.01 SP 8 and it has already
domain RSDR0_TASKNAME_LONG in package RSDRC with the
description: 'BW Data Manager: Task name - 32 characters', data
type: CHAR; No. Characters: 32, decimal digits: 0
data element RSDR0_TASKNAME_LONG in package RSDRC with the
description 'BW Data Manager: Task name - 32 characters' and the
previously created domain.
as described on the message
Could you suggest me something to check, please?
Thanks en advance
Regards
RosaHi,
It would be great if you would quote the ADAPT and tell the audience when it is targetted for a fix.
Generally speaking, CR for Enteprise isn't as performant as WebI, because uptake was rather slow .. so i'm of the opinion that there is improvements to be gained. So please work with Support via OSS.
My onlt recommendations can be :
- Patch up to P2.12 in bi 4.0
- Define more default values on the Bex query variables.
- Implement this note in the BW 1593802 Performance optimization when loading query views
Regards,
H -
Multi Select Choice on af:query has severe performance issue
Multi-select choice used with af:query through a view criteria is causing severe performance issue on deselection of "All" checkbox, if the data in the list is around 550 rows. The same component works absolutely fine when used in a form layout.
I can provide you a re-producible test case, if anyone needs it!
***: This is a customer environment issue, and customer is eager to have multi-select in this case. Appreciate any help!Glimpse of repetitive lines from console for the above scenario:
<DCUtil> <findSpelObject> [2208] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for TestSelectChoiceDefaultAMDataControl
<ADFLogger> <begin> Attaching an iterator binding to a datasource
<DCIteratorBinding> <getViewObject> [2209] Resolving VO:TestSelectChoiceDefaultAM._SESSION_SHARED_APPMODULE_NAME_.SessionAM.DeptReadOnly1 for iterator binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlListBinding_59List_60
<DCUtil> <findSpelObject> [2210] DCUtil, RETURNING: <null> for TestSelectChoiceDefaultAM._SESSION_SHARED_APPMODULE_NAME_.SessionAM.DeptReadOnly1
<ADFLogger> <addContextData> Attaching an iterator binding to a datasource
<ADFLogger> <addContextData> Get LOV list
<ADFLogger> <begin> Get LOV list
<DCUtil> <findSpelObject> [2211] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for TestSelectChoiceDefaultAMDataControl
<ADFLogger> <begin> Attaching an iterator binding to a datasource
<DCIteratorBinding> <getViewObject> [2212] Resolving VO:TestSelectChoiceDefaultAM._SESSION_SHARED_APPMODULE_NAME_.SessionAM.DeptReadOnly1 for iterator binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlListBinding_123List_124
<DCUtil> <findSpelObject> [2213] DCUtil, RETURNING: <null> for TestSelectChoiceDefaultAM._SESSION_SHARED_APPMODULE_NAME_.SessionAM.DeptReadOnly1
<ADFLogger> <addContextData> Attaching an iterator binding to a datasource
<ADFLogger> <addContextData> Get LOV list
.....many times followed by
<ADFLogger> <addContextData> Attaching an iterator binding to a datasource
<ADFLogger> <addContextData> Get LOV list
<ADFLogger> <begin> Get LOV list
<ADFLogger> <addContextData> Get LOV list
<ADFLogger> <begin> Get LOV list
<ADFLogger> <addContextData> Get LOV list
<ADFLogger> <begin> Get LOV list
<ADFLogger> <addContextData> Get LOV list
<ADFLogger> <begin> Get LOV list
...many times -
Performance issue while generating Query
Hi BI Gurus.
I am facing performance issue while generating query on 0IC_C03.
It has a variable as (from & to) for generating the report for a particular time duration.
if the variable (from & to) fields is filled then after taking a long time it shows run time error.
& if the query is executed without mentioning the variable(which is optional) then the data is extracted from beginning to till date. the same takes less time in execution.
& after that the period has to be selected manually by option keep filter value. please suggest how can i solve the error
Regards
RitikaHI RITIKA,
WEL COME TO SDN.
YOUHAVE TO CHECK THE FOLLOWING RUN TIME SEGMENTS USING ST03N TCODE:
High Database Runtime
High OLAP Runtime
High Frontend Runtime
if its high Database Runtime :
- check the aggregates or create aggregates on cube and this helps you.
if its High OLAP Runtime :
- check the user exits if any.
- check the hier. are used and fetching in deep level.
If its high frontend runtime:
- check if a very high number of cells and formattings are transferred to the Frontend ( use "All data" to get value "No. of Cells") which cause high network and frontend (processing) runtime.
For From and to date variables, create one more set and use it and try.
Regs,
VACHAN -
Performance issue on query. Help needed.
This is mainly a performance issue. I hope someone can help me on this.
Basically I have four tables Master (150000 records), Child1 (100000+ records), Child2 (50 million records !), Child 3 (10000+ records)
(please pardon the aliases).
Now every record in master has more than one corresponding record in each of the child tables (one to many).
Also there may not be any record in any or all of the tables for a particular master record.
Now, I need to fetch the max of last_updated_date for every master record in each of the 3 child tables and then find the maximum of
the three last_active_dates obtained from the 3 tables.
eg: for Master ID 100, I need to query Child1 for all the records of Master ID 100 and get the max last_updated_date.
Same for the other 2 tables and then get the maximum of these three values.
(I also need to take care of cases where no record may be found in a child table for a Master ID)
Writing a procedure that uses cursors that fetches the value from each of the child table hits performance
badly. And thing is I need to find out the last_updated_date for every Master record (all 150000 of them). It'll probably take days to do this.
SELECT MAX (C1.LAST_UPDATED_DATE)
,MAX (C2.LAST_UPDATED_DATE)
,MAX (C3.LAST_UPDATED_DATE)
FROM CHILD1 C1
,CHILD2 C2
,CHILD3 C3
WHERE C1.MASTER_ID = 100
OR C2.MASTER_ID = 100
OR C3.MASTER_ID = 100
I tried the above but I got a temp tablespace error. I don't think the query is good enough at all.
(The OR clause is to take care of no records in any child table. If there's an AND, then the join and hence select will
fail even if there is no record in one child table but valid values in the other 2 tables).
Thanks a lot.
Edited by: user773489 on Dec 16, 2008 11:49 AMNot sure I understand the problem. The max you are getting from the above is already the greatest out of the three - that's why we do the UNION ALL.
Here's sample code without output, maybe this will clear it up:
with a as (
select 10 MASTER_ID, to_date('12/15/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
select 20 MASTER_ID, to_date('12/01/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
select 30 MASTER_ID, to_date('12/02/2008', 'MM/DD/YYYY') LAST_DTE from dual
b as (
select 10 MASTER_ID, to_date('12/14/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
select 20 MASTER_ID, to_date('12/02/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
select 40 MASTER_ID, to_date('11/15/2008', 'MM/DD/YYYY') LAST_DTE from dual
c as (
select 10 MASTER_ID, to_date('12/07/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
select 30 MASTER_ID, to_date('11/29/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
select 40 MASTER_ID, to_date('12/13/2008', 'MM/DD/YYYY') LAST_DTE from dual
select MASTER_ID, MAX(LAST_DTE)
FROM
(select MASTER_ID, LAST_DTE from a UNION ALL
select MASTER_ID, LAST_DTE from b UNION ALL
select MASTER_ID, LAST_DTE from c)
group by MASTER_ID;
MASTER_ID MAX(LAST_DTE)
30 02-DEC-08
40 13-DEC-08
20 02-DEC-08
10 15-DEC-08
4 rows selectedEdited by: tk-7381344 on Dec 16, 2008 12:38 PM -
Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query
Hi All,
There is a Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query in a report painter.
This query is working fine when executed in 4.7 system where as it is running for more time in ECC6.0.
Select query is on the table COSP.
SELECT (FIELD_LIST)
INTO CORRESPONDING FIELDS OF TABLE I_COSP PACKAGE SIZE 1000
FROM COSP CLIENT SPECIFIED
WHERE GJAHR IN SELR_GJAHR
AND KSTAR IN SELR_KSTAR
AND LEDNR EQ '00'
AND OBJNR IN SELR_OBJNR
AND PERBL IN SELR_PERBL
AND VERSN IN SELR_VERSN
AND WRTTP IN SELR_WRTTP
AND MANDT IN MANDTTAB
GROUP BY (GROUP_LIST).
LOOP AT I_COSP .
COSP = I_COSP .
PERFORM PCOSP USING I_COSP-_COUNTER.
CLEAR: $RWTAB, COSP .
CLEAR CCR1S .
ENDLOOP.
ENDSELECT.
I have checked with the table indexes, they were same as in 4.7 system.
What can be the reson for the difference in execution time. How can this be reduced without adjusting the select query.
Thanks in advance for the responses.
Regards,
Dedeepya.Hi,
ohhhhh....... lots of problems in select query......this is not the way you should write it.
Some generic comments:
1. never use SELECT
endselect.
SELECT
into table
for all entries in table
where.
use perform statment after this selection.
2. Do not use into corresponding fields. use exact structure type.
3. use proper sequence of fields in the where condition so that it helps table go according to indexes.
e.g in your case
sequence should be
LEDNR
OBJNR
GJAHR
WRTTP
VERSN
KSTAR
HRKFT
VRGNG
VBUND
PARGB
BEKNZ
TWAER
PERBL
sequence should be same as defined in table.
Always keep select query as simple as possible and perform all other calculations etc. afterwords.
I hope it helps.
Regards,
Pranaya
Maybe you are looking for
-
How to handle file on application server without coading?
HI all, can anybody tell me How to handle file on application server without coading? Is there any solution? Thanks in advance.
-
How do I reformat a macbook air to original factory settings?
I am trying to reformat my macbook air to original factory settings. I don't need to use any of the files currently on the HD, so just a clean wipe is all I need. Can anyone help?
-
HP Deskjet 5740 Drivers, Windows 8.1
Hello, I have had this printer working on XP for years. I have purchased a new PC with Windows 8.1, it Works there. I can install on XP and share with 8.1 but that is back asswards, The win 8.1 will be my main PC. I have it installed on 8.1 and would
-
Clamshell (display closed) mode
Hi, I am using clamshell (display closed) mode from a while after a recommendation from someone in the discussion (many thanks!). It is great for my needs, but the thing is sometimes it is hard to start this mode. I find myself trying several times t
-
Export PDF gives me PNG doc NOT word doc.