How can i get better performance of query
Hi,
i have created one view which using 11 table. some table is used more than 1 time. i have used outjoin for that but it is very slow to get output.
my view is as below.
CREATE OR REPLACE FORCE VIEW MUDRA.RETRIEVAL_PURCHASE
(UNIQUEID, BRANCHNAME, DOCNUMBER, DOCUMENTTYPE, ACCOUNTINGYEAR,
INWARDDATE, PAYTOSUPPLIERID, JOBTYPEID, JOBGROUPDESCRIPTION, PVNUMBER,
PVDATE, DOCDATE, DUEDATE, SUPPLIERID, SUPPLIERNAME,
ITEMAMOUNTGLCODE, ITEMAMOUNTGLNAME, GLCODE, GLNAME, CONTROLGLCODE,
INVOICENUMBER, INVOICEDATE, DOCAMOUNT, PAIDAMOUNT, INVOICEBASEAMOUNT,
INVOICESURCHARGEAMOUNT, INVOICEGROSSAMOUNT, INVOICECOMMISSION, INVOICENETAMOUNT, INVOICEDISCOUNTAMOUNT,
INVOICEBOXCHARGES, GROSSAMOUNT, COMMISSION, COMMISSIONGLCODE, COMMISSIONGLNAME,
PASSEDINVOICENETAMOUNT, PASSEDINVOICESALESTAXAMOUNT, RECOVERYTAXAMOUNT, TAXRECOVERYGLCODE, TAXRECOVERYGLNAME,
RECOVERYTAXABLEAMOUNT, TAXRECOVERYPERCENTAGE, PASSEDINVOICEDISCOUNTAMOUNT, DISCOUNTGLCODE, DISCOUNTGLNAME,
TDSAMOUNT, TDSGLCODE, TDSGLNAME, TAXABLEAMOUNT, TDSPERCENTAGE,
TDSSECTION, TAXAMOUNT, SALESTAXAMOUNT, INVOICENETPAYABLE, PASSEDINVOICEBASEAMOUNT,
PASSEDINVOICESURCHARGEAMOUNT, PASSEDINVOICETAXAMOUNT, PASSEDINVOICERECOVERYTAXAMOUNT, PASSEDINVOICEGROSSAMOUNT, PASSEDINVOICECOMMISSION,
PASSEDINVOICEBOXCHARGES, PASSEDINVOICENETPAYABLE, ALLOCATEDAMOUNT, ALLOCATEDTAXAMOUNT, ALLOCATEDTAXRECOVERYAMOUNT,
COMPANYID, DIVISIONID, SUBDIVISIONID, LOCATIONID, PAIDTAX,
OSAMT, CANCELLED, BOXCHARGEGLCODE, BOXCHARGEGLNAME, REMARKS,
YEARENDBALANCE, RECONCILEFLAG, BATCHNUMBER, PAYCATEGORY, CREDITAMOUNT,
CREDITNOTEAMOUNT, TOKENAMOUNT, PV_NO, PV_ACC_YR, SUPPLIERDISCOUNTAMOUNT,
SUPPLIERDISCOUNTPERCENTAGE, SUPPLIERDISCOUNTGLCODE, SUPPLIERDISCOUNTGLNAME, CLIENTID, CLIENTNAME,
BILLNUMBER, ALLOCATEDTOTALAMOUNT)
AS
SELECT DISTINCT a.UNIQUEID,bm.displayname BRANCHNAME, a.DOCNUMBER,a.DOCUMENTTYPE, a.ACCOUNTINGYEAR,a.INWARDDATE,a.PAYTOSUPPLIERID,
a.JOBTYPEID, jm.JOBGROUPDESCRIPTION, a.PVNUMBER, a.PVDATE, a.DOCDATE, a.DUEDATE,
a.SUPPLIERID, b.suppliername,a.ITEMAMOUNTGLCODE GLCODE, c.glname,
A.GLCODE,C1.GLNAME,
a.GLCODE CONTROLGLCODE,a.INVOICENUMBER, a.INVOICEDATE,
a.INVOICEBASEAMOUNT, a.INVOICESURCHARGEAMOUNT, a.INVOICEGROSSAMOUNT, a.INVOICECOMMISSION, a.INVOICENETAMOUNT, a.INVOICEDISCOUNTAMOUNT, a.INVOICEBOXCHARGES,
a.PASSEDINVOICENETPAYABLE + a.PASSEDINVOICETAXAMOUNT DOCAMOUNT,
a.ALLOCATEDAMOUNT PAIDAMOUNT, NVL(a.PASSEDINVOICEGROSSAMOUNT,0)+NVL(a.PASSEDINVOICESALESTAXAMOUNT,0)+
NVL(a.PASSEDINVOICEBOXCHARGES,0) -NVL(a.PASSEDINVOICEDISCOUNTAMOUNT,0) GROSSAMOUNT,a.PASSEDINVOICECOMMISSION COMMISSION,
a.COMMISSIONGLCODE,C2.GLNAME,
a.PASSEDINVOICENETAMOUNT ,a.PASSEDINVOICESALESTAXAMOUNT,
a.PASSEDINVOICERECOVERYTAXAMOUNT RECOVERYTAXAMOUNT,a.TAXRECOVERYGLCODE,C3.GLNAME,
a.RECOVERYTAXABLEAMOUNT,a.TAXRECOVERYPERCENTAGE ,
a.PASSEDINVOICEDISCOUNTAMOUNT ,a.DISCOUNTGLCODE, C4.GLNAME,
a.PASSEDINVOICETAXAMOUNT TDSAMOUNT,a.TDSGLCODE,C5.GLNAME,
a.TAXABLEAMOUNT,a.TDSPERCENTAGE, a.TDSSECTION,
a.TAXAMOUNT, a.SALESTAXAMOUNT, a.INVOICENETPAYABLE, a.PASSEDINVOICEBASEAMOUNT, a.PASSEDINVOICESURCHARGEAMOUNT, a.PASSEDINVOICETAXAMOUNT,
a.PASSEDINVOICERECOVERYTAXAMOUNT, a.PASSEDINVOICEGROSSAMOUNT, a.PASSEDINVOICECOMMISSION, a.PASSEDINVOICEBOXCHARGES, a.ALLOCATEDAMOUNT,
a.ALLOCATEDTAXAMOUNT, a.ALLOCATEDTAXRECOVERYAMOUNT, a.COMPANYID, a.DIVISIONID, a.SUBDIVISIONID, a.LOCATIONID,
a.PASSEDINVOICENETPAYABLE,
a.ALLOCATEDTAXRECOVERYAMOUNT PAIDTAX, A.PASSEDINVOICENETPAYABLE-A.ALLOCATEDAMOUNT OSAMT,
NVL(a.CANCELLED,'N'), a.REMARKS,
a.YEARENDBALANCE, a.RECONCILEFLAG, a.BOXCHARGEGLCODE , C6.GLNAME,
a.BATCHNUMBER, a.PAYCATEGORY, a.CREDITAMOUNT,
a.CREDITNOTEAMOUNT, a.TOKENAMOUNT, a.PV_NO, a.PV_ACC_YR, a.SUPPLIERDISCOUNTAMOUNT, a.SUPPLIERDISCOUNTPERCENTAGE,
a.SUPPLIERDISCOUNTGLCODE ,C7.GLNAME , 0,
NULL ,
NULL ,
NULL
FROM supplierinvoiceheader a , suppliermaster b, glmaster c , jobtypemaster jm , branchmaster bm,
GLMASTER C1 ,GLMASTER C2 ,GLMASTER C3,
GLMASTER C4 ,GLMASTER C5,GLMASTER C6 ,GLMASTER C7
WHERE a.uniqueid=b.uniqueid AND a.supplierid=b.supplierid AND a.itemamountglcode = c.glcode (+)
AND A.COMMISSIONGLCODE=C2.GLCODE (+) AND A.TAXRECOVERYGLCODE=C3.GLCODE(+)
AND A.DISCOUNTGLCODE=C4.GLCODE(+) AND A.TDSGLCODE=C5.GLCODE(+) AND
A.BOXCHARGEGLCODE=C6.GLCODE(+) AND A.SUPPLIERDISCOUNTGLCODE=C7.GLCODE(+)
AND A.GLCODE=C1.GLCODE (+)
AND a.jobtypeid=jm.jobtypeid AND a.uniqueid=bm.uniqueid;
here i have used GLMASTER 7 times because i want all glcodes descrition in single query. this view i used in java to retrive information.
so is there any other way to get fast output ?
i m waiting for your early reply.
Thanx
Hi Aron,
Here i send you details of tables.
While running this views to get all rows, it takes 1.50 mintus.
Total 28047 rows are fetched.
EXPLAN IS AS BELOW,
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=CHOOSE 410 5368
VIEW RETRIEVAL_PURCHASE 410 578 K 5368
SORT UNIQUE 410 194 K 5368
HASH JOIN 410 194 K 5316
HASH JOIN OUTER 236 104 K 5062
HASH JOIN OUTER 236 98 K 4994
HASH JOIN OUTER 236 93 K 4930
HASH JOIN OUTER 247 91 K 4866
HASH JOIN OUTER 259 89 K 4802
HASH JOIN OUTER 291 93 K 4734
HASH JOIN OUTER 22 K 6 M 3136
HASH JOIN OUTER 22 K 6 M 1654
HASH JOIN 22 K 5 M 306
TABLE ACCESS FULL BRANCHMASTER 175 2 K 1
HASH JOIN 22 K 5 M 225
TABLE ACCESS FULL JOBTYPEMASTER 132 2 K 1
TABLE ACCESS FULL SUPPLIERINVOICEHEADER 22 K 4 M 149
TABLE ACCESS FULL GLMASTER 6 K 162 K 14
TABLE ACCESS FULL GLMASTER 6 K 162 K 14
TABLE ACCESS FULL GLMASTER 6 K 162 K 14
TABLE ACCESS FULL GLMASTER 6 K 162 K 14
TABLE ACCESS FULL GLMASTER 6 K 162 K 14
TABLE ACCESS FULL GLMASTER 6 K 162 K 14
TABLE ACCESS FULL GLMASTER 6 K 162 K 14
TABLE ACCESS FULL GLMASTER 6 K 162 K 14
TABLE ACCESS FULL SUPPLIERMASTER 16 K 531 K 102
supplierinvoiceheader 28727 rows
suppliermaster 16538 rows
glmaster 23500 rows
jobtypemaster 175 rows
branchmaster 163 rows.
Glmaster table is used 7 times bcoz there are 7 differect type of GLCODES in supplierinvoiceheader table. and i want all 7 glcodes and its name in single query, because this view i used in JSP code.
the pk are as below of each table.
supplierinvoiceheader
UNIQUEID , DOCNUMBER
suppliermaster
UNIQUEID , SUPPLIERID
glmaster
GLCODE
jobtypemaster
JOBTYPEID
branchmaster
UNIQUEID
if you need another information then pl. let me know.
bye.
Similar Messages
-
Just updated to 7.0 and now to 7.01 and have performance issues on my fire breathing Win 7 64 system. I am constantly getting the refresh blue circle and screen dimming...this will go on for a couple of minutes and I have to go to the Task Manger to end process to get out of firefox.
I had the same issue on my Win 7 64 bit system. The browser became incredibly slow. I found these performance tweaks which have made and amazing difference in 7.01.
http://techfragments.com/news/538/Software/The_12_Best_Firefox_AboutConfig_Performance_Tweaks.html
I did not make the ram tweak and the tweak for content.notify.backoffcount actually made things worse. Other tweaks I did not do are the browser blink, mouse to paste, and source editor since these really don't seem performance related. -
How can I get better performance with OSX on my iMac G3?
I just recently got a G3 iMac running at 400mhz with 512 mb of RAM, and it has OS 10.4.10. I am relatively new to Macs; its been a few years since I've used one.
So, it actually runs surprisingly well, but I'm wondering if theres a way to sort of tone the visuals to make it run a little faster. I loaded windows XP pro onto an older dell that I just had sitting around, and was able to tone down the visuals enough to make it run very well on a 500 mhz machine with 256 mb of RAM, so I'm sure if I can tone down XP enough for an old computer, I can do the same with OSX.Welcome to Apple Discussions.
You are somewhat limited by the 400MHz processor speed. Increasing your RAM will be helpful. Look at these links
52 Ways to Speed Up OS X
http://www.imafish.co.uk/articles/post/articles/130/52-ways-to-speed-up os-x/
Tuning Mac OS X Performance
http://www.thexlab.com/faqs/performance.html
11 Ways to Optimize Your Mac's Performance
http://lowendmac.com/eubanks/07/0312.html
The Top 7 Free Utilities To Maintain A Mac.
http://mac360.com/index.php/mac360/comments/thetop_7_free_utilities_to_maintain_amac/
Mac OS X: System maintenance
http://discussions.apple.com/thread.jspa?messageID=607640
Cheers, Tom -
I'm getting a very low signal from my Blackbird interface. The fire wire connection is selected properly and track recording sliders set. However the recording level slider in the lower right corner is grayed out. How can I get better signal?
If it's slow on startup it would be extensions loading or LaunchDaemons starting up.
You should have a look in:
/Library/LaunchDaemons
/Library/Extensions
You can count out anything in your home folder and it shouldn't put anything in /System as that's reserved for Apple. -
How can I get better looking slow mo??
Right now when I retime my vdieos in fcpX the movement gets blurred and looks like sh** its really annoying. How can i get my videos slowed down without losing the sharpness, and by getting rid of the motion blur?? CHEERS!!
Getting good, or great results depends quite a lot on your source video.
Use a tripod, not hand held. (or attached to your surf board)
Use progressive.
Shoot 60p fps and conform it to either 30 or 24 fps. (50% or 40%)
Shoot with a high shutter speed, at least double your frame rate.
Try not to pan, a moving subject with a moving background is more difficult to slow down.
Optical flow can improve things, but that depends a lot on what you're trying to slow down. Products like Twixtor have much more control than FCP X's optical flow option, but I don't think they have a plug-in for FCP X.
Some of the best examples you'll see on the web (really slow stuff like 10%) are typically shot with a DSLR, on a tripod, really high shutter speed and only one moving object. (person flying off a skate board)
If you don't have the option to control what and how the video is shot, then you really won't get very good results. I would suggest only slowing it down 50%, or conform from 60 to 30. But if it's interlaced, then you really only have 30 frames to work with. (or 60 fields) -
How can I get better video quality using my appleTV
I have an appleTV (1st) and I want to get better quality from youtube videos, What should I do ?
Welcome to the Apple Community.
YouTube video does not come from the main YouTube site, it is specially encoded for the Apple TV and other devices that don't play flash. Generally quality is fixed with no way to adjust it and is often restricted by the quality of the video that has been uploaded. -
How can i get the elapsedtime of query some record?
i write a program with dbxml,if i want to know a query uses how much time,what should i do?
thanks for help~Hi Turingcat,
Note that you can use the "time" command of the Berkeley DB XML shell to see how much time a command takes to execute.
But you said you would do this programmatically. So, you can take a look at how the "time" shell command is implemented and do something similar within your program. The "Timer.hpp" and "Timer.cpp" files are found under "DBXML_HOME\dbxml\src\common>.
You could use the time/date related methods specific to C++ or Java (get the time before starting the query, execute the query, then get the time at which the query ended, and calculate the time difference between those moments).
Regards,
Andrei -
How can I get better reception?
I live on a farm on the edge of the Hampton Roads VA area (Norfolk, Newport News, Virginia Beach). Customer service tells me I'm about 3 miles from the nearest cell tower. The MiFi reception seems to work well enough, but since I work remotely half the time, I run out of GB's even though I'm on the largest plan right before the end of each billing month. To avoid the outrageous over charges, I switch to using the hotspot function on my Droid for the last few days of each billing month.
The signal for that device is lousy and have a difficult time even staying connected. Had to restart the hotspot 5 times to complete the registration here and write this post.
I don't have access to DSL or any cable services (if I did, I'd drop my Verizon Wireless non-voice services completely).
Does anyone know of or can suggest any way to boost signal for better service? I have called customer service numerous times and they don't seem to either know or want to help.Hello. I have two suggestions that might help your situation.
Assuming you work indoors and that it degrading your signal, you could get a "booster" (no, not those cheesy stick-on things from TV). I live in a "black hole" for cell reception and purchased a Wi-Ex Zboost signal amplifier. There are different models and also other companies that make them. Basicall it's an amplifier. You put a foot-long tube on your roof (or probably in your case, you would need a directional antenna) and run coax into the area where your home office is. Here is a link that should help. http://www.wi-ex.com/solutions.aspx You can get add-on antennas so you don't necessarily have to get the professional model.
The other suggestion, since you indicated a willingness to change providers, is to go with a satellite system. Probably the most expensive system, but just another suggestion.
Good luck. Hope that helps. -
How can I get better picture quality?
it seems like the picture quality could be better.
Why would expect the picture quality to be better? The camera on iPad was designed with one thing in mind - Facetime. The rear camera is 1.3 Megapixel. The front camera is .7 megapixel. Neither are even close to an inexpensive point and shoot camera and not even the same camera as is supplied with iPhone 4. Sorry you're disappointed, but it's not camera quality. Now, that said, in bright light, the rear facing camera can take an acceptable picture. In lower light, it will be grainy as the specs would suggest.
-
I try to use fototeca to iCloud (beta) in my ipod touch 5 gen and all my photos disappear, how can i get my photos back? ipod touch iOS 8.1.3 if you need something more tell me please
Firs go to fotoeca's support site
If they are not on the iPod or on iCloud then your only hope is:
- A data recovery company
How to perform iPad recovery for photos, videos
Wondershare Dr.Fone for iOS: iPhone Data Recovery - Wondershare Official
http://www.amacsoft.com/ipod-data-recovery.html
iPod recovery software to restore lost music files
http://www.pcrecoverytools.com/ipod-data-recovery.html
-iPod touch Deleted Photo Recovery Tips You Should Know -
How to get better perform here
hi there,
bellow code is using with in the loop. how can i modify to get better performance.
SELECT knumv kposn kwert FROM konv
INTO CORRESPONDING FIELDS OF lt_konv
WHERE knumv EQ lt_output-knumv
AND kposn EQ lt_output-posnr
AND kschl EQ 'VPRS'.
COLLECT lt_konv.
ENDSELECT.
thx in adv.the better solution for the select statement whould be to use the aggreagte function sum for the field kwert:
SELECT knumv kposn sum(kwert)
FROM konv
INTO CORRESPONDING FIELDS OF table lt_konv
WHERE knumv EQ lt_output-knumv
AND kposn EQ lt_output-posnr
AND kschl EQ 'VPRS'.
The select is inside the loop an lt_output.
Aggregate functions and FOR ALL ENTRIES can not be combined, the
FOR ALL ENTRIES is a select distinct !!!
So you must leave the loop around the select and you can't use the FOR ALL ENTRIES, but this is o.k.,
Siegfried -
How can I get the elapse time for execution of a Query for a session
Hi ,
How can I get the elapse time for execution of a Query for a session?
Example - I have a report based on the procedure ,when the user execute that it takes say 3 min. to return rows.
Is there any possible way to capture this session info. for this particular execution of query along with it's execution elapse time?
Thanks in advance.Hi
You can use the dbms_utility.get_time tool (gives binary_integer type value).
1/ Initialize you time and date of beginning :
v_beginTime := dbms_utility.get_time ;
2/ Run you procedure...
3/ Get end-time with :
v_endTime := dbms_utility.get_time ;
4/ Thus, calculate elapsed time by difference :
v_elapsTime := v_endTime - v_beginTime ;
This will give you time elapsed in of 100th of seconds...
Then you can format you result to give correct print time.
Hope it will help you.
AL -
How can I get a query in the search field to open in a new tab or new window from the current window?
If you are searching via the Search Bar on the Navigation Toolbar, this preference can be changed to have searches there open in a Tab.
Type '''about:config''' in the Address Bar and hit Enter. Then answer "I'll be careful". Type this pref in the Search at the top.
'''browser.search.openintab''' = double-click to toggle to '''true''' -
How can I get a better driver for my 1394b Hostcontroller in my Macbook pro 2010 to solve the problem, that it is too slow under Windows 7 installed with bootcamp ?
WIndows can't find a better one than the installed LSI Conformed 1394 HostcontrollerRead and follow the Bootcamp Installation instructions that you were offered to view when you ran Bootcamp Assistant.
Run Bootcamp Assistant again and select the option to download the Bootcamp Support software. Follow the instructions. Then boot into Windows and install the Windows Support software you downloaded and saved. -
How can I get the query name in webitem method ?
Hello,
I have defined a new web item but I can't retrieved parameter of my webitem in the RENDER method for instance. I have declared a parameter in the RSRRENDERATR table like this :
REN_NAME : MY_WEBITEM
ATR_NAME : MY_PARAM
ATR TYP : TEXT
CHR MAX LEN : 50
How can I do this ? How can I get the MY_PARAM value in the RENDER method ?
Thanks a lot
GC.
Edited by: CoGr on Feb 11, 2008 12:10 PMHi ,
data l_r_view type ref cl_rsr_www_view.
data l_t_text_symbols type rrx1_t_txt_symbols.
l_r_view =? n_r_data_provider.
CALL METHOD L_R_VIEW->n_r_request->TEXT_ELEMENTS_GET
IMPORTING
E_T_TXT_ELEMENTS = l_t_text_symbols.
l_t_text_symbols contains all DP information like Query technical name, or Report text last load etc.
best regards,
kai
Maybe you are looking for
-
After iOS 8 upgrade, all my playlists on my iPhone 5 got wiped
Hi, After upgrading to iOS 8, my playlists on my iPhone 5 got wiped. I backed up my iPhone before upgrading. On iTunes, I click on the "phone" tab on the upper right corner and check my playlist that's "On this phone" and everything is there. I tr
-
So, I got a new computer. As my itunes library has gone through a few in its time, it lives permanently on my external hard drive, as this generally makes moving to new computers hassle free. I told my freshly intsalled itunes on my new computer wh
-
BADI / User Exit for APO Order transaction /SAPAPO/SNPTLB
Hi Experts, We have a proxy interface and currently we are using FUNCTION EXIT_SAPMSNPUSER_006 for the APO Order transaction: /SAPAPO/SNPTLB. This exist is triggering before the Order is being saved in APO and at times it is throwing an error 'Order
-
HT201436 Most of the time my phone as not network connection any goes to voicemail
I find few big problem on my phone -1 Most of the time my phone as not network connection and goes to voicemail -2 when I call and I talk I find the call has been cut the words and also I heard half of the words of the person is calling me !! I hope
-
Hi, Is there any way to download whole TableView Data in Excel,which have more than one pages . Looking forward your response. Regards Sachin S M