How to improve sorting performance
Hello
We are having bad performance for a query like this in:
select a.data
from a, b, c, d, e, f
where a.fk1 = b.pk
and a.fk2 = c.pk
and a.fk3 = d.pk
and a.fk4 = e.pk
and a.fk5 = f.pk
order by a.data, b.data, c.data
each foreign key has its index
we have oracle 9i
Without the order by clause, the cost is 3042; with the order by clause, it is 39842.
table 'a' is going to have millions of records, tables 'b' and 'c' are going to have thousands, and the others just hundreds.
How can i improve the performance of this query?
Thanks in advance!
Hi
This is the explain plan; sorry, the values don't match with the ones i posted but the idea is the same:
selecting 6 fields and sorting by 5 of them:
DESCRIPTION OWNER OBJECT NAME COST CARDINALITY BYTES
SELECT STATEMENT, GOAL = CHOOSE 49644 675390 59434320
SORT ORDER BY 49644 675390 59434320
NESTED LOOPS 5404 675390 59434320
NESTED LOOPS 5404 675390 56057370
HASH JOIN 5404 675390 54031200
TABLE ACCESS FULL OMEGA GN_T_EMPRESA 2 165 1485
HASH JOIN 5379 675390 47952690
TABLE ACCESS FULL OMEGA GN_T_CALENDARIO 55 22695 272340
HASH JOIN 4135 675445 39851255
TABLE ACCESS FULL OMEGA GN_T_CALENDARIO 55 22695 272340
HASH JOIN 3090 675445 31745915
INDEX FAST FULL SCAN OMEGA CLNTE_PK 92 748225 3741125
HASH JOIN 1792 675445 28368690
TABLE ACCESS FULL OMEGA GNC_T_MERCADO 2 47 282
HASH JOIN 1776 675445 24316020
INDEX FULL SCAN OMEGA INDCDRES_PK 1 36 108
TABLE ACCESS FULL OMEGA GNC_T_OMG_FACTURACION 1762 675445 22289685
INDEX UNIQUE SCAN OMEGA TPO_PRPDAD_PK 1 3
INDEX UNIQUE SCAN OMEGA SCTRZCION_DNE_PK 1 5
Selecting 28 fields (some of them are calculations) and sorting by 8 of them:
DESCRIPTION OWNER OBJECT NAME COST CARDINALITY BYTES
SELECT STATEMENT, GOAL = CHOOSE 104577 675390 114816300
SORT ORDER BY 104577 675390 114816300
HASH JOIN 10909 675390 114816300
TABLE ACCESS FULL OMEGA GN_T_EMPRESA 2 165 1485
HASH JOIN 10859 675390 108737790
TABLE ACCESS FULL OMEGA GNC_T_TIPO_PROPIEDAD 2 100 800
HASH JOIN 10811 675390 103334670
TABLE ACCESS FULL OMEGA GN_T_SECTORIZACION_DANE 66 27046 676150
HASH JOIN 8403 675390 86449920
TABLE ACCESS FULL OMEGA GN_T_CALENDARIO 55 22695 431205
HASH JOIN 6328 675390 73617510
TABLE ACCESS FULL OMEGA GNC_T_CLIENTE 610 748225 9726925
HASH JOIN 3472 675390 64837440
TABLE ACCESS FULL OMEGA GN_T_CALENDARIO 55 22695 272340
HASH JOIN 1814 675445 56737380
TABLE ACCESS FULL OMEGA GNC_T_MERCADO 2 47 423
HASH JOIN 1787 675445 50658375
INDEX FULL SCAN OMEGA INDCDRES_PK 1 36 108
TABLE ACCESS FULL OMEGA GNC_T_OMG_FACTURACION 1762 675445 48632040
It decides not to use fk indexes.. until there cost is 10909 and after sort the cost is 104577
Here is the query:
select emp.d_codigo_fssri_empresa as d_codigo_fssri_gas
, exp.n_mes as n_mes_reporte
, exp.n_anio as n_anio_reporte
, vig.n_mes as n_mes_consumo
, vig.n_anio as n_anio_consumo
, mer.d_codigo_sector_cons as d_sector_usuario
, 30 as n_dias_facturados
, pckb_subg.fub_rango_consumo(fact.n_consumo_m3, decode(prop.d_codigo_tipo_propiedad, 's', prop.n_propiedades, 1) ) as n_rango_consumo
, nvl(fact.n_consumo_m3,0) as n_consumo
, decode(prop.d_codigo_tipo_propiedad, 's', prop.n_propiedades, 1) as n_usuarios
, to_char( nvl(fact.n_cargo_consumo_rango1,0), 'fm999999999999990d99') as n_cu
, to_char((nvl(fact.n_cargo_consumo_rango1,0) - nvl(fact.n_tarifa_aplicada_subsidio,0)), 'fm999999999999d99') as n_tarifa_aplicada
, 0 as n_factor
, (nvl(fact.n_facturacion_consumo,0) + nvl(fact.n_cargo_fijo,0)) as n_facturacion
, nvl(fact.n_valor_subsidio ,0) as n_subsidio
, 0 as n_ajuste
, emp.d_codigo_fssri_empresa as d_incumbente
, null as d_observaciones
, mer.d_codigo_tarifa as d_tarifa--fact.d_tarifa
, exp.f_fecha as f_expedicion--fact.f_expedicion
, fact.d_factura
, cli.d_poliza as d_niu --fact.d_nui
, nvl(prop.n_propiedades, 0) as n_inquilinatos
, sectd.d_departamento_dane as d_departamento
, sectd.d_municipio_dane as d_municipio
, sectd.d_poblacion_dane as d_poblado
, sectd.d_codigo_dane as d_codigo_dane_r
, fact.k_facturacion
from gnc_t_omg_facturacion fact,
gnc_t_indicadores_facturacion ind,
gnc_t_cliente cli,
gn_t_sectorizacion_dane sectd,
gnc_t_mercado mer,
gnc_t_tipo_propiedad prop,
gn_t_empresa emp,
omg_v_fecha_expedicion exp,
omg_v_fecha_vigor vig
where ind.k_indicadores = fact.r_indicador_consumo
and cli.k_cliente = fact.r_cliente
and sectd.k_sectorizacion_dane = fact.r_sectorizacion_dane
and mer.k_mercado = fact.r_mercado
and prop.k_tipo_propiedad = fact.r_tipo_propiedad
and emp.k_empresa = fact.r_empresa
and exp.k_calendario = fact.r_fecha_expedicion
and vig.k_calendario = fact.r_fecha_vigor
order by d_codigo_fssri_gas
, n_anio_reporte
, n_mes_reporte
, n_anio_consumo
, n_mes_consumo
, d_sector_usuario
, n_rango_consumo
, n_tarifa_aplicada
I appreciate all your advice, thank you
Similar Messages
-
How to improve the performance of one program in one select query
Hi,
I am facing performance issue in one program. I have given some part of the code of the program.
it is taking much time below select query. How to improve the performance.
Quick response is highly appreciated.
Program code
DATA: BEGIN OF t_dels_tvpod OCCURS 100,
vbeln LIKE tvpod-vbeln,
posnr LIKE tvpod-posnr,
lfimg_diff LIKE tvpod-lfimg_diff,
calcu LIKE tvpod-calcu,
podmg LIKE tvpod-podmg,
uecha LIKE lips-uecha,
pstyv LIKE lips-pstyv,
xchar LIKE lips-xchar,
grund LIKE tvpod-grund,
END OF t_dels_tvpod,
DATA: l_tabix LIKE sy-tabix,
lt_dels_tvpod LIKE t_dels_tvpod OCCURS 10 WITH HEADER LINE,
ls_dels_tvpod LIKE t_dels_tvpod.
SELECT vbeln INTO TABLE lt_dels_tvpod FROM likp
FOR ALL ENTRIES IN t_dels_tvpod
WHERE vbeln = t_dels_tvpod-vbeln
AND erdat IN s_erdat
AND bldat IN s_bldat
AND podat IN s_podat
AND ernam IN s_ernam
AND kunnr IN s_kunnr
AND vkorg IN s_vkorg
AND vstel IN s_vstel
AND lfart NOT IN r_del_types_exclude.
Waiting for quick response.
Best regards,
BDPBansidhar,
1) You need to add a check to make sure that internal table t_dels_tvpod (used in the FOR ALL ENTRIES clause) is not blank. If it is blank skip the SELECt statement.
2) Check the performance with and without clause 'AND lfart NOT IN r_del_types_exclude'. Sometimes NOT causes the select statement to not use the index. Instead of 'lfart NOT IN r_del_types_exclude' use 'lfart IN r_del_types_exclude' and build r_del_types_exclude by using r_del_types_exclude-sign = 'E' instead of 'I'.
3) Make sure that the table used in the FOR ALL ENTRIES clause has unique delivery numbers.
Try doing something like this.
TYPES: BEGIN OF ty_del_types_exclude,
sign(1) TYPE c,
option(2) TYPE c,
low TYPE likp-lfart,
high TYPE likp-lfart,
END OF ty_del_types_exclude.
DATA: w_del_types_exclude TYPE ty_del_types_exclude,
t_del_types_exclude TYPE TABLE OF ty_del_types_exclude,
t_dels_tvpod_tmp LIKE TABLE OF t_dels_tvpod .
IF NOT t_dels_tvpod[] IS INITIAL.
* Assuming that I would like to exclude delivery types 'LP' and 'LPP'
CLEAR w_del_types_exclude.
REFRESH t_del_types_exclude.
w_del_types_exclude-sign = 'E'.
w_del_types_exclude-option = 'EQ'.
w_del_types_exclude-low = 'LP'.
APPEND w_del_types_exclude TO t_del_types_exclude.
w_del_types_exclude-low = 'LPP'.
APPEND w_del_types_exclude TO t_del_types_exclude.
t_dels_tvpod_tmp[] = t_dels_tvpod[].
SORT t_dels_tvpod_tmp BY vbeln.
DELETE ADJACENT DUPLICATES FROM t_dels_tvpod_tmp
COMPARING
vbeln.
SELECT vbeln
FROM likp
INTO TABLE lt_dels_tvpod
FOR ALL ENTRIES IN t_dels_tvpod_tmp
WHERE vbeln EQ t_dels_tvpod_tmp-vbeln
AND erdat IN s_erdat
AND bldat IN s_bldat
AND podat IN s_podat
AND ernam IN s_ernam
AND kunnr IN s_kunnr
AND vkorg IN s_vkorg
AND vstel IN s_vstel
AND lfart IN t_del_types_exclude.
ENDIF. -
How to improve the performance of the abap program
hi all,
I have created an abap program. And it taking long time since the number of records are more. And can anyone let me know how to improve the performance of my abap program.
Using se30 and st05 transaction.
can anyone help me out step by step
regds
harithaHi Haritha,
->Run Any program using SE30 (performance analysis)
Note: Click on the Tips & Tricks button from SE30 to get performance improving tips.
Using this you can improve the performance by analyzing your code part by part.
->To turn runtim analysis on within ABAP code insert the following code
SET RUN TIME ANALYZER ON.
->To turn runtim analysis off within ABAP code insert the following code
SET RUN TIME ANALYZER OFF.
->Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
->Avoid for all entries in JOINS
->Try to avoid joins and use FOR ALL ENTRIES.
->Try to restrict the joins to 1 level only ie only for tables
->Avoid using Select *.
->Avoid having multiple Selects from the same table in the same object.
->Try to minimize the number of variables to save memory.
->The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
->Avoid creation of index as far as possible
->Avoid operators like <>, > , < & like % in where clause conditions
->Avoid select/select single statements in loops.
->Try to use 'binary search' in READ internal table. -->Ensure table is sorted before using BINARY SEARCH.
->Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
->Avoid using ORDER BY in selects
->Avoid Nested Selects
->Avoid Nested Loops of Internal Tables
->Try to use FIELD SYMBOLS.
->Try to avoid into Corresponding Fields of
->Avoid using Select Distinct, Use DELETE ADJACENT
Check the following Links
Re: performance tuning
Re: Performance tuning of program
http://www.sapgenie.com/abap/performance.htm
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
check the below link
http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
See the following link if it's any help:
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
Check also http://service.sap.com/performance
and
books like
http://www.sap-press.com/product.cfm?account=&product=H951
http://www.sap-press.com/product.cfm?account=&product=H973
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
Performance tuning for Data Selection Statement
http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
Debugger
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
Run Time Analyser
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
SQL trace
http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
CATT - Computer Aided Testing Too
http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
Test Workbench
http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
Coverage Analyser
http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
Runtime Monitor
http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
Memory Inspector
http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
ECATT - Extended Computer Aided testing tool.
http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
Just refer to these links...
performance
Performance
Performance Guide
performance issues...
Performance Tuning
Performance issues
performance tuning
performance tuning
You can go to the transaction SE30 to have the runtime analysis of your program.Also try the transaction SCI , which is SAP Code Inspector.
edited by,
Naveenan -
How to improve the performance of adobe forms
Hi,
Please give me some suggestions as to how to improve the performance of adobe form?
Right now when I' am doing user events it is working fine for first 6 or 7 user events. From the next
one it is hanging.
I read about Wizard form design approach, how to use the same here.
Thanks,
AravindHi Otto,
The form is created using HCM forms and processes. I' am performing user events in the form.
User events will doa round trip, in which form data will be sent to backend SAP system. Processing will
happen on the ABAP side and result will appear on the form. First 6 or 7 user events works correctly,
the result is appearing on the form. Around 8 or 9th one, the wait symbol appears and the form is not
re-rendered. The form is of size 6 pages. The issue is not coming with form of size 1 page.
I was reading ways to improve performance during re-rendering given below.
http://www.adobe.com/devnet/livecycle/articles/DynamicInteractiveFormPerformance.pdf
It talks about wizard form design approach. But in SFP transaction, I am not seeing any kind of wizard.
Let me know if you need further details.
Thanks,
Aravind -
How to Improve the performance in Variable Selection Screen.
Hi,
In Query Level we have Variable " User entry Defalt Valu". User want select particular value when he press "F4" it's take hours time how to improve the performance in Varaible Selection Screen.
Thanks in Advance.
Regards,
Venkat.Dear Venkat.
You please try the following steps:
1. Say the InfoObject is 0EMPLOYEE against which you have created the variable, which user is trying to select value against, when they execute the report.
2. Goto RSA1-> InfoObject tab-> Select InfoObject 0EMPLOYEE.
3. Selcet the following options:
Query Execution Filter Val. Selectn - 'Only Posted Value for Navigation'
Filter Value Repr. At Query Exec. - 'Selector Box Without Values'
Please let me know if there is any more issue. Feel free to raise further concern
Thnx,
Sukdev K -
How to improve the performance of serialization/deserialization?
Hi, Friends,
I have a question about how to improve the performance of serialization/deserialization.
When an object is serialized, the entire tree of objects rooted at the object is also serialized. When it is deserialized, the tree is reconstructed. For example, suppose a serializable Father object contains (a serializable field of) an array of Child objects. When a Father object is serialized, so is the array of Child objects.
For the sake of performance consideration, when I need to deserialize a Father object, I don't want to deserialize any Child object. However, I should be able to know that Father object has children. I should also be able to deserialize any child of that Father object when necessary.
Could you tell me how to achieve the above idea?
Thanks.
YoubinYou could try something like this...
import java.io.*;
import java.util.*;
class Child implements Serializable {
int id;
Child(int _id) { id=_id; }
public String toString() { return String.valueOf(id); }
class Father implements Serializable
Child[] children = new Child[10];
public Father() {
Arrays.fill(children, new Child(1001));
public void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException
int numchildren = stream.readInt();
for(int i=0; i<numchildren; i++)
children[i] = (Child)stream.readObject();
stream.close();
public void writeObject(ObjectOutputStream stream) throws IOException
stream.writeInt(children.length);
for(int i=0; i<children.length; i++)
stream.writeObject(children);
stream.close();
Child[] getChildren() { return children; }
class FatherProxy
int numchildren;
String filename;
public FatherProxy(String _filename) throws IOException
filename = _filename;
ObjectInputStream ois =
new ObjectInputStream(new FileInputStream(filename));
numchildren = ois.readInt();
ois.close();
int getNumChildren() { return numchildren; }
Child[] getChildren() throws IOException, ClassNotFoundException
ObjectInputStream ois =
new ObjectInputStream(new FileInputStream(filename));
Father f = (Father)ois.readObject();
ois.close();
return f.getChildren();
public class fatherref
public static void main(String[] args) throws Exception
// create the serialized file
Father f = new Father();
ObjectOutputStream oos =
new ObjectOutputStream(new FileOutputStream("father.ser"));
oos.writeObject(f);
oos.close();
// read in just what is needed -- numchildren
FatherProxy fp = new FatherProxy("father.ser");
System.out.println("numchildren: " + fp.getNumChildren());
// do some processing
// you need the rest -- children
Child[] c = fp.getChildren();
System.out.println("children:");
for(int i=0; i<c.length; i++)
System.out.println("i " + i + ": " + c[i]); -
How to improve the performance of the query
Hi,
Help me by giving tips how to improve the performance of the query. Can I post the query?
SureshBelow is the formatted query and no wonder it is taking lot of time. Will give you a list of issues soon after analyzing more. Till then understand the pitfalls yourself from this formatted query.
SELECT rt.awb_number,
ar.activity_id as task_id,
t.assignee_org_unit_id,
t.task_type_code,
ar.request_id
FROM activity_task ar,
request_task rt,
task t
WHERE ar.activity_id =t.task_id
AND ar.request_id = rt.request_id
AND ar.complete_status != 'act.stat.closed'
AND t.assignee_org_unit_id in (SELECT org_unit_id
FROM org_unit
WHERE org_unit_id in (SELECT oo.org_unit_id
FROM org_unit oo
WHERE oo.org_unit_id='3'
OR oo.parent_id ='3'
OR parent_id in (SELECT oo.org_unit_id
FROM org_unit oo
WHERE oo.org_unit_id='3'
OR oo.parent_id ='3'
AND has_queue=1
AND ar.parent_task_id not in (SELECT tt.task_id
FROM task tt
WHERE tt.assignee_org_unit_id in (SELECT org_unit_id
FROM org_unit
WHERE org_unit_id in (SELECT oo.org_unit_id
FROM org_unit oo
WHERE oo.org_unit_id='3'
OR oo.parent_id ='3'
OR parent_id in (SELECT oo.org_unit_id
FROM org_unit oo
WHERE oo.org_unit_id='3'
OR oo.parent_id ='3'
AND has_queue=1
AND rt.awb_number is not null
ORDER BY rt.awb_numberCheers
Sarma. -
How to improve the performance of socket ?
how to improve the performance of socket ?
. allocation and deallocation of buffer ?No, that exception is thrown when the underlying
socket (tcp/ip) implementation cannot reserve buffer
space for new sockets afaik. I get it on windows
machines when the concurrent connection load reaches
17-18k connections. I do believe it's configurable
though.And what happens if your max server load is 7-8 connections an hour and you never close the connections? -
HI All, How to improve the performance in given query?
HI All,
How to improve the performance in given query?
Query is..
PARAMETERS : p_vbeln type lips-vbeln.
DATA : par_charg TYPE LIPS-CHARG,
par_werks TYPE LIPS-WERKS,
PAR_MBLNR TYPE MSEG-MBLNR .
SELECT SINGLE charg
werks
INTO (par_charg, par_werks)
FROM lips
WHERE vbeln = p_vbeln.
IF par_charg IS NOT INITIAL.
SELECT single max( mblnr )
INTO par_mblnr
FROM mseg
WHERE bwart EQ '101'
AND werks EQ par_werks (index on werks only)
AND charg EQ par_charg.
ENDIF.
Regards
SteveHi steve,
Can't you use the material in your query (and not only the batch)?
I am assuming your system has an index MSEG~M by MANDT + MATNR + WERKS (+ other fields). Depending on your system (how many different materials you have), this will probably speed up the query considerably.
Anyway, in our system we ended up by creating an index by CHARG, but leave as a last option, only if selecting by matnr and werks is not good enough for your scenario.
Hope this helps,
Rui Dantas -
How to improve the performance in AM level
Hi,
I am using Jdeveloper 11.1.1.2.0 and weblogic server 10.3.2.
How to improve the performance in AM level.
Actually i have approx 10 lacs Data but when search the record then it is taking more time.
I have following the link..
http://www.gebs.ro/blog/oracle/adf-view-object-performance-tuning-analysis/
but there is no effect in the performance level for seaching.
So please help me ..
Thanks
AnupHi Timo,
In search page,i m giving empId and click on search button then to execute query it is taking more time.I have override the VOImpl executeQuery(). then it is taking more time
@Override
public void executeQuery() {
setNamedWhereClauseParam("bind_draft", "D");
setNamedWhereClauseParam("bind_complete","%");
setNamedWhereClauseParam("bind_reject","%");
setNamedWhereClauseParam("bind_approve","A");
setNamedWhereClauseParam("bind_review","R");
super.executeQuery();
this method super.executeQuery() is calling and after 5 minutes heap space is comming on cosole as well as page also.
Thanks
Anup -
Inner Join. How to improve the performance of inner join query
Inner Join. How to improve the performance of inner join query.
Query is :
select f1~ablbelnr
f1~gernr
f1~equnr
f1~zwnummer
f1~adat
f1~atim
f1~v_zwstand
f1~n_zwstand
f1~aktiv
f1~adatsoll
f1~pruefzahl
f1~ablstat
f1~pruefpkt
f1~popcode
f1~erdat
f1~istablart
f2~anlage
f2~ablesgr
f2~abrdats
f2~ableinh
from eabl as f1
inner join eablg as f2
on f1ablbelnr = f2ablbelnr
into corresponding fields of table it_list
where f1~ablstat in s_mrstat
%_HINTS ORACLE 'USE_NL (T_00 T_01) index(T_01 "EABLG~0")'.
I wanted to modify the query, since its taking lot of time to load the data.
Please suggest : -
Treat this is very urgent.Hi Shyamal,
In your program , you are using "into corresponding fields of ".
Try not to use this addition in your select query.
Instead, just use "into table it_list".
As an example,
Just give a normal query using "into corresponding fields of" in a program. Now go to se30 ( Runtime analysis), and give the program name and execute it .
Now if you click on Analyze button , you can see, the analysis given for the query.The one given in "Red" line informs you that you need to find for alternate methods.
On the other hand, if you are using "into table itab", it will give you an entirely different analysis.
So try not to give "into corresponding fields" in your query.
Regards,
SP. -
Please help me how to improve the performance of this query further.
Hi All,
Please help me how to improve the performance of this query further.
Thanks.Hi,
this is not your first SQL tuning request in this community -- you really should learn how to obtain performance diagnostics.
The information you posted is not nearly enough to even start troubleshooting the query -- you haven't specified elapsed time, I/O, or the actual number of rows the query returns.
The only piece of information we have is saying that your query executes within a second. If we believe this, then your query doesn't need tuning. If we don't, then we throw it away
and we're left with nothing.
Start by reading this blog post: Kyle Hailey &raquo; Power of DISPLAY_CURSOR
and applying this knowledge to your case.
Best regards,
Nikolay -
How to improve the performance of the attached query, Please help
Hi,
How to improve performance of the below query, Please help. also attached explain plan -
SELECT Camp.Id,
rCam.AccountKey,
Camp.Id,
CamBilling.Cpm,
CamBilling.Cpc,
CamBilling.FlatRate,
Camp.CampaignKey,
Camp.AccountKey,
CamBilling.billoncontractedamount,
(SUM(rCam.Impressions) * 0.001 + SUM(rCam.Clickthrus)) AS GR,
rCam.AccountKey as AccountKey
FROM Campaign Camp, rCamSit rCam, CamBilling, Site xSite
WHERE Camp.AccountKey = rCam.AccountKey
AND Camp.AvCampaignKey = rCam.AvCampaignKey
AND Camp.AccountKey = CamBilling.AccountKey
AND Camp.CampaignKey = CamBilling.CampaignKey
AND rCam.AccountKey = xSite.AccountKey
AND rCam.AvSiteKey = xSite.AvSiteKey
AND rCam.RmWhen BETWEEN to_date('01-01-2009', 'DD-MM-YYYY') and
to_date('01-01-2011', 'DD-MM-YYYY')
GROUP By rCam.AccountKey,
Camp.Id,
CamBilling.Cpm,
CamBilling.Cpc,
CamBilling.FlatRate,
Camp.CampaignKey,
Camp.AccountKey,
CamBilling.billoncontractedamount
Explain Plan :-
Description Object_owner Object_name Cost Cardinality Bytes
SELECT STATEMENT, GOAL = ALL_ROWS 14 1 13
SORT AGGREGATE 1 13
VIEW GEMINI_REPORTING 14 1 13
HASH GROUP BY 14 1 103
NESTED LOOPS 13 1 103
HASH JOIN 12 1 85
TABLE ACCESS BY INDEX ROWID GEMINI_REPORTING RCAMSIT 2 4 100
NESTED LOOPS 9 5 325
HASH JOIN 7 1 40
SORT UNIQUE 2 1 18
TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY SITE 2 1 18
INDEX RANGE SCAN GEMINI_PRIMARY SITE_I0 1 1
TABLE ACCESS FULL GEMINI_PRIMARY SITE 3 27 594
INDEX RANGE SCAN GEMINI_REPORTING RCAMSIT_I 1 1 5
TABLE ACCESS FULL GEMINI_PRIMARY CAMPAIGN 3 127 2540
TABLE ACCESS BY INDEX ROWID GEMINI_PRIMARY CAMBILLING 1 1 18
INDEX UNIQUE SCAN GEMINI_PRIMARY CAMBILLING_U1 0 1Hello,
This has really nothing to do with the Oracle Forms product.
Please, send the SQL or/and PL/SQL questions in the corresponding forums.
Francois -
Re: How to Improve the performance on Rollup of Aggregates for PCA Infocube
Hi BW Guru's,
I have unresolved issue and our team is still working on it.
I have already posted several questions on this but not clear on how to reduce the time on Rollup of Aggregates process.
I have requested for OSS note and searching myself but still could not found.
Finally i have executed one of the cube in RSRV with the database selection
"Database indexes of an InfoCube and its aggregates" and got warning messages i was tried to correct the error and executed once again but still i found warning message. and the error message are as follows: (this is only for one info cube we got 6 info cubes i am executing one by one).
ORACLE: Index /BI0/IACCOUNT~0 has possibly degenerated
ORACLE: Index /BI0/IPROFIT_CTR~0 has possibly degenerated
ORACLE: Index /BI0/SREQUID~0 has possibly degenerated
ORACLE: Index /BIC/D1001072~010 has possibly degenerated
ORACLE: Index /BIC/D1001132~010 has possibly degenerated
ORACLE: Index /BIC/D1001212~010 has possibly degenerated
ORACLE: Index /BIC/DGPCOGC062~01 has possibly degenerated
ORACLE: Index /BIC/IGGRA_CODE~0 has possibly degenerated
ORACLE: Index /BIC/QGMAPGP1~0 has possibly degenerated
ORACLE: Index /BIC/QGMAPPC2~0 has possibly degenerated
ORACLE: Index /BIC/SGMAPGP1~0 has possibly degenerated
i don't know how to move further on this can any one tell me how to tackle this problem to increase the performance on Rollup of Aggregates (PCA Info cubes).
every time i use to create index and statistics regularly to improve the performance it will work for couple of days and again the performance of the rollup of aggregates come down gradually.
Thanks and Regards,
Venkathi,
check in a sql client the sql created by Bi and the query that you use directy from your physical layer...
The time between these 2 must be 2-3 seconds,otherwise you have problems.(these seconds are for scripts that needed by Bi)
If you use "like" in your sql then forget indexes....
For more informations about indexes check google or your Dba .
Last, i mentioned that materialize view is not perfect,it help a lot..so why not try to split it to smaller ones....
ex...
logiacal dimensions
year-half-day
company-department
fact
quantity
instead of making one...make 3,
year - department - quantity
half - department - quantity
day - department - quantity
and add them as datasource and assign them the appropriate logical level at bussiness layer in administrator...
Do you use partioning functionality???
i hope i helped....
http://greekoraclebi.blogspot.com/
/////////////////////////////////////// -
Do you have an idea how to improve the performance ?
Hi All,
Greeting,
I'm doing SEM IP. Regarding the performance, do you have some thought about this ?
So I have planning report for project report . As we know, if we forecast against project, means the date itself is the life of the project itself.
It means it could be more than 10 years (forecast period) and 10 years (actual period). Currently I segregate between actual and forecast into different info cube .
But the performance of the planning report is slow now. Do you have an idea about this how to increase the performance. The performance I mentioned here is when we're going to the report (after putting in the value in the selection screen).
The other question, at this moment, I have a multiprovider than this multi provider consist 2 info cubes ( actual and forecast ). Than my aggregation is sitting on top of that multi-provider .
My question whether that's approach correct or not ? Or do we have to create 1 aggregate (only for forecast), than I have multi-provider consisting forecasting aggregation and actual cube .
than my query will sit on top of that multi-provider ?
Which one is better ??
Thanks a lot all,
really need your help,Hi,
For the performance tuning, you can consider any of the following three methods,
1. Indices
With an increasing number of data records in the InfoCube, not only the load but also the query performance can be reduced. This is attributed to the increasing demands on the system for maintaining indexes. The indexes that are created in the fact table for each dimension allow you to easily find and select the data.
2. Partitioning
By using partitioning you can split up the whole dataset for an InfoCube into several, smaller, physically independent and redundancy-free units. Thanks to this separation, performance is increased when reporting, or also when deleting data from the InfoCube.
3. Aggregates
Aggregates make it possible to access InfoCube data quickly in Reporting. Aggregates serve, in a similar way to database indexes, to improve performance.
4. Compressing the Infocube
Infocube compression means aggregation of the data ignoring the request idu2019s. After compression, the system need not perform aggregation using the request ID every time you execute a query.
And I feel that as per your scenario, you need to do first compress the data based on user requirements and have only the required data in the infocube.
And for the approach regarding the Aggregation level design, choosing between the two approaches depends on the user requirements. For example,
If you have aggregation level created on top of multiprovider containing actual and forecast cube, in your report (created on top of aggregation level) you can view the key figure values present in both the cubes, which is not possible in the other approach.
So this approach is suited if your requirement is to view the records from both the cubes in your report (Comparing planning and actual values).
The second approach is used if your requirement is only to report on planning forecast cube.
Hopes this solves your issue.
Regards,
Balajee
Maybe you are looking for
-
ITunes is splitting up my Keynote Podcasts!?
I have 11 episodes of Apple's keynotes that I have stored on my external Hard Drive, containing the rest of my iTunes library. I have clean installed OS X Lion and done all the updates, and opened iTunes, clicked "Add to library", added all the podca
-
Hello Experts! For a new Sales Org, I cannot get the system to print the GI Output. The process works fine automatically for our others Sales Orgs/Plants. We are not using a standard Output condition Type (I dont think - YBL3?) I can re-print the doc
-
i forgot my security answers and i have provided rescue email same as apple id its been 6 monts and still no solution found i have credits in my account please help
-
Cisco RV016 dropping company POP3 connections
I am getting crazy with our Cisco Linksys RV016. It handles 3 simultaneous connections to the internet using 3 ISP. All our company goes to the internet using this cisco linksys RV016, our corporate switches are connected as clients to the router.
-
ITunes 10 does not see my iphone 3g
I have done all the steps on the apple website, including reinstalling itunes 10 and rebooting my machine countless times. All the required services (Bonjour, Apple Mobile Device, and iPod Helper) are running in the administrative tools, and yet my i