How to improve Performance of the Statements.
Hi,
I am using Oracle 10g. My problem is when i am Execute & fetch the records from the database it is taking so much time. I have created Statistics also but no use. Now what i have to do to improve the Performance of the SELECT, INSERT, UPDATE, DELETE Statements.
Is it make any differents because i am using WindowsXP, 1 GB RAM in Server Machine, and WindowsXP, 512 GB RAM in Client Machine.
Pls. Give me advice for me to improve Performance.
Thank u...!
What and where to change parameters and values ?Well, maybe my previous post was not clear enough, but if you want to keep your job, you shouldn't change anything else on init parameter and you shouldn't fall in the Compulsive Tuning Disorder.
Everyone who advise you to change some parameters to some value without any more info shouldn't be listen.
Nicolas.
Similar Messages
-
How to improve performance of the attached query
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 1duplicate thread..
How to improve performance of attached query -
How to improve performance of insert statement
Hi all,
How to improve performance of insert statement
I am inserting 1lac records into table it takes around 20 min..
Plz help.
Thanx In Advance.I tried :
SQL> create table test as select * from dba_objects;
Table created.
SQL> delete from test;
3635 rows deleted.
SQL> commit;
Commit complete.
SQL> select count(*) from dba_extents where segment_name='TEST';
COUNT(*)
4
SQL> insert /*+ APPEND */ into test select * from dba_objects;
3635 rows created.
SQL> commit;
Commit complete.
SQL> select count(*) from dba_extents where segment_name='TEST';
COUNT(*)
6
Cheers, Bhupinder -
How to improve Performance for Select statement
Hi Friends,
Can you please help me in improving the performance of the following query:
SELECT SINGLE MAX( policyterm ) startterm INTO (lv_term, lv_cal_date) FROM zu1cd_policyterm WHERE gpart = gv_part GROUP BY startterm.
Thanks and Regards,
Johnylong lists can not be produced with a SELECT SINGLE, there is also nothing to group.
But I guess the SINGLE is a bug
SELECT MAX( policyterm ) startterm
INTO (lv_term, lv_cal_date)
FROM zu1cd_policyterm
WHERE gpart = gv_part
GROUP BY startterm.
How many records are in zu1cd_policyterm ?
Is there an index starting with gpart?
If first answer is 'large' and second 'no' => slow
What is the meaning of gpart? How many different values can it assume?
If many different values then an index makes sense, if you are allowed to create
an index.
Otherwise you must be patient.
Siegfried -
How to improve performance of the program
I have this program which loops 3 times and in each loop it creates differents variants and calls the program passing these variants. Now the pple who run this program say that the performance of the program decreased. They say that if this run it takes 3times more time than running individual program 3 times seperately. Any ideas on how i should go about this. Seems like with in the loop the all the information about the second program which is being called is stored.Any ideas on how to clear the program memory with in the loop.
Let me explain in little more detail. The program which i wrote create variants in a loop and passes them to the report which is also called inside the loop like.
do 3 times.
*create variant.
submit <program> X via selection-screen using tables....
enddo.
Now what this report does is it just retrieves like 500,000 records and updates them to another table. -
How to improve performance of the below code.
Hello.
This below code is show 80% database performance in runtime analysis ( transaction SE30). I am using view KNA1VV for retrieving data using customer and sales area from selection screen.
Please advice how can I improve the performance of below code.
Fetch the customer details from view KNA1VV
SELECT kunnr
vkorg
vtweg
spart
land1
name1
ort01
pstlz
regio
stras
INTO TABLE t_cust
FROM kna1vv
WHERE kunnr IN s_kunnr
AND vkorg IN s_vkorg
AND vtweg IN s_vtweg
AND spart IN s_spart
AND loevm = space
AND loevm_knvv = space.
IF sy-subrc EQ 0.
SORT t_cust BY kunnr.
ELSE.
w_flag = c_true_x.
ENDIF.
Fetch customers for entered company code
IF NOT t_cust[] IS INITIAL AND NOT s_bukrs IS INITIAL.
SELECT kunnr
FROM knb1
INTO TABLE lt_knb1
FOR ALL ENTRIES IN t_cust
WHERE kunnr = t_cust-kunnr
AND bukrs IN s_bukrs
AND loevm = space.
Thanks,80% is just a relation and must not be problematic, what about the absolute runtime, is that acceptable?
Also, your range S_KUNNR could contain anything from a single value (super fast) to nothing (probably slow, depends on number of entries in KNA1VV), so what do you expect here?
Thomas -
How to improve performance in the following PL/SQL
I'm running this PL/SQL in a Job step inside a UNIX job, is taking too long to finish and is a simple process to do but definetely there is something that I need to do.
I have to find records that are not included in my T_XREF table from my temporary table T_TEMP, identify those records and insert a new record with values located in the T_TEMP table into the T_XREF table.
T_TEMP has 2 millions records and T_XREF has 12,000 records, I have a Unique IDX in T_TEMP (claim,num_dtl) and a NON UNIQUE IDX by (7 fields).
on the T_XREF table I have 1 UNIQUE IDX (comp_key).
this is part of the PL/SQL:
DECLARE
v_rowid ROWID;
CURSOR c_FixComp1 IS
SELECT DISTINCT sak_acct,ind_split,cde_state,cde_fed,med_a,med_b,ind_cnty
FROM T_TEMP
WHERE claim >= 0;
BEGIN
FOR r_FixComp1 IN c_FixComp1 LOOP
BEGIN
SELECT ROWID
INTO v_rowid
FROM T_XREF x
WHERE x.sak_acct = r_FixComp1.sak_acct
AND x.ind_split = r_FixComp1.ind_split
AND x.cde_state = r_FixComp1.cde_state
AND x.cde_fed = r_FixComp1.cde_fed
AND x.med_a = r_FixComp1.med_a
AND x.med_b = r_FixComp1.med_b
AND x.ind_cnty = r_FixComp1.ind_cnty;
EXCEPTION
WHEN NO_DATA_FOUND THEN
INSERT INTO T_XREF
(comp_key,
sak_acct,
ind_split,
cde_state,
cde_fed,
med_a,
med_b,
ind_cnty)
VALUES
(seq_xref.Nextval,
r_FixComp1.sak_acct,
r_FixComp1.ind_split,
r_FixComp1.cde_state,
r_FixComp1.cde_fedt,
r_FixComp1.med_a,
r_FixComp1.med_b,
r_FixComp1.ind_cnty);
WHEN OTHERS THEN
cnt_notinserted := cnt_notinserted + 1;
END;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
END;
in my Cursor's query I'm forcing to do a IDX (range scan) and the result of that query is only 1300 rec after doing the DISTINCT of those fields. When starts analyzing record by record this simple script takes more than 10 hrs to run!!!
I'll appreciate any advice you can give me. ThanksThe reason your code is slow is that you are doing something that wasn't even best practice in version 7.0.12. Chris Poole is absolutely correct: There is no reason for any procedural code.
Even if there were a valid reason for PL/SQL the row-by-row cursor fetch construct has been obsolete for 6 years.
Do what Chris is suggesting here and then put away the cursor loops and learn how to write this code:
http://www.psoug.org/reference/array_processing.html
Check out the SLOW_WAY and FAST_WAY demos. -
How to improve performance of attached query
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 1duplicate thread..
How to improve performance of attached query -
I do a hard reset of my iPhone every so often because I feel it improves performance, but Apple states 'Reset ONLY if the device is not responding'. Forget about my OCD on this, but is their any reason my Apple stresses the ONLY DO THIS if not responding?
deggie wrote:
Because it is more far-reaching than just turning the phone off and back on, it completely takes out anything in volatile memory, etc. I do reset mine if I notice problems such as no email coming in, text message issues, etc. but the same thing could probably be accomplished by just turning the phone off and on in your case.
Thanks deggie, I think I get it now. Volatile memory (I had to look it up!) is memory that is lost on loss of power, so it's as you say... I'm not achieving anything on a normally functioning iPhone as on-off achieves the same result!... Thanks -
How to improve performance of MediaPlayer?
I tried to use the MediaPlayer with a On2 VP6 flv movie.
Showing a video with a resolution of 1024x768 works.
Showing a video with a resolution of 1280x720 and a average bitrate of 1700 kb/s leads to a delay of the video signal behind the audio signal of a couple of seconds. VLC, Media Player Classic and a couple of other players have no problem with the video. Only the FX MediaPlayer shows a poor performance.
Additionally mouse events in a second stage (the first stage is used for the video) are not processed in 2 of 3 cases. If the MediaPlayer is switched off, the mouse events work reliable.
Does somebody know a solution for this problems?
Cheers
masimduplicate thread..
How to improve performance of attached query -
How to improve performance of query
Hi all,
How to improve performance of query.
please send :
[email protected]
thanks in advance
bhaskarhi
go through the following links for performance
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
http://www.asug.com/client_files/Calendar/Upload/ASUG%205-mar-2004%20BW%20Performance%20PDF.pdf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2 -
How to improve performance of Siebel Configurator
Hi All,
We are using Siebel Configurator to model the item structures. We wrote few constraint rules on that. But while launching the configurator it is taking more time to open.
Even without rules also it is behaving in the same manner.
Any inputs on this could be highly appreciated
RAMduplicate thread..
How to improve performance of attached query -
I have a MAC Pro from 2011 currently running MAC OS 10.9.5. This weekend I cloned the MAC HD drive to a new SSD drive for improved performance. The clone was completed successfully with no errors. After the clone completed I successfully restarted my system using the SSD as the boot device. I then successfully tested all of my products, including Photoshop CS6 and all of its plug-ins. I successfully tested the key features that I frequently use. Today while attempting to launch Photoshop CS6 a message is being displayed indicating that a scratch disk cannot be found. All drives are available on the system via the Finder and Disk Utility. I can access all drives including the old MAC HD which is no longer the boot device. I've even attempted to launch Photoshop from the old device yet the same error persist. Is there a way to review/edit/change Photoshop preferences if Photoshop doesn't launch? I've even restarted my system several times to see if that would resolve the issues. Does anyone have any recommendations for this issue? Have you previously address this issue?
Thank you Gregg WilliamsBoilerplate text:
Reset Preferences
http://forums.adobe.com/thread/375776
1) Close the program and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (not reversible)
or
2) Move the Folder. See:
http://www.bugge.com/Family-and-friends/Illy/illy.html
--OB -
How to improve performance of slect
Hi friends,
Following code is from a report for getting opening stock of material. This particular statement is taking 99% time of the run time. Kindly advise how this select statement can be modified in order to improve the performance of the report.
DATA: BEGIN OF I_MARD OCCURS 0,
WERKS LIKE MARD-WERKS,
MATNR LIKE MARD-MATNR,
LGORT LIKE MARD-LGORT,
LABST LIKE MARD-LABST,
INSME LIKE MARD-LABST,
MEINS LIKE MARA-MEINS,
EINME LIKE MARD-LABST,
SPEME LIKE MARD-LABST,
RETME LIKE MARD-LABST,
END OF I_MARD.
SELECT MKPFMBLNR MKPFMJAHR MKPFVGART MKPFBUDAT
MSEGZEILE MSEGBWART MSEGXAUTO MSEGMATNR
MSEGWERKS MSEGLGORT MSEGSHKZG MSEGMENGE
MSEG~MEINS
INTO CORRESPONDING FIELDS OF TABLE I_MKPF
FROM MKPF AS MKPF JOIN
MSEG AS MSEG
ON MKPFMBLNR = MSEGMBLNR
AND MKPFMJAHR = MSEGMJAHR
FOR ALL ENTRIES IN I_MARD
WHERE MKPF~BUDAT GE S_BUDAT-LOW
AND MSEG~MATNR EQ I_MARD-MATNR
AND MSEG~WERKS EQ I_MARD-WERKS
AND MSEG~LGORT NE ''.
thanks
anuHi..,
Remove that CORRESPONDING FIELDS OF TABLE .... it drastically reduces the Performance !!!
The definition of table I_MKPF should be like this !! then onli u can remove the <b>INTO CORRESPONDING FIELDS OF TABLE</b>...
DATA: BEGIN OF I_MKPF OCCURS 0,
MBLNR TYPE MKPF-MBLNR,
MJAHR TYPE MKPF-MJAHR,
VGART TYPE MKPF-VGART,
BUDAT TYPE MKPF-BUDAT,
ZEILE TYPE MSEG-ZEILE,
BWART TYPE MSEG-BWART
XAUTO TYPE MSEG-XAUTO
MATNR TYPE MSEG-MATNR
WERKS TYPE MSEG-WERKS
LGORT TYPE MSEG-LGORT
SHKZG TYPE MSEG-SHKZG
MENGE TYPE MSEG-MENGE
MEINS TYPE MSEG-MEINS
END OF I_MKPF.
Now the select statement is ....
and when u are using the For all entries .. u always need to check the IS NOT INITIAL condition ...
<b>
if not I_MARD[] is initial .</b>
SELECT MKPFMBLNR MKPFMJAHR MKPFVGART MKPFBUDAT
MSEGZEILE MSEGBWART MSEGXAUTO MSEGMATNR
MSEGWERKS MSEGLGORT MSEGSHKZG MSEGMENGE
MSEG~MEINS
<b>INTO TABLE I_MKPF</b>
FROM MKPF AS MKPF JOIN
MSEG AS MSEG
ON MKPFMBLNR = MSEGMBLNR
AND MKPFMJAHR = MSEGMJAHR
FOR ALL ENTRIES IN I_MARD
WHERE MKPF~BUDAT GE S_BUDAT-LOW
AND MSEG~MATNR EQ I_MARD-MATNR
AND MSEG~WERKS EQ I_MARD-WERKS
AND MSEG~LGORT NE ''.
<b>endif.</b>
Any way u r going for for all entries .. on fields WERKS and MATNR..
so based on your requirement its better if u use the SORT and DELETE ADJUCENT DUPLICATES on the table I_MARD..
i mean before the select statement ...
sort I_MARD by MATNR WERKS.
delete adjucent duplicates from I_MARD comparing MATNR WERKS. <i>**( this eliminates duplicate records when using For all entries )</i>
Reward all helpful answers !!!
regards,
sai ramesh -
How to improve performance for Custom Extractor in BI..
HI all,
I am new to BI and started working on BI for couple of weeks.. I created a Custom Extractor(Data View) in the Source system and when i pull data takes lot of time.. Can any one respond to this, suggesting how to improve the performance of my custom Extractor.. Please do the needfull..
Thanks and Regards,
Venugopal..Dear Venugopal,
use transaction ST05 to check if your SQL statements are optimal and that you do not have redundant database calls. You should use as much as possible "bulking", which means to fetch the required data with one request to database and not with multiple requests to database.
Use transaction SE30 to check if you are wasting time in loops and if yes, optimize the algorithm.
Best Regards,
Sylvia
Maybe you are looking for
-
Read-Only Text Field Using JavaScript Code
I'd like to make a text field read-only by using JavaScript and also having IF & ELSE statements. I want it to be like this: if the answer from the dropdown menu is YES, then the text field is read only but if the answer is NO then the text field is
-
FF 9.0.1 will not allow me to click "Remember Password"
I turned on the setting for FF to remember my logins & passwords. When I enter my information to login into a site FF will ask me if I would like to remember my password but when I click "Remember Password" it registers the click (the button gains an
-
Mac client not showing up in Windows DNS
Hi, I've got a Windows Server 2003 Active Directory network with DNS, DHCP, etc. all running. I have a Mac OS X Panther client I want to be added to my DNS servers automatically. I can successfully bind the mac to AD, and login to AD just fine. The c
-
My 27" iMac, late 2009, Mountain Lion has 164 GB free space of 500 GB total, and has slowed down noticeably the past month. There are three additional HD's connected, could that be part of the problem? Photoshop operations are the most affected, I'd
-
MacBook Pro Hard Drive Capacity Says 297 GB but Advertised 320 GB
I Recently purchased a MacBook Pro 2.57 GHz, 320 GB and was wondering why it says the capacity is only 297 GB instead of 320 GB? Thanks for the help-