PLEASE SUGGEST SOME OPTIMIZER HINTS TO TUNE QUERY
Below is explain plan for query
SELECT STATEMENT ALL_ROWSCost: 607,111 Bytes: 169 Cardinality: 1
18 HASH GROUP BY Cost: 607,111 Bytes: 169 Cardinality: 1
17 FILTER
14 TABLE ACCESS BY LOCAL INDEX ROWID TABLE GL.GL_JE_LINES Cost: 88 Bytes: 72 Cardinality: 2
13 NESTED LOOPS Cost: 408,270 Bytes: 11,384,009 Cardinality: 67,361
10 HASH JOIN RIGHT OUTER Cost: 11,954 Bytes: 5,578,020 Cardinality: 41,940
1 TABLE ACCESS FULL TABLE GL.GL_JE_CATEGORIES_TL Cost: 9 Bytes: 7,530 Cardinality: 251
9 HASH JOIN Cost: 11,942 Bytes: 4,319,820 Cardinality: 41,940
7 MERGE JOIN CARTESIAN Cost: 4,171 Bytes: 4,233 Cardinality: 51
2 TABLE ACCESS FULL TABLE XXFC.XXFC_COMPARATIVO_SD_GL_MAPEO Cost: 27 Bytes: 59,740 Cardinality: 1,030
6 BUFFER SORT Cost: 1.84467440737096E19 Bytes: 1,275 Cardinality: 51
5 SORT UNIQUE Cost: 4 Bytes: 1,275 Cardinality: 51
4 TABLE ACCESS BY INDEX ROWID TABLE GL.GL_PERIODS Cost: 4 Bytes: 1,275 Cardinality: 51
3 INDEX RANGE SCAN INDEX XXFC.IDX_GL_PERIODS_PORTAL Cost: 1 Cardinality: 51
8 TABLE ACCESS FULL TABLE GL.GL_CODE_COMBINATIONS Cost: 7,684 Bytes: 45,138,000 Cardinality: 2,256,900
12 PARTITION RANGE ITERATOR Cost: 3 Cardinality: 108 Partition #: 15
11 INDEX RANGE SCAN INDEX GL.GL_JE_LINES_N1 Cost: 3 Cardinality: 108 Partition #: 15
16 TABLE ACCESS BY GLOBAL INDEX ROWID TABLE GL.GL_JE_HEADERS Cost: 3 Bytes: 23 Cardinality: 1 Partition #: 17
15 INDEX UNIQUE SCAN INDEX (UNIQUE) GL.GL_JE_HEADERS_U1 Cost: 2 Cardinality: 1
You must provide sufficient information for us to answer your question. Please read Rob Van Wijk's helpful guide on the sort of things we need to know (and incidentally how you can start to solve your problem yourself): [When your query takes too long|http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]. Randolf Geist has knocked up a [HOW TO: Post a SQL statement tuning request |http://forums.oracle.com/forums/thread.jspa?threadID=863295] which is a template of the helpful way to layout a tuning question. Also, read [his blog on the topic|http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html]
You might also benefit from reading [Tom Kyte’s advice on how to ask questions|http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html].
Cheers, APC
blog: http://radiofreetooting.blogspot.com
Similar Messages
-
I am unable to connect wifi on my phone 4s since last 2 weeks... I am living in shanghai and did not have this issue since 2 weeks... iPad works fine... Please suggest some measures... Tried the on off reset settings etc. but no luck ...
In fact after updating the software to the latest version I am having more of this... Sometimes the wifi button freezes an I can't even slide it to on / off...
ThanksNoooo! Actually I too had d same prob wit my iPhone 4S. When I connect to my wifi network it won't get connected or it wil be grey scaled! I took it to d istore and since I had warranty they replaced my IPhone. It iPad charger has high volt than ur iPhone charger so when u connect wit it, there is a chance where large amount of current passes thru ur iPhone. So for sure it wil damage ur motherboard and its parts! Many said that iOS 6 or 6.0.1 or 6.1 was d reason for tis wifi prob! But apple never made its mistake wit it's software. If and only if u hav hardware prob u wil hav these sort of wifi prob Bluetooth prob! So best way s to replace ur iPhone!
-
I was installing the ios 6 on my iphone 3GS and an error occured and since then it's hanged up and not working. Please suggest some solution
the same thing here! each time its suppose to register with my network, it cant. im wondering if its a hardware problem
-
I have a situation please suggest some transactional solution.
hi,
I have two databases one is entry database (DB1) Where entery is done, other database is reporting database (D2).
we are trying to transfer data using stored procedure from db1 to db2. the sp will be scheduled to run after every 20 to 30 sec.
in db1 we keep three cols in all tables transferedcol, updatedcol, activecol.
--activecol gets 1 if when record is entered first time and remain same while updation.
this col gets 2 if deleted( we do not do physical deletion we only mark 2 in activecol and updagtedcol)
--transferedcol gets 1 if not transfered to db2, if transfered to db2 then we put 0 in it.
if record gets updated then it gets 1 again so that we can transfer it again.
--updatedcol gets 0 for new entry of each record and 1 if updated after transfer of the record to db2 else if any one tries to updated it before transfer then it will be 0 for new record , after the transfer of that record if some one updates the record
then it gets 1 and remains 1 throught out the life . yes it gets 2 if record is deleted ( deletion is not physical , it is logical by setting 2 in activecol and updatedcol).
in db2 we have only required cols for reporting, but if required we can keep some cols like transfered ,active and updated.
this db2 has fk and table gets record from joins of many tables of db1 which also has fks
that is schema is not same.
Q1) i want to transfer only the records having transfered col marked as 1 and after transfering i want to make them 0 from the stored procedure which runs after every 20 30 sec.
please suggest some solution with isolation level.
note: on db1 i want that entery should not be blocked to much and at the same it want stored procedure to transfer the data from db1 to db2 so that people can see the report at the very time.
yours sincerleyI have two databases one is entry database (DB1) Where entery is done, other database is reporting database (D2).
we are trying to transfer data using stored procedure from db1 to db2. the sp will be scheduled to run after every 20 to 30 sec.
Have you considered replication?
BOL: "SQL Server Replication
Replication is a set of technologies for copying and distributing data and database objects from one database to another and then synchronizing between databases to maintain consistency. Using replication, you can distribute data to different locations and
to remote or mobile users over local and wide area networks, dial-up connections, wireless connections, and the Internet.
Transactional replication is typically used in server-to-server scenarios that require high throughput, including: improving scalability and availability; data warehousing and reporting; integrating data from multiple sites; integrating heterogeneous data;
and offloading batch processing. Merge replication is primarily designed for mobile applications or distributed server applications that have possible data conflicts. Common scenarios include: exchanging data with mobile users; consumer point of sale (POS)
applications; and integration of data from multiple sites. Snapshot replication is used to provide the initial data set for transactional and merge replication; it can also be used when complete refreshes of data are appropriate. With these three types of
replication, SQL Server provides a powerful and flexible system for synchronizing data across your enterprise. Replication to SQLCE 3.5 and SQLCE 4.0 is supported on both Windows Server 2012 and Windows 8.
As an alternative to replication, you can synchronize databases by using Microsoft Sync Framework. Sync Framework includes components and an intuitive and flexible API that make it easy to synchronize among SQL Server, SQL Server Express, SQL Server Compact,
and SQL Azure databases. Sync Framework also includes classes that can be adapted to synchronize between a SQL Server database and any other database that is compatible with ADO.NET."
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014 -
Please suggest some swing/bean book(Beginer free downloadable)
Please suggest some dedicated swing/bean book(free downloadable)
as I am at beginer level.
It would be nice if it covers all major topics and suits quick
understanding.Good starting place...
http://java.sun.com/docs/books/tutorial/uiswing/
and here...
http://developer.java.sun.com/developer/onlineTraining/GUI/Swing1/shortcourse.html
then here...
http://developer.java.sun.com/developer/onlineTraining/GUI/Swing2/shortcourse.html -
We are going to develop a huge application using 11g/WebServices/JSF/ADF. Oracle JDeveloper is completely new for us. It is kind of Microsoft Visual Studio and really confusing. There isn't much online help.
Please provide some suggestions regarding web services security, when do we need backing bean, how do we effectively use adfc-config.xml/faces-config.xml, handling inputs, designing the page etc.Hello,
firstly the web service SOA development is not yet available in JDev 11g.
There is plenty of documentation available on JDev and ADF, the complete developer guide book is here:
http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/toc.htm
I would use caution if you are intending to develop a large application and are new to the framework. Ideally you would want to start of with a small to medium size application because it will be very challenging to learn the framework and design your large application at the same time.
Brenden -
Please suggest some useful links for ABAP APO initial understandings
Hi Experts, could you please suggest me some links to understand the basis of APO ABAP coding skills and how it is different from normal ABAP coding. Thanks Mamata
APO-Technical - Supply Chain Management (SCM) - SCN Wiki
http://scn.sap.com/community/scm/apo/blog/2013/05 -
Can some1 please me suggest some good things to work out on USRP using labview..
https://decibel.ni.com/content/groups/ni-usrp-example-labview-vis?view=documents
Omar -
hi all,
i'm trying to find in advance all the applications i'll need so that my transition is smooth and uneventful. i've already done a search and i think i have a fairly good idea in some cases of which programs to use, but i'm always interested in hearing what you think. any suggestions would be appreciated.
essentially, i'm looking for the linux equivalents of:
7-zip:
small and simple compression program. what do you use?
bestpractice (http://www.xs4all.nl/~mp2004/bp/):
it's a simple application that allows me to split, modulate, etc. music files so i can transcribe or practice songs. is there anything like this for arch?
foobar2000:
i know this has been asked many times, but i'm wondering if there are any programs with the following features:
-mass tagging (so i can remove tags from multiple files at once)
-fix vbr headers
-programmable hotkeys
-foobar-style shuffle (internal randomized list of tracks)
-small, light, fast (especially when it comes to loading directories)
-tabbed playlists
-noise sharpening plugin
k-meleon:
just looking for something lean and fast. i think i've settled on midori, but i don't like the accelerators (i'd rather use ctrl + tab and ctrl + shift + tab to change tabs) and there's no accelerators file to edit.
miranda:
i think i've settled on pidgin, but i'm planning on using either pidgin-light or pidgin-mini. what's the difference between them? which one is smaller? do i use pacman to install them?
office 2007:
openoffice is too large and unwieldy for me. i'm looking for something simple, and i think abiword and gnumeric should be fine. and i suppose i could always load a vm to use office 2007. do you have any better suggestions here?
file manager:
thunar-light is probably the best for me, but i'm not sure how to install it. do i use pacman?
thanks again!7-zip
For general compression, I actually just use tar. (e.g. tar -cjf output.tar.bz2 input/).
For 7z compression you can use p7zip.
foobar2000:
- I don't usually use GUI music players, but you might want to check out some of the MPD Clients on this page (the GTK+ and Qt sections)
k-meleon:
- I can't stand K-Meleon, but it's comparable to Kazehakase (which I also can't stand)
miranda:
Pidgin.
i think i've settled on pidgin, but i'm planning on using either pidgin-light or pidgin-mini. what's the difference between them?
No damn clue what the difference is. We only have vanilla Pidgin AFAIK.
do i use pacman to install them?
yes:
pacman -S pidgin
file manager:
I use Thunar, and I like it. I also hear good things about PCManFM, the default file manager of LXDE.
thunar-light is probably the best for me,
Again, not a clue what thunar-light is. Just use Thunar.
but i'm not sure how to install it. do i use pacman?
You use pacman to install pretty much everything.
pacman -S thunar -
Managing Windows Server licences (please suggest some tool)
Hi
Does any body know any good tool for discovering Windows Server keys, and managing licences on different Windows Server versions? I Tried VAMT, but i would preffer something with keys database, that could tell me "You have this many keys left for this
versions of windows server" after including the keys from VLSC.
Any ideas about a tool to manage licences?Hi,
The Microsoft Software Inventory Analyzer will scan a network and give you a report of which Microsoft products are currently installed on each computer. Maybe you can use it to figure out how many licenses you will need to purchase or how many extra
licenses you have:
http://www.microsoft.com/sam/en/ca/msia.aspx
Best regards,
Susie
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
I have two similar tables(AP_P) on 2 DB's.I have to get data from one DB to another . The conditions are:-
1. I have to copy only the tuples which are not present in 3rd table (blacktab).This is specified in cursor(line 2)
2. I can't copy a column value(RI) directly from DB one.I have to get this value(line 36) from another table i.e F_AP (line 28) and update this F_AP also.
3. Change/hard code the value of one column CBLABEL as '00' only(line 37). I think this can be optimized using bind variables or while fetching the value from cursor itself(line 2).
The problem is :-
The number of records in AP_P will be 1,000,000 (BOTH DB'S)
The number of records in Blacktab will be 50000
The number of records in F_AP will be 1,000,000
CREATE OR REPLACE PROCEDURE ap_treat_first_sync IS
CURSOR ap_cur is SELECT CID,CPALIGN,CPLABEL,FROMDATE,FROMTIME,ID,RI,ACTION,NEXT,SNPUPDT,GRP_BEP from service.ap_P@idat23 WHERE CPLABEL = 'A' and cid not in (select cid from service.blacktab) AND GRP_BEP IS NOT NULL;
TYPE ap_record_cur_type IS TABLE OF callink.ap_P%ROWTYPE INDEX BY PLS_INTEGER;
rec_data_ins_cur ap_record_cur_type;
TYPE AP_list_RI IS TABLE OF service.F_AP.RI%TYPE INDEX BY PLS_INTEGER;
ins_AP_RI AP_list_RI;
total_rows INTEGER;
emesg varchar2(200);
BEGIN
dbms_output.put_line('CHECK1');
OPEN ap_cur;
FETCH ap_cur BULK COLLECT INTO rec_data_ins_cur;
CLOSE ap_cur;
dbms_output.put_line(rec_data_ins_cur.count);
total_rows:=rec_data_ins_cur.count;
UPDATE service.F_AP SET status=1 where part=0 and status=0 and ROWNUM <= total_rows RETURNING ri BULK COLLECT INTO ins_AP_RI;
FOR i IN 1 .. total_rows
LOOP
dbms_output.put_line(ins_AP_RI(i));
END LOOP;
FOR i IN 1 .. rec_data_ins_cur.COUNT
LOOP
rec_data_ins_cur(i).ri:=ins_AP_RI(i);
rec_data_ins_cur(i).CPLABEL:='00';
END LOOP;
dbms_output.put_line('ERROR');
FORALL i IN 1 .. rec_data_ins_cur.COUNT
INSERT INTO service.AP_P VALUES rec_data_ins_cur(i);
dbms_output.put_line('ERROR2');
commit;
EXCEPTION
WHEN OTHERS THEN
emesg := SQLERRM;
dbms_output.put_line(emesg);
dbms_output.put_line('ERROR3');
ROLLBACK;
END;
/user620101 wrote:
I have two similar tables(AP_P) on 2 DB's.I have to get data from one DB to another . The conditions are:-
1. I have to copy only the tuples which are not present in 3rd table (blacktab).This is specified in cursor(line 2)
2. I can't copy a column value(RI) directly from DB one.I have to get this value(line 36) from another table i.e F_AP (line 28) and update this F_AP also.
3. Change/hard code the value of one column CBLABEL as '00' only(line 37). I think this can be optimized using bind variables or while fetching the value from cursor itself(line 2).If you finish this operation then you will have the same values in table AP_P on DB one and two and also in table F_AP.
Seems pretty redundant to me. Now you will have trouble to control all this redundancy. It looks even as if your tables do not match proper entities which would also explain the unusual table names.
So I think you biggest problem is the data model.
However you can still build one or two single update/Insert or merge statements that should do the job.
Since you are dealing with tables from differnt databases you might want to condier to copy one table complete before doing the comparison.
A temp table could be helpful, but it should be first indexed and analyzed later after the data transfer. This would help the optimizer to choose a better execution plan. It should also reduce a lot of network round trips.
lets assume this table is called service.ap_P_idat23_copy.
Then you can go for a insert similiar to this one:
untested
INSERT INTO service.AP_P (CID,CPALIGN,CPLABEL,FROMDATE,FROMTIME,ID,RI,ACTION,NEXT,SNPUPDT,GRP_BEP )
SELECT c.CID,c.CPALIGN,'00',c.FROMDATE,c.FROMTIME,ID, f.ri, c.ACTION,c.NEXT,c.SNPUPDT,c.GRP_BEP
FROM service.ap_P_idat23_copy c
JOIN F_AP f on f.??? = c.??? -- what is the join condition here? you can't do it simply by ordering the rows. ...
WHERE c.CPLABEL = 'A'
and not exists (select null from service.blacktab bt where bt.cid = c.bt)
AND c.GRP_BEP IS NOT NULL;
--- update F_AP here also --
commit;One problem is that it is not clear how you compare the row that you want to insert which is from table AP_P with the ri value that is from table F_AP. Or does it not matter at all which values from AP_P is matched to which ri value from F_AP. -
Hi Experts
As i am a functional consultant (SD) module, i need to learn ESOA, As a functional consultant i need to learn Business process management(BPM), for that i need some inputs, for that please suggest some sites or if you have any documentation, pls send it to me or if any books are there in the market, pls suggest.
Best Regards
Guru PrasadHi,
Go through the Below Link
Developing Applications with Enterprise SOA
http://www.sappressbooks.com/product.cfm?account=&product=H2913
Enterprise SOA Roadmap
http://www.sappressbooks.com/product.cfm?account=&product=H2905
esoa PDF
http://www.sap.com/brazil/company/sapforum2007/pdf/bengruber.pdf
http://www.pdf-search-engine.com/esoa-pdf.html
SOA + BPM + Business Applications + Netweaver = Happy Customer
Points Are Welcome
Thanks
SubbaRao Chinta -
Hi! I bought my Macbook Pro 13" in october last year but from last month oftenly my WiFi connection hangs up nd stops catching any available Wifi connection?
At last I restart the modem and dn it catches the signal but that too is short lived.
please suggest some solutions
Thanking U,I have this problem on my home network but at the same time when my connection hangs up my other wifi machine remians connected. So i think there's no problem with the modem.
-
Please suggest some good book for Java Spring
I found that Spring in Action tough for a beginnerYou can expect any text on Spring to be relatively advanced, as they're not meant for entry level programmers.
You're expected to have a decent understanding of OO concepts especially.
But yes, the book I mentioned more or less eases you into the whole thing instead of plunging right in.
The book yawmark mentioned is more of a reference. I've not read it (though I've browsed some sections that I needed at times).
At the moment I'm working my way through Pro Spring MVC and Web Flow, not recommended as an introductory text on Spring (it assumes you already know the basics). -
I have bought new i pad2 from singapore. Working very good but suddenly from last two days wifi signals started dropping. Having problem to get proper wifi signals even at my home as comparitively with my other devices like iphone4 and pc's. Please suggest some conclusion and tell what to do.
ThanksBikramvenus-
I believe an iPad 2 is still within the warrantee period. I suggest you contact Apple for advice on how to proceed. Since I don't know where you are, you can start by going to <Country> to select a different location. Then look for a Support tab and a Contact Us link.
Another alternative is to search for an iPad repair center. If you are lucky, there may be one in your city. I do not know what they might charge.
Fred
Maybe you are looking for
-
Error Message "Shuffle cannot be read from or written to"
Anyone able to provide a quick solution to this problem or is my shuffle broke or is it the iTunes? I have uninstalled and installed the programs and updates and it still doesn't work.....I get the same message... It'll be on eBay soon if its this mu
-
I am having trouble migrating my data from my old macbook pro to my new macbook pro.
It just quits and goes back to the begining after setting up the migration for no reason - can anyone tell me why? This is a brand new machine that I bought today. My old machine is working just fine.
-
XBox Music - Changes my album tags, track names an...
I have a well organised music collection on my PC with correct album/artist tags. When I copy music over to the phone (Lumia 920) XBox Music ends up replacing some track tags with random artists, track names, album names and artwork. It also doesn't
-
Importing oracle.sql.BLOB through SQL Loader
Hello, Currently the system we have creates .sql files and executes them. This takes a long time, so we're attempting to change to using SQL Loader. The one problem I'm having that I can't seem to fix is finding out how to imitate the behavior of thi
-
Error reading IDoc Metadata from CRM 5.0 (Basis 7.0) through XI 3.0
We are not able to generate the IDoc metadata from XI 3.0 through IDX2 for port/RFC destination pointing to SAP CRM 5.0 which runs on the Basis 7.0 Web application server. Has anyone run into this issue? We get the dialog box with information "I::00