Select Command taking a lot of time to execute
Dear Experts,
My below SELECT command taking a lot of time to execute.
SELECT wid
matl_desc
INTO TABLE open_wid FROM zwb_table
WHERE ( weight2 = 0 OR weight2 IS NULL ).
Table : zwb_table contains around 7 Lacs records. That's why taking a lot of time . I have also Indexed the table zwb_table with field WID & WEIGHT2 . (zwb_table contains only WID as Primary Key Field)
Structure of Internal Table : open_wid ->
wid LIKE zwb_table-wid,
matl_desc LIKE zwb_table-matl_desc,
Please suggest me how to Improve the Performance of the above Select command.
Thanks in Advance
JACK
Hi Jack,
you are having morethan 7lack records in z table. it is not good practice fetching all the records into internal table and restricting with where clause in loop statement.
I hope you already created secondary index combination of primary key.
check you select query fetching records based on index you have created in ST05.
Refer below link for your program is using index that you have created.
Re: Indexing
Regards,
Peranandam
Edited by: peranandam chinnathambi on Apr 7, 2009 8:38 AM
Similar Messages
-
Background task taking a lot of time to execute
Hi,
There is a background task in my workflow which is taking a lot of time to execute.
I have tested it in dialog mode.. and it works fine.. takes just 2 mins.
Only when the task is executed from background.. it takes about 10 mins.
Is this a config problem? How do I check if it is so?you could try activating a trace (sql) and see what the differences are,.
you could check if maybe user parameters are influencing this. Or ask your basis team if there are a lot of differences between syystem users and dialog users in terms of resource allocation.
Did you find anything different whilst debugging it?
Kind regards, Rob Dielemans -
Script Logic taking a lot of time to execute
Hi,
I have a script logic which does the currency translation
But it takes a lot of time to execute the same. can anyone suggest me to write a effective script logic to reduce the
performance .
I am using the input schedule that uses the script logic to execute with 6000 records.
below is the script logic
*LOOKUP RATE
*DIM R_ACCT=[ACCOUNT].RATETYPE
*DIM FX_LC1:R_CURRENCY ="LC1"
*DIM FX_LC2:R_CURRENCY ="LC2"
*DIM FX_LC3:R_CURRENCY ="LC3"
*DIM FX_LC4:R_CURRENCY ="LC4"
*DIM FX_LRC:R_CURRENCY ="LRC"
*DIM R_ENTITY =GLOBAL
*DIM SCENARIO =[SCENARIO]
*DIM TIME =[TIME]
*ENDLOOKUP
*WHEN ACCOUNT.RATETYPE
*IS "AVG","END"
//TRANSLATE
*WHEN CURRENCY
*IS LC1
*WHEN COMPANY.LC1
*IS <> "NUL"
*REC(FACTOR=LOOKUP(FX_LC1),CURRENCY=USD)
*REC(FACTOR=LOOKUP(FX_LC1)/LOOKUP(FX_LRC),CURRENCY=LRC)
*ENDWHEN
*IS LC2
*WHEN COMPANY.LC2
*IS <> "NUL"
*REC(FACTOR=LOOKUP(FX_LC2),CURRENCY=USD)
*REC(FACTOR=LOOKUP(FX_LC2)/LOOKUP(FX_LRC),CURRENCY=LRC)
*ENDWHEN
*IS LC3
*WHEN COMPANY.LC3
*IS <> "NUL"
*REC(FACTOR=LOOKUP(FX_LC3),CURRENCY=USD)
*REC(FACTOR=LOOKUP(FX_LC3)/LOOKUP(FX_LRC),CURRENCY=LRC)
*ENDWHEN
*IS LC4
*WHEN COMPANY.LC4
*IS <> "NUL"
*REC(FACTOR=LOOKUP(FX_LC4),CURRENCY=USD)
*REC(FACTOR=LOOKUP(FX_LC4)/LOOKUP(FX_LRC),CURRENCY=LRC)
*ENDWHEN
*IS LC_USD
*REC(FACTOR=1,CURRENCY=USD)
*REC(FACTOR=1/LOOKUP(FX_LRC),CURRENCY=LRC)
*ENDWHEN
*ENDWHEN
*COMMIT
Kindly help as soon as possbile
Edited by: Deepak_Hegde on Feb 2, 2012 4:58 PMWhy wouldn't you use standard functionality with *RUN_PROGRAM CURR_CONVERSION?
You'll have to call it multiple times since you want to translate into different currencies, but I think it will still be faster than this script. -
Simple select query is taking a lot of time
hi gems...
my table has 7267563 rows...and i am doing a simple select * from table;
but it is taking a lot of time nearly 25minutes but not completed...
when i did select count(1) from table then it gave the result instantly also select * from table where rownum < 10 is also fine...even when i am selecting all the records using rownum i.e. select * from table where rownum < 7267563 is also giving result instantly...
but the entire table is not getting result i.e. select * from table...also there is no lock in the table(though i know that select is nothing to do with lock)..
what may be the issue..please suggest...thanks in advance...
Edited by: user12780416 on Dec 12, 2011 11:08 PMHi;
Please see below thread
query takes too long ...
help in solving long run query
HOW TO: Post a SQL statement tuning request - template posting
Hope it helps
Regard
Helios -
Can we optimize the query : It is taking a lot of time
the following query is taking a lot of time ...
Can anyone suggest to make it run faster ???
table B has 12 million records
table a has 10000 records
CREATE TABLE less_time
PARALLEL
NOLOGGING
AS
SELECT a.user_id,a.mp_id, COUNT(product_id) product _count
FROM table a,table b
WHERE TRUNC(a.call_time) < TRUNC(SYSDATE) - 1
AND a.history_id = b.call_id
AND b.product_type = 1
AND b..product_status= 50
AND user_id IS NOT NULL
GROUP BY user_id,mp_id;analyze index indx_mtx compute statistics
thanks for explaining David ...
Actually I somewhat bettered it
i made a consolidated index on table b
like create index indx_ty on table b (call_id,mp_id,user_id,b.product_type,product_status)
now the explain plan shows that the query is much much faster also i did one trick in the query
SELECT a.user_id,a.mp_id, COUNT(product_id) product _count
i changed to SELECT a.user_id,a.mp_id, COUNT(1) product _count
to enable it to do FFS
thanks anyways .... -
Hi All,
We have our application on Weblogic Server 8.1 SP5 and its taking a lot of time while starting up.
What I found that these lines are the ones which are taking up majority of the time.
Kindly Suggest how we can improve on this.
####<Jun 15, 2009 4:14:59 PM GMT+05:30> <Info> <Deployer> <sunbom4> <cgServer> <main> <<WLS Kernel>> <> <BEA-149060> <Module uddi of application uddi successfully transitioned from unprepared to prepared on server cgServer.>
This line took more than 2 min.
####<Jun 15, 2009 4:16:50 PM GMT+05:30> <Info> <Deployer> <sunbom4> <cgServer> <main> <<WLS Kernel>> <> <BEA-149060> <Module MLAppCoreWL610.jar of application IntellectMM successfully transitioned from unprepared to prepared on server cgServer.>
####<Jun 15, 2009 4:18:23 PM GMT+05:30> <Info> <Deployer> <sunbom4> <cgServer> <main> <<WLS Kernel>> <> <BEA-149060> <Module OpenFXWrapperEJB.jar of application IntellectMM successfully transitioned from unprepared to prepared on server cgServer.>
The above 2 lines are taking 1.5min each.I suggest that you take some thread dumps 10-15 secs apart during the time it's slow. The log timing alone won't tell you where the threads are spending time.
-
My Mac is taking a lot more time to load photos from iPhone and iPad than was taking before.What can be the reason of it ?
ThanksDO NOT INSTALL MACKEEPER or any other so called 'cleaning ' application. Please read the following user tip:
https://discussions.apple.com/docs/DOC-3036
Look for reasons in this user tip for your issues of slow operation:
https://discussions.apple.com/docs/DOC-3521
Ciao. -
My laptop is taking a lot of time to start up.It just shows the Lenovo screen and stops there.What could be the problem?
Thanksin advance.hi mamuninayak,
The system might be experiencing a boot or a POST issue.
- Remove all USB devices.
- Remove the AC adapter and battery then held down the power button for 15 sec.
Reconnect just the AC and try.
-See if BIOS can be reset.
Start hiting F2 when while powering the system on.
If succesfull in booting into BIOS. Hit F9 the F10
Try Removing the Harddrive and turn the system on, See if there will be any changes.
Hope this helps
Cheers!
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
Follow @LenovoForums on Twitter! -
My iPad is taking a lot of time to factory reset..What should I do?
Hello,
I am currently factory resetting my iPad , but i forgot to do it using my pc , so I did it without using iTunes , I did it using the option in the iPad's settings but it is taking a lot of time , so far it has been 2 hours ... What should I do if it takes more than 5 hours or so?
Thanks in advance,hi mamuninayak,
The system might be experiencing a boot or a POST issue.
- Remove all USB devices.
- Remove the AC adapter and battery then held down the power button for 15 sec.
Reconnect just the AC and try.
-See if BIOS can be reset.
Start hiting F2 when while powering the system on.
If succesfull in booting into BIOS. Hit F9 the F10
Try Removing the Harddrive and turn the system on, See if there will be any changes.
Hope this helps
Cheers!
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
Follow @LenovoForums on Twitter! -
Hello i have a problem that i was making update IOS7 for my i phone 5 it's taking a lot of time about 4 hours till now, i can't use my phone know, it's appere logo i tunes only, can't do eny thing else like shutdown
Hey Andrew keriakous,
Thanks for the question. It sounds like your iPhone may be in recovery-mode. To resolve this issue, see the following:
If you can't update or restore your iOS device
http://support.apple.com/kb/HT1808
Thanks,
Matt M. -
my ipod was disabled and i tried to restore it, now i am downloading an apple software update which is taking a **** lot of time and ipod is still disabled.. will it be ok after the download ends? help please..!!
We need to know more about your system, please download EtreCheck and run the report and please post it on your next reply. Then we can see how your system is configured, what apps are on it and look for anything obvious. We will look forward to seeing your report.
-
hi,
I have a small schema in a database housing lots of users.
The expdp is taking a lot of time for this schema eventhough the old exp takes 1/10 th time.
When i switched on the trace i see its stuck at below on <SID>dw0115741.trc trace file
KUPW: 03:40:41.551: 1: DBMS_LOB.TRIM returned
KUPW: 03:40:41.551: 1: DBMS_METADATA.FETCH_XML_CLOB called
its stuck at
Starting "USER"."USER_JOB": USER/******** dumpfile=USER.dp logfile=USER.log job_name=USER_job parallel=4 exclude=grant,index,trigger,constraint,statistics,index_statistics trace=1FF0300 directory=EXPDP_BKP
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
I have replaces the actual username with USER
sga_target 2147483648
sga_max_size 2634022912
streams_pool_size 0
Does any one has any suggestion?
I tried the metalink as well but didnt find anything useful
Thanks
ShipraPl post details of OS and database versions
Pl see is MOS Doc 453895.1 (Checklist for Slow Performance of Export Data Pump (expdp) and Import DataPump (impdp)) - "Defects 10/11" - can help
HTH
Srini -
Generic Extraction : Taking a lot of time
HI Experts
I have created ZKONV a generic extracter which is a copy of KONV table. It has around 16,00,000 records .When I´m pulling the data in to ODS it is taking a lot of time. it is taking around 5+ hours to load the data. Is there anything wrong with my Datasource why it is taking so much of time.
Kindly provide some inputs
Thanks
NLNHi Lakshminarayana
You got to check couple of things.
First goto the source system and see, how long the extract program is running. The long time may be due to poor source system performance or huge processing at the BW system side. If the job in the source system is running for a long time, then check the source system resource. Build proper index on the mentioned table and see whether it has improved the performance. You can ask the basis people for the SQL trace and they let u know what kindof indexes u can build on the tables.
If the processing is taking more time, then u have to imrpove the start/update routine in the BW side. Please let us know, where exactly u have the problem. Then we can think of resolving it.
Sriram -
Concurrent request is taking a lots of time to run
Hi,
I have one query regarding ICM.
one of the concurrent request is taking a lots of time to run. How can I solve the issue.
Is there any steps to diagnose this issue?
Please reply.
Regards,
ManishHi,
How we can find that particular request are taking long time?See your other thread.
Concurrent request taking long time
Concurrent request taking long time
what is "gather statistrics schema" concurent program and what it does?See (Note: 419728.1 - How To Gather Statistics On Oracle Applications 11.5.10(and above) - Concurrent Process,Temp Tables, Manually).
Regards,
Hussein -
Urgen!! Query takes lots of time to execute and the production is in effect
Hi,
We have some data loading script. This scripts takes lots of time to execute. As Iam new to tunning please do let me know what is the wrong with the query !!
Thanks In advance
Query:
=========
INSERT /*+ PARALLEL */ INTO ris.ris_pi_profile
(ID,COUNTRY_OF_CITIZENSHIP,IMMIGRATION_STATUS,SSN,DOB,GENDER,
ETHNICITY,RACE,DEPARTMENT,DIVISION,INSTITUTION_ID,INST_EMAIL,EFFECT_DATE,ACADEMIC_TITLE,ACADEMIC_POSITION,
OTH_PER_DATA,PCT_RESEARCH,PCT_TEACHING,PCT_CLINICAL,PCT_ADMIN,PCT_OTHER,PCT_TRAINING)
SELECT
ap.id,
p.citizen_cd,
decode(p.visa_cd,'CV',0,'F1',1,'H1',2,'H1B',3,'H2',4,'J1',5,'J2',6,'O1',7,'PR',8,'PRP',9,'TC',10,'TN',11,'TNN',12),
(select n.soc_sec_num from sa.name n where n.name_id = p.name_id),
(select n.birth_date from sa.name n where n.name_id = p.name_id),
(select decode(n.gender_cd,'F',1,'M',2,0) from sa.name n where n.name_id = p.name_id),
(select decode(n.ethnic_cd,'H',1) from sa.name n where n.name_id = p.name_id),
(select decode(n.ethnic_cd,'A',2,'B',3,'I',1,'P',4,'W',5) from sa.name n where n.name_id = p.name_id),
a.dept_name,
a.div_name,
a.inst_id,
(select n.email from sa.name n where n.name_id = p.name_id),
a.eff_date,
ac.acad_pos_desc,
p.acad_pos_cd,
0,
p.research_pct,
p.teach_pct,
p.patient_pct,
p.admin_pct,
p.other_pct,
p.course_pct
FROM
appl1 ap,
sa.personal_data p,
sa.address a,
sa.academic_pos_cd ac,
profile_pi f
WHERE
p.project_role_cd='PI'
and ap.appl_id=f.appl_id
and p.appl_id=f.appl_id
and p.name_id=f.name_id
and a.addr_id=f.addr_id
and p.acad_pos_cd=ac.acad_pos_cd
AND EXISTS (select 1 from ris.ris_institution i WHERE i.id = a.inst_id)
AND EXISTS (select 1 from sa.academic_pos_cd acp WHERE acp.acad_pos_cd = p.acad_pos_cd);
In the execution PLan I see lots of Nested loop, Hash Join
Index( Unique scan)
Table Access by ( Index rowid)
This query is fast in Test DB but ver very slow in prod DB. Need your help Urgent.
MinazWhen your query takes too long...
When your query takes too long ...
Maybe you are looking for
-
How to call webservices in webdynpro abap
Hi Experts, My requirement is I have to call an URL by exporting an XML file to that URL I have to import an XML file again i .e nothing but I have to send request file in the form of XML and need to get response in the form of XML file from the URL
-
How can I set the number of test sockets in my program?
How can I set the number of test sockets in my program? I use LabWindows/CVI 6 and TestStand version 2.0. And I use BatchModel for the parallel UUT running. I didn't found program way to set the number of test socket. I think I should have it. In Te
-
Use solution manager to create customer message and apply oss notes
Hello All, Is it possible to use SAP Solution Manager to create/ open Customer Messages and for the application of OSS notes in satellite systems via solution manager? Currently, our Solution Manager system is bieng used for Central System Monitoring
-
Why does Adobe XI Pro keep appearing on screen each time I open a pdf file?
Why does Adobe XI Pro keep appearing on screen each time I open a pdf file?
-
Recovery with automatic back up
A few days ago, my computer would not load windows. I was told by a couple different computer techs that I needed to reformat the hard drive due to a virus. I have windows vista on a gateway computer that was bought at best buy a year and a half ago.