SQL query tunning
Hi,
I have developed a sql query to get the balance for a couple of months ( it may be up to 12 months) and it's taking more than 40 mins and ended up with timeout error. Is there anyway to reduce the execution time.
Sharing Full SQL query for better undrestanding
select /*+ MATERIALIZE */
gjs.user_je_source_name "JOURNAL_SOURCE",
gjc.USER_JE_CATEGORY_NAME "JOURNAL_CATEGORY",
gl.currency_code,
NVL(gl.accounted_dr,0) as ledgerdebit,
NVL(gl.accounted_cr,0) as ledgercredit,
-- 0 as ledgerdebit,
-- 0 as ledgercredit,
gl.code_combination_id ,
gh.period_name,
gc.company_desc,
gc.sub_BU_desc,
Tagged:
0