NO_MERGE in outer query - please explain
Hi,
I'm studying paper about semijoins from www.dbspecialists.com .
One of examples shows optimization via no_merge hint:
SELECT /*+ NO_MERGE (M) */
DISTINCT M.name, M.code, M.description,
M.item_id, M.assignment_id, M.string0, M.string1
FROM (
SELECT A.name, A.code, A.description,
A.item_id, A.assignment_id, FI.string0, FI.string1
FROM relationships R, assignments A, format_items FI
WHERE R.user_id = 134546
AND R.account_id = 134545
AND R.type_code = 0
AND A.item_id = R.item_id
AND FI.item_id = A.item_id
AND EXISTS
(SELECT 1 FROM relationships R1
WHERE R1.item_id = A.item_id AND R1.status = 5
AND R1.user_id = 137279)
AND EXISTS
(SELECT 1 FROM relationships R2
WHERE R2.item_id = A.item_id AND R2.status = 5
AND R2.user_id = 134555)
AND EXISTS
(SELECT 1 FROM relationships R3
WHERE R3.item_id = A.item_id AND R3.status = 5
AND R3.user_id = 134546)
AND EXISTS
(SELECT 1 FROM relationships R4
WHERE R4.item_id = A.item_id AND R4.status = 5
AND R4.user_id = 137355)
AND EXISTS
(SELECT 1 FROM relationships R5
WHERE R5.item_id = A.item_id AND R5.status = 5
AND R5.user_id = 134556)
) M
ORDER BY M.name ASC;Why is NO_MERGE in outer query , I'm sure that this hint should be placed in inline view for making no merging inline view with main query .
expected code like
select * from tab1 , (select * /*+ no_merge */ ...) Regards.
Greg
so this query is equal to the one above ?
SELECT
DISTINCT M.name, M.code, M.description,
M.item_id, M.assignment_id, M.string0, M.string1
FROM (
SELECT /*+ NO_MERGE */ A.name, A.code, A.description,
A.item_id, A.assignment_id, FI.string0, FI.string1
FROM relationships R, assignments A, format_items FI
WHERE R.user_id = 134546
AND R.account_id = 134545
AND R.type_code = 0
AND A.item_id = R.item_id
AND FI.item_id = A.item_id
AND EXISTS
(SELECT 1 FROM relationships R1
WHERE R1.item_id = A.item_id AND R1.status = 5
AND R1.user_id = 137279)
AND EXISTS
(SELECT 1 FROM relationships R2
WHERE R2.item_id = A.item_id AND R2.status = 5
AND R2.user_id = 134555)
AND EXISTS
(SELECT 1 FROM relationships R3
WHERE R3.item_id = A.item_id AND R3.status = 5
AND R3.user_id = 134546)
AND EXISTS
(SELECT 1 FROM relationships R4
WHERE R4.item_id = A.item_id AND R4.status = 5
AND R4.user_id = 137355)
AND EXISTS
(SELECT 1 FROM relationships R5
WHERE R5.item_id = A.item_id AND R5.status = 5
AND R5.user_id = 134556)
) M
ORDER BY M.name ASC;
Similar Messages
-
Hi everyone..
i am new to java..i want to know the importance of interfaces in java....
interface A{
public void print();
class B implements A{
public void print()
System.out.println("Please explain me the importance of Interfaces");
the class B can also be defined with out interface as the following...
class B {
public void print()
System.out.println("Please explain me the importance of Interfaces");
Both the classes have the same functionality ... then what the use of declaring an Interface and implementing it...?
PLEASE EXPLAIN BASIC USE OF INTERFACES....?
Note: Ignore any syntax errors in the code that i have written above
thanks in advanceIn Java, mostly we use inheritance for code reuse.
public class Toy{
public class Ball extends Toy{
}Suppose there is another class Type which doesn't related to Toy family.
public class Tyre{
}Now we know that Ball and Tyre are bouncable. So we will have to implement bounce() method in both class which behave differently.
public class Ball extends Toy{
public void bounce() {
}Suppose there is another class Type which doesn't related to Toy family.
public class Tyre{
public void bounce() {
}*If want to collect bouncable things into a single collection, then how can we do that?*
There is way, we can use abstract class:-
public abstract BouncingThings {
public abstract void bounce();
}Now things that are bouncable can extend BouncingThings class and the collection of bounce things will be
BouncingThings [] bouncingThings;
But there is one problem Java doesn't allow multiple class inheritance. So Ball can't extend both Toy and BouncingThings.
We can use interface:-
public interface Bouncable{
void bounce();
public class Ball extends Toy implements Bouncable{
public void bounce(){
public class Tyre implements Bouncable{
public void bounce(){
Bouncable[] bouncableThings = { new Ball().new Tyre() };Edited by: SandipGaikwad on Oct 16, 2007 12:23 PM -
Can you please explain how this query is fetching the rows?
here is a query to find the top 3 salaries. But the thing is that i am now able to understand how its working to get the correct data :How the data in the alias table P1 and P2 getting compared. Can you please explain in some steps.
SELECT MIN(P1.SAL) FROM PSAL P1, PSAL P2
WHERE P1.SAL >= P2.SAL
GROUP BY P2.SAL
HAVING COUNT (DISTINCT P1.SAL) <=3 ;
here is the data i used :
SQL> select * from psal;
NAME SAL
able 1000
baker 900
charles 900
delta 800
eddy 700
fred 700
george 700
george 700
Regards,
Renu... Please help me in understanding the query.
Your query looks like anything but a Top-N query.
If you run it in steps and analyze the output at the end of each step, then you should be able to understand what it does.
Given below is some brief information on the same:
test@ora>
test@ora> --
test@ora> -- Query 1 - using the non-equi (theta) join
test@ora> --
test@ora> with psal as (
2 select 'able' as name, 1000 as sal from dual union all
3 select 'baker', 900 from dual union all
4 select 'charles', 900 from dual union all
5 select 'delta', 800 from dual union all
6 select 'eddy', 700 from dual union all
7 select 'fred', 700 from dual union all
8 select 'george', 700 from dual union all
9 select 'george', 700 from dual)
10 --
11 SELECT p1.sal AS p1_sal, p1.NAME AS p1_name, p2.sal AS p2_sal,
12 p2.NAME AS p2_name
13 FROM psal p1, psal p2
14 WHERE p1.sal >= p2.sal;
P1_SAL P1_NAME P2_SAL P2_NAME
1000 able 1000 able
1000 able 900 baker
1000 able 900 charles
1000 able 800 delta
1000 able 700 eddy
1000 able 700 fred
1000 able 700 george
1000 able 700 george
900 baker 900 baker
900 baker 900 charles
900 baker 800 delta
900 baker 700 eddy
900 baker 700 fred
900 baker 700 george
900 baker 700 george
900 charles 900 baker
900 charles 900 charles
900 charles 800 delta
900 charles 700 eddy
900 charles 700 fred
900 charles 700 george
900 charles 700 george
800 delta 800 delta
800 delta 700 eddy
800 delta 700 fred
800 delta 700 george
800 delta 700 george
700 eddy 700 eddy
700 eddy 700 fred
700 eddy 700 george
700 eddy 700 george
700 fred 700 eddy
700 fred 700 fred
700 fred 700 george
700 fred 700 george
700 george 700 eddy
700 george 700 fred
700 george 700 george
700 george 700 george
700 george 700 eddy
700 george 700 fred
700 george 700 george
700 george 700 george
43 rows selected.
test@ora>
test@ora>This query joins PSAL with itself using a non equi-join. Take each row of PSAL p1 and see how it compares with PSAL p2. You'll see that:
- Row 1 with sal 1000 is >= to all sal values of p2, so it occurs 8 times
- Row 2 with sal 900 is >= to 9 sal values of p2, so it occurs 7 times
- Row 3: 7 times again... and so on.
- So, total no. of rows are: 8 + 7 + 7 + 5 + 4 + 4 + 4 + 4 = 43
test@ora>
test@ora> --
test@ora> -- Query 2 - add the GROUP BY
test@ora> --
test@ora> with psal as (
2 select 'able' as name, 1000 as sal from dual union all
3 select 'baker', 900 from dual union all
4 select 'charles', 900 from dual union all
5 select 'delta', 800 from dual union all
6 select 'eddy', 700 from dual union all
7 select 'fred', 700 from dual union all
8 select 'george', 700 from dual union all
9 select 'george', 700 from dual)
10 --
11 SELECT p2.sal AS p2_sal,
12 COUNT(*) as cnt,
13 COUNT(p1.sal) as cnt_p1_sal,
14 COUNT(DISTINCT p1.sal) as cnt_dist_p1_sal,
15 MIN(p1.sal) as min_p1_sal,
16 MAX(p1.sal) as max_p1_sal
17 FROM psal p1, psal p2
18 WHERE p1.sal >= p2.sal
19 GROUP BY p2.sal;
P2_SAL CNT CNT_P1_SAL CNT_DIST_P1_SAL MIN_P1_SAL MAX_P1_SAL
700 32 32 4 700 1000
800 4 4 3 800 1000
900 6 6 2 900 1000
1000 1 1 1 1000 1000
test@ora>
test@ora>Now, if you group by p2.sal in the output of query 1, and check the number of distinct p1.sal, min of p1.sal etc. you see that for p2.sal values - 800, 900 and 1000, there are 3 or less p1.sal values associated.
So, the last 3 rows are the ones you are interested in, essentially. As follows:
test@ora>
test@ora> --
test@ora> -- Query 3 - GROUP BY and HAVING
test@ora> --
test@ora> with psal as (
2 select 'able' as name, 1000 as sal from dual union all
3 select 'baker', 900 from dual union all
4 select 'charles', 900 from dual union all
5 select 'delta', 800 from dual union all
6 select 'eddy', 700 from dual union all
7 select 'fred', 700 from dual union all
8 select 'george', 700 from dual union all
9 select 'george', 700 from dual)
10 --
11 SELECT p2.sal AS p2_sal,
12 COUNT(*) as cnt,
13 COUNT(p1.sal) as cnt_p1_sal,
14 COUNT(DISTINCT p1.sal) as cnt_dist_p1_sal,
15 MIN(p1.sal) as min_p1_sal,
16 MAX(p1.sal) as max_p1_sal
17 FROM psal p1, psal p2
18 WHERE p1.sal >= p2.sal
19 GROUP BY p2.sal
20 HAVING COUNT(DISTINCT p1.sal) <= 3;
P2_SAL CNT CNT_P1_SAL CNT_DIST_P1_SAL MIN_P1_SAL MAX_P1_SAL
800 4 4 3 800 1000
900 6 6 2 900 1000
1000 1 1 1 1000 1000
test@ora>
test@ora>
test@ora>That's what you are doing in that query.
The thing is - in order to find out Top-N values, you simply need to scan that one table PSAL. So, joining it to itself is not necessary.
A much simpler query is as follows:
test@ora>
test@ora>
test@ora> --
test@ora> -- Top-3 salaries - distinct or not; using ROWNUM on ORDER BY
test@ora> --
test@ora> with psal as (
2 select 'able' as name, 1000 as sal from dual union all
3 select 'baker', 900 from dual union all
4 select 'charles', 900 from dual union all
5 select 'delta', 800 from dual union all
6 select 'eddy', 700 from dual union all
7 select 'fred', 700 from dual union all
8 select 'george', 700 from dual union all
9 select 'george', 700 from dual)
10 --
11 SELECT sal
12 FROM (
13 SELECT sal
14 FROM psal
15 ORDER BY sal DESC
16 )
17 WHERE rownum <= 3;
SAL
1000
900
900
test@ora>
test@ora>
test@ora>And for Top-3 distinct salaries:
test@ora>
test@ora> --
test@ora> -- Top-3 DISTINCT salaries; using ROWNUM on ORDER BY on DISTINCT
test@ora> --
test@ora> with psal as (
2 select 'able' as name, 1000 as sal from dual union all
3 select 'baker', 900 from dual union all
4 select 'charles', 900 from dual union all
5 select 'delta', 800 from dual union all
6 select 'eddy', 700 from dual union all
7 select 'fred', 700 from dual union all
8 select 'george', 700 from dual union all
9 select 'george', 700 from dual)
10 --
11 SELECT sal
12 FROM (
13 SELECT DISTINCT sal
14 FROM psal
15 ORDER BY sal DESC
16 )
17 WHERE rownum <= 3;
SAL
1000
900
800
test@ora>
test@ora>
test@ora>You may also want to check out the RANK and DENSE_RANK analytic functions.
RANK:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions123.htm#SQLRF00690
DENSE_RANK:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions043.htm#SQLRF00633
HTH
isotope -
I am having email problems with the new Mountain Lion. stmp, imap, etc. I have looked up google info and It is confusing when it comes to TS, SSL also, please explain how to set it up so my email goes out and comes in securely. Help
Incoming Mail (IMAP) Server - requires SSL:
imap.gmail.com
Use SSL: Yes
Port: 993
Outgoing Mail (SMTP) Server - requires TLS:
smtp.gmail.com (use authentication)
Use Authentication: Yes
Use STARTTLS: Yes (some clients call this SSL)
Port: 465 or 587
Account Name:
your full email address (including @gmail.com) Google Apps users, please enter username@your_domain.com
Email Address:
your full Gmail email address ([email protected]) Google Apps users, please enter username@your_domain.com
Password:
your Gmail password
The Quick Answer
Follow the instructions below to set up IMAP1 access in most email clients.
Google Apps users, please follow the default instructions unless otherwise noted, replacing 'your_domain.com' with your actual domain2 name.
this is all greek to me. WHAT IS STARTTLS? On the first page of Apple set up there is a TLS certificate and it is marked NONE- should I change it to the long APPLE CERT option? The next page under ADVANCED: THERE IS A BOX SSL MARKED. Then IMAP Path Prefix - I put stmp.gmail.com.. is that right? Port 993 can use this one? as 456 doesn't work and 587 said it wasn't safe. Under AUTHENTICATION I used PASSWORD. Should I have used external client cert TLS?
Please help me set this up securely. ThanksApple - Support - Mail Setup Assistant
-
Please explain the query?
hello all,
please explain below query used in solution below, thanks in advance!
ELECT MAX(P1.ET) AS ST, P2.ST AS ET
FROM XYZ AS P1
INNER JOIN XYZ AS P2 ON (P1.ST < P2.ST)
GROUP BY P2.ST
HAVING MAX(P1.ET) < P2.ST
IF OBJECT_ID('XYZ') IS NOT NULL
DROP TABLE XYZ
GO
CREATE TABLE XYZ
id int identity(1,1),
ST smalldatetime NOT NULL,
ET smalldatetime NOT NULL
GO
INSERT INTO XYZ (ST, ET)
VALUES ('2010-01-01 9:00AM', '2010-01-01 10:00AM')
INSERT INTO XYZ (ST, ET)
VALUES ('2010-01-01 9:00AM', '2010-01-01 12:00PM')
INSERT INTO XYZ (ST, ET)
VALUES ('2010-01-01 1:00PM', '2010-01-01 2:00PM')
INSERT INTO XYZ (ST, ET)
VALUES ('2010-01-01 3:00PM', '2010-01-01 5:00PM')
INSERT INTO XYZ (ST, ET)
VALUES ('2010-01-01 11:00AM', '2010-01-01 12:00PM')
GO
WITH Gaps(Gap) AS
SELECT COALESCE(SUM(DATEDIFF(MINUTE,ST,ET)), 0)
FROM (
SELECT MAX(P1.ET) AS ST, P2.ST AS ET
FROM XYZ AS P1
INNER JOIN XYZ AS P2 ON (P1.ST < P2.ST)
GROUP BY P2.ST
HAVING MAX(P1.ET) < P2.ST
) gaps
SELECT (
COALESCE(DATEDIFF(MINUTE, MIN(ST), MAX(ET)), 0)
- (SELECT Gap FROM Gaps)
) / 60.0 TotalHrs
FROM XYZSELECT MAX(P1.ET) AS ST, P2.ST AS ET
FROM XYZ AS P1
INNER JOIN XYZ AS P2 ON (P1.ST < P2.ST)
GROUP BY P2.ST
HAVING MAX(P1.ET) < P2.ST
Finds all of the gaps (that is time that is not in any interval in your original data. To see how it works, let's look at an example. I'm going to use data that is a little different than your original data because your data has no gaps.
The query still works if you have no gaps, but it is easier to see what it is doing if the data has some gaps. Also, I'm going to explicitly set the id column instead of making it an identity. This will make it a little easier to identify each
row in the following explanation. So the data I'm going to work with is
CREATE TABLE XYZ
id int,
ST smalldatetime NOT NULL,
ET smalldatetime NOT NULL
GO
INSERT INTO XYZ (id, ST, ET)
VALUES (1, '2010-01-01 9:00AM', '2010-01-01 10:00AM')
INSERT INTO XYZ (id, ST, ET)
VALUES (2, '2010-01-01 9:00AM', '2010-01-01 12:00PM')
INSERT INTO XYZ (id, ST, ET)
VALUES (3, '2010-01-02 1:00PM', '2010-01-02 2:00PM')
INSERT INTO XYZ (id, ST, ET)
VALUES (4, '2010-01-03 3:00PM', '2010-01-03 5:00PM')
INSERT INTO XYZ (id, ST, ET)
VALUES (5, '2010-01-03 7:00PM', '2010-01-03 9:00PM')
Notice that the gaps here are from row 2 to row 3 (12PM on the 1st to 1PM on the 2nd) and row 3 to row 4 (2PM on the 2nd to 3PM on the 3rd) and row 4 to row 5 (5PM on the 3rd to 7PM on the 3rd). So that's what the above subquery should be finding for
us.
To see what a query you don't understand is doing, simplify it to the smallest part you can and see what it returns and then build it up to the final query. So the simplest thing we can do is just the from clause. That gives us
SELECT *
FROM XYZ AS P1
INNER JOIN XYZ AS P2 ON (P1.ST < P2.ST)
/* That gives us the result
1 2010-01-01 09:00:00 2010-01-01 10:00:00 3 2010-01-02 13:00:00 2010-01-02 14:00:00
2 2010-01-01 09:00:00 2010-01-01 12:00:00 3 2010-01-02 13:00:00 2010-01-02 14:00:00
1 2010-01-01 09:00:00 2010-01-01 10:00:00 4 2010-01-03 15:00:00 2010-01-03 17:00:00
2 2010-01-01 09:00:00 2010-01-01 12:00:00 4 2010-01-03 15:00:00 2010-01-03 17:00:00
3 2010-01-02 13:00:00 2010-01-02 14:00:00 4 2010-01-03 15:00:00 2010-01-03 17:00:00
1 2010-01-01 09:00:00 2010-01-01 10:00:00 5 2010-01-03 19:00:00 2010-01-03 21:00:00
2 2010-01-01 09:00:00 2010-01-01 12:00:00 5 2010-01-03 19:00:00 2010-01-03 21:00:00
3 2010-01-02 13:00:00 2010-01-02 14:00:00 5 2010-01-03 19:00:00 2010-01-03 21:00:00
4 2010-01-03 15:00:00 2010-01-03 17:00:00 5 2010-01-03 19:00:00 2010-01-03 21:00:00
Now we want to Group by P2.ST and get the MAX(P1.ET) and P2.ST, so that gives us
SELECT MAX(P1.ET) AS ST, P2.ST AS ET
FROM XYZ AS P1
INNER JOIN XYZ AS P2 ON (P1.ST < P2.ST)
GROUP BY P2.ST
/* Result is
2010-01-01 12:00:00 2010-01-02 13:00:00
2010-01-02 14:00:00 2010-01-03 15:00:00
2010-01-03 17:00:00 2010-01-03 19:00:00
Now with this sample data there are no rows in the output with MAX(P1.ET) > P2.ST. But if there was one, you would not want that row because it is not a real gap (obviously, a gap can't start today and end yesterday). (If you want to see how
you could get a case like that, add a row 6 to the sample data with a ST of 2010-01-01 7:00PM and an ET of 2010-01-03 9:00PM.)
So we add a HAVING MAX(P1.ET) < P2.ST to remove those cases.
That leaves us with all of the gaps. So then with
SELECT COALESCE(SUM(DATEDIFF(MINUTE,ST,ET)), 0)
FROM (
SELECT MAX(P1.ET) AS ST, P2.ST AS ET
FROM XYZ AS P1
INNER JOIN XYZ AS P2 ON (P1.ST < P2.ST)
GROUP BY P2.ST
HAVING MAX(P1.ET) < P2.ST
) gaps
we get the total amount of time in all gaps. Then the final result is just the time from the earliest ST to the latest ET minus the total time from the gap.
Tom -
Please explain this select query
Hello Experts
please see this select query.
select * from kna1 where lifnr = '1111111101'.
while debugging how to see what records this above select query has fetched. please explain me.
Thanks for all the repliesHi madan,
as explained, you need an ENDSELECT which I think you already have. In debugger, you could see the records fetched between SELECT and ENDSELECT but you will probably get a DUMP because a forbidden database access interrupt is detected.
If your program does not process the records you have no chance to see them.
A possible solution is:
data:
lt_kunnr type table of kna1-kunnr.
select * from kna1 where lifnr = '1111111101'.
append kna1-kunnr to lt_kunnr.
endselect.
Now you have the primary key KUNNR of all records fetched in table lt_kunnr.
Regards,
Clemens -
HT5457 So can somebody please explain to me why the first gen iPad missed out on ios 6?
So can somebody please explain to me why the first gen iPad missed out on ios 6?
safrones wrote:
Is that what you really believe?
I don't know cause Apple decided for me.
As does Microsoft anytime that they release a new update that is no longer compatible with the old PC hardware.
I would hope that Microsoft and Apple would both know what operating systems will run on the hardware that is produced for them.
I would also hope that Microsoft and Apple know better than you do as to what would work on their devices, tablets, computers, phones .... How much time and money have you put into research and development on the iPad? -
I have a macbook Pro i7 mid november 2010. I am wondering if i can exchange my notebook with the latest one. Can anyone help me out with this query please.
You can sell your existing computer using eBay, Craigslist or the venue of your choice. You could then use the proceeds to purchase a new computer.
-
How to improve the query performance or tune query from Explain Plan
Hi
The following is my explain plan for sql query. (The plan is generated by Toad v9.7). How to fix the query?
SELECT STATEMENT ALL_ROWSCost: 4,160 Bytes: 25,296 Cardinality: 204
8 NESTED LOOPS Cost: 3 Bytes: 54 Cardinality: 1
5 NESTED LOOPS Cost: 2 Bytes: 23 Cardinality: 1
2 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 13 Cardinality: 1
1 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1
4 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_CUST_ACCOUNTS Cost: 1 Bytes: 10 Cardinality: 1
3 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_CUST_ACCOUNTS_U1 Cost: 1 Cardinality: 1
7 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_PARTIES Cost: 1 Bytes: 31 Cardinality: 1
6 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_PARTIES_U1 Cost: 1 Cardinality: 1
10 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 12 Cardinality: 1
9 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1
15 NESTED LOOPS Cost: 2 Bytes: 29 Cardinality: 1
12 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 12 Cardinality: 1
11 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1
14 TABLE ACCESS BY INDEX ROWID TABLE ONT.OE_ORDER_HEADERS_ALL Cost: 1 Bytes: 17 Cardinality: 1
13 INDEX RANGE SCAN INDEX (UNIQUE) ONT.OE_ORDER_HEADERS_U2 Cost: 1 Cardinality: 1
21 FILTER
16 TABLE ACCESS FULL TABLE ONT.OE_TRANSACTION_TYPES_TL Cost: 2 Bytes: 1,127 Cardinality: 49
20 NESTED LOOPS Cost: 2 Bytes: 21 Cardinality: 1
18 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 12 Cardinality: 1
17 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1
19 INDEX RANGE SCAN INDEX (UNIQUE) ONT.OE_ORDER_HEADERS_U2 Cost: 1 Bytes: 9 Cardinality: 1
23 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 12 Cardinality: 1
22 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1
45 NESTED LOOPS Cost: 4,160 Bytes: 25,296 Cardinality: 204
42 NESTED LOOPS Cost: 4,150 Bytes: 23,052 Cardinality: 204
38 NESTED LOOPS Cost: 4,140 Bytes: 19,992 Cardinality: 204
34 NESTED LOOPS Cost: 4,094 Bytes: 75,850 Cardinality: 925
30 NESTED LOOPS Cost: 3,909 Bytes: 210,843 Cardinality: 3,699
26 PARTITION LIST ALL Cost: 2,436 Bytes: 338,491 Cardinality: 14,717 Partition #: 29 Partitions accessed #1 - #18
25 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_AE_HEADERS Cost: 2,436 Bytes: 338,491 Cardinality: 14,717 Partition #: 29 Partitions accessed #1 - #18
24 INDEX SKIP SCAN INDEX XLA.XLA_AE_HEADERS_N1 Cost: 264 Cardinality: 1,398,115 Partition #: 29 Partitions accessed #1 - #18
29 PARTITION LIST ITERATOR Cost: 1 Bytes: 34 Cardinality: 1 Partition #: 32
28 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_AE_LINES Cost: 1 Bytes: 34 Cardinality: 1 Partition #: 32
27 INDEX RANGE SCAN INDEX (UNIQUE) XLA.XLA_AE_LINES_U1 Cost: 1 Cardinality: 1 Partition #: 32
33 PARTITION LIST ITERATOR Cost: 1 Bytes: 25 Cardinality: 1 Partition #: 35
32 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_DISTRIBUTION_LINKS Cost: 1 Bytes: 25 Cardinality: 1 Partition #: 35
31 INDEX RANGE SCAN INDEX XLA.XLA_DISTRIBUTION_LINKS_N3 Cost: 1 Cardinality: 1 Partition #: 35
37 PARTITION LIST SINGLE Cost: 1 Bytes: 16 Cardinality: 1 Partition #: 38
36 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_EVENTS Cost: 1 Bytes: 16 Cardinality: 1 Partition #: 39 Partitions accessed #2
35 INDEX UNIQUE SCAN INDEX (UNIQUE) XLA.XLA_EVENTS_U1 Cost: 1 Cardinality: 1 Partition #: 40 Partitions accessed #2
41 PARTITION LIST SINGLE Cost: 1 Bytes: 15 Cardinality: 1 Partition #: 41
40 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_TRANSACTION_ENTITIES Cost: 1 Bytes: 15 Cardinality: 1 Partition #: 42 Partitions accessed #2
39 INDEX UNIQUE SCAN INDEX (UNIQUE) XLA.XLA_TRANSACTION_ENTITIES_U1 Cost: 1 Cardinality: 1 Partition #: 43 Partitions accessed #2
44 TABLE ACCESS BY INDEX ROWID TABLE GL.GL_CODE_COMBINATIONS Cost: 1 Bytes: 11 Cardinality: 1
43 INDEX UNIQUE SCAN INDEX (UNIQUE) GL.GL_CODE_COMBINATIONS_U1 Cost: 1 Cardinality: 1damorgan wrote:
Tuning is NOT about reducing the cost of i/o.
i/o is only one of many contributors to cost and only one of many contributors to waits.
Any time you would like to explore this further run this code:
SELECT 1 FROM dual
WHERE regexp_like(' ','^*[ ]*a');but not on a production box because you are going to experience an extreme tuning event with zero i/o.
And when I say "extreme" I mean "EXTREME!"
You've been warned.I think you just need a faster server.
SQL> set autotrace traceonly statistics
SQL> set timing on
SQL> select 1 from dual
2 where
3 regexp_like (' ','^*[ ]*a');
no rows selected
Elapsed: 00:00:00.00
Statistics
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
243 bytes sent via SQL*Net to client
349 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processedRepeated from an Oracle 10.2.0.x instance:
SQL> SELECT DISTINCT SID FROM V$MYSTAT;
SID
310
SQL> ALTER SESSION SET EVENTS '10053 TRACE NAME CONTEXT FOREVER, LEVEL 1';
Session altered.
SQL> select 1 from dual
2 where
3 regexp_like (' ','^*[ ]*a');The session is hung. Wait a little while and connect to the database using a different session:
COLUMN STAT_NAME FORMAT A35 TRU
SET PAGESIZE 200
SELECT
STAT_NAME,
VALUE
FROM
V$SESS_TIME_MODEL
WHERE
SID=310;
STAT_NAME VALUE
DB time 9247
DB CPU 9247
background elapsed time 0
background cpu time 0
sequence load elapsed time 0
parse time elapsed 6374
hard parse elapsed time 5997
sql execute elapsed time 2939
connection management call elapsed 1660
failed parse elapsed time 0
failed parse (out of shared memory) 0
hard parse (sharing criteria) elaps 0
hard parse (bind mismatch) elapsed 0
PL/SQL execution elapsed time 95
inbound PL/SQL rpc elapsed time 0
PL/SQL compilation elapsed time 0
Java execution elapsed time 0
repeated bind elapsed time 48
RMAN cpu time (backup/restore) 0Seems to be using a bit of time for the hard parse (hard parse elapsed time). Wait a little while, then re-execute the query:
STAT_NAME VALUE
DB time 9247
DB CPU 9247
background elapsed time 0
background cpu time 0
sequence load elapsed time 0
parse time elapsed 6374
hard parse elapsed time 5997
sql execute elapsed time 2939
connection management call elapsed 1660
failed parse elapsed time 0
failed parse (out of shared memory) 0
hard parse (sharing criteria) elaps 0
hard parse (bind mismatch) elapsed 0
PL/SQL execution elapsed time 95
inbound PL/SQL rpc elapsed time 0
PL/SQL compilation elapsed time 0
Java execution elapsed time 0
repeated bind elapsed time 48
RMAN cpu time (backup/restore) 0The session is not reporting additional CPU usage or parse time.
Let's check one of the session's statistics:
SELECT
SS.VALUE
FROM
V$SESSTAT SS,
V$STATNAME SN
WHERE
SN.NAME='consistent gets'
AND SN.STATISTIC#=SS.STATISTIC#
AND SS.SID=310;
VALUE
163Not many consistent gets after 20+ minutes.
Let's take a look at the plan:
SQL> SELECT SQL_ID,CHILD_NUMBER FROM V$SQL WHERE SQL_TEXT LIKE 'select 1 from du
al%';
SQL_ID CHILD_NUMBER
04mpgrzhsv72w 0
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('04mpgrzhsv72w',0,'TYPICAL'))
select 1 from dual where regexp_like (' ','^*[ ]*a')
NOTE: cannot fetch plan for SQL_ID: 04mpgrzhsv72w, CHILD_NUMBER: 0
Please verify value of SQL_ID and CHILD_NUMBER;
It could also be that the plan is no longer in cursor cache (check v$sql_p
lan)No plan...
Let's take a look at the 10053 trace file:
Registered qb: SEL$1 0x19157f38 (PARSER)
signature (): qb_name=SEL$1 nbfros=1 flg=0
fro(0): flg=4 objn=258 hint_alias="DUAL"@"SEL$1"
Predicate Move-Around (PM)
PM: Considering predicate move-around in SEL$1 (#0).
PM: Checking validity of predicate move-around in SEL$1 (#0).
CBQT: Validity checks failed for 7uqx4guu04x3g.
CVM: Considering view merge in query block SEL$1 (#0)
CBQT: Validity checks failed for 7uqx4guu04x3g.
Subquery Unnest
SU: Considering subquery unnesting in query block SEL$1 (#0)
Set-Join Conversion (SJC)
SJC: Considering set-join conversion in SEL$1 (#0).
Predicate Move-Around (PM)
PM: Considering predicate move-around in SEL$1 (#0).
PM: Checking validity of predicate move-around in SEL$1 (#0).
PM: PM bypassed: Outer query contains no views.
FPD: Considering simple filter push in SEL$1 (#0)
FPD: Current where clause predicates in SEL$1 (#0) :
REGEXP_LIKE (' ','^*[ ]*a')
kkogcp: try to generate transitive predicate from check constraints for SEL$1 (#0)
predicates with check contraints: REGEXP_LIKE (' ','^*[ ]*a')
after transitive predicate generation: REGEXP_LIKE (' ','^*[ ]*a')
finally: REGEXP_LIKE (' ','^*[ ]*a')
apadrv-start: call(in-use=592, alloc=16344), compile(in-use=37448, alloc=42256)
kkoqbc-start
: call(in-use=592, alloc=16344), compile(in-use=38336, alloc=42256)
kkoqbc-subheap (create addr=000000001915C238)Looks like the query never had a chance to start executing - it is still parsing after 20 minutes.
I am not sure that this is a good example - the query either executes very fast, or never has a chance to start executing. But, it might still make your point physical I/O is not always the problem when performance problems are experienced.
Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
Please explain me about customer exist program ZXRSRU01
Hi all,
I do not have enough knowledge to code for a customer exist.
please explain me for the below scenerio.
Dimensions Key figures
Business Partner (ZH11).
Created On Date (ZH22).
Status (ZH33).
Product (ZH88)
Product contains following
Product l1(zid1)
Product release description.
for this product release description for every new release we creating a variable.
and using this variable we are creating a restricted key figure as follows.
1.1 1.2 1.3. like this
My requirement is a query is already created for report to show bugs weekly releases.
I have to find out a way if the transaction contains a new version then i have to add new column in the output of the report (for example 1.4,1.5...)
as I do not have knowledge in ABAP please explain me how to solve this problem.
I do not have enough regarding Zxrsruo1.
if contains some predefined components.
Please explain for the predefined components.
IMPORTING
*" VALUE(I_VNAM) LIKE RSZGLOBV-VNAM
*" VALUE(I_VARTYP) LIKE RSZGLOBV-VARTYP
*" VALUE(I_IOBJNM) LIKE RSZGLOBV-IOBJNM
*" VALUE(I_S_COB_PRO) TYPE RSD_S_COB_PRO
*" VALUE(I_S_RKB1D) TYPE RSR_S_RKB1D
*" VALUE(I_PERIV) TYPE RRO01_S_RKB1F-PERIV
*" VALUE(I_T_VAR_RANGE) TYPE RRS0_T_VAR_RANGE
*" VALUE(I_STEP) TYPE I DEFAULT 0
*" EXPORTING
*" VALUE(E_T_RANGE) TYPE RSR_T_RANGESID
*" VALUE(E_MEEHT) LIKE RSZGLOBV-MEEHT
*" VALUE(E_MEFAC) LIKE RSZGLOBV-MEFAC
*" VALUE(E_WAERS) LIKE RSZGLOBV-WAERS
*" VALUE(E_WHFAC) LIKE RSZGLOBV-WHFAC
*" CHANGING
*" VALUE(C_S_CUSTOMER) TYPE RRO04_S_CUSTOMER OPTIONAL
Thanks,
JamesHi James,
You are talking about the include we use to write the user exit for variables in BW.
There are a lot of code examples that Edwin posted in the forum so you can use them to code yours.
A little bit of details on the paramaters in the include:
I-Vnam : The variable name to be calculated
i_t-Var_range: A table that contains all the system's variables data
i_step: The step for variable determination: 0,1,2 or 3.
i_step= 1: used to call default variables, called once per variable before the variable screen is displayed
istep= 2: used for those variables that are not ready for input, called after the variable screen is displayed
i_step=3 : Used for valiadation purposes, and called after isep=2
e_t_range: Is the table that the exit populated the varaible value to.contains the following important fileds:
low: contains the value of the lower limit for intervals, for text variables it contains the text and for formula vatiables the calculated value.
high: contains the upper limit for intervals
sign: ususally I (Include), can be also E (Exclude)
opt: usually EQ (Equal) or BT(Between)
See also:
https://websmp202.sap-ag.de/~sapdownload/011000358700002762582003E/HowToDeriveVariableValue.pdf
Hope it helps, if so please assign points,
Gili -
Could Somebody Please Explain....
Could somebody please explain what this section of code is doing with the StopTime? There is plenty more code where that came from, but as I can see it, it is being put into a vector in another section of code as endTime, the vector pdmlist, which I think is where or hows its stored in the vector is being set to null? Then pdmlist is using EndTime value? The StopTime is then being set to a string.
StopTime is then set to blank, then the DateDataFormat is being used. The pdmlist comes back into play, then the df (date format) comes back and it gets converted to uppercase and finally outputted using the outStream.write method to the log file that is created (earlier).
So my quest, as per the other mail, why wont the DB query and order by, order it for the output to the log file. What is the vector doing to it to unsort it? How can I order it?
Vector pdmList = null;
this.setCursor( Cursor.WAIT );
if ( radioAllTime.getChecked() )
pdmList = pdmHelper.buildPDMList( ctx, null, null );
else
pdmList = pdmHelper.buildPDMList( ctx, dateBeginTime.getValue(), dateEndTime.getValue() );
this.setCursor( Cursor.DEFAULT );
//If nothing was found, then display a message,
//and return.
if ( pdmList == null )
MessageBox.show( "No parametric data found. Log file not generated." , this.getText() );
return;
if ( pdmList.size() == 0 )
MessageBox.show( "No parametric data found. Log file not generated." , this.getText() );
return;
String Temp;
String Board; // Prodid
String StartTime;
String StopTime;
String Part;
String BoardStatus;
String Actual;
String LoLim;
String HiLim;
String MeasStatus;
String PartType;
String PartNumber;
boolean BoardStatusContext = false;
boolean OneMeasureFailed = false;
java.util.Hashtable htFiles = new Hashtable(10,10);
FileWriter outStream = null;
try
for ( int idx = 0; idx < pdmList.size(); idx++ )
//Reset the flags
BoardStatusContext = false;
OneMeasureFailed = false;
Board = ""; StartTime = ""; StopTime = ""; Part = ""; BoardStatus = ""; Actual = "";
LoLim = ""; HiLim = ""; MeasStatus = ""; PartType = ""; PartNumber = "";
com.ms.wfc.data.DateDataFormat df = new com.ms.wfc.data.DateDataFormat( com.ms.wfc.data.DateFormat.CUSTOM,
"dd-MMM-yy hh:mm:ss" );
// get root context
PDMContext context = ((PDM)pdmList.elementAt(idx)).getContext();
//Make the filename
String fileName = context.getProductName();
if ( fileName == null || fileName.length() == 0 )
fileName = "UNKNOWN";
// Eliminate not allowed characters from the file name
fileName = fileName.replace('\\','_');
fileName = fileName.replace('/','_');
fileName = fileName.replace(':','_');
fileName = fileName.replace('*','_');
fileName = fileName.replace('?','_');
fileName = fileName.replace('\"','_');
fileName = fileName.replace('<','_');
fileName = fileName.replace('>','_');
fileName = fileName.replace('|','_');
fileName += ".log";
if ( htFiles.containsKey( fileName ) )
outStream = (FileWriter)htFiles.get( fileName );
else
File theFile = new File( fileName );
statusBar.getPanels()[0].setText( "File: " + theFile.getAbsolutePath() );
/* if ( ! theFile.canWrite() )
statusBar.getPanels()[0].setText( "Failed: " + theFile.getAbsolutePath() );
MessageBox.show( theFile.getAbsolutePath() + " can not be writen!",
this.getText() );
outStream = new FileWriter( theFile.getAbsolutePath(), false );
htFiles.put( fileName, outStream );
// start writing the log file...
outStream.write( "./" );
StartTime = ((String)df.format( null, context.getStartTime() )).toUpperCase();
StopTime = ((String)df.format( null, context.getStopTime() )).toUpperCase();
Board = context.getProductName();
if ( Board.length() == 0 )
Board = "UNKNOWN";
outStream.write( Board + ".obc[" + StartTime + "\r\n\r\n" );
Sorry the mail is so long. I tried books, but vectors were hard to come by? I've searched through the database on this site too, there are plenty of stuff about sorting and vectors but its hard to use somebody elsed situation for my own circumstances as a guide.
Hope somebody could just shed a bit of light.
Thanks in advance.
Mark.
PS. I will give duke points (when I work out how to add them, but I only have 5....sorry)Does anybody have any ideas as to what is happening.
Mark. -
hi,
can any one please explain this behavior.
This is what i did.
create table temp as select * from dba_extents;
insert into temp select * from dba_extents;
insert into temp select * from dba_extents;
insert into temp select * from dba_extents;
insert into temp select * from temp;
insert into temp select * from temp;
insert into temp select * from temp;
commit;
temp table now has arround 8449024 rows
collected all the statistics now
the following are the various waits for the session
EVENT TOTAL_WAITS TOTAL_TIMEOUTS TIME_WAITED AVERAGE_WAIT
direct path sync 1 0 1 .75
db file sequential read 22983 0 361 .02
db file scattered read 9145 0 101 .01
db file single write 6 0 0 .03
db file parallel read 8 0 0 .04
direct path read 22352 0 2883 .13
direct path write 8 0 0 .02
now i issued select statement
select count(distinct block_id) from temp;
EVENT TOTAL_WAITS TOTAL_TIMEOUTS TIME_WAITED AVERAGE_WAIT
direct path sync 1 0 1 .75
db file sequential read 22983 0 361 .02
db file scattered read 9145 0 101 .01
db file single write 6 0 0 .03
db file parallel read 8 0 0 .04
direct path read 26060 0 2966 .11
direct path write 8 0 0 .02
the select statement was actually making the full table scan of the table and the explain plan showed as below
PLAN_TABLE_OUTPUT
Plan hash value: 1647884052
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 13 | 21612 (2)| 00:04:20 |
| 1 | SORT AGGREGATE | | 1 | 13 | | |
| 2 | VIEW | VW_DAG_0 | 5684 | 73892 | 21612 (2)| 00:04:20 |
| 3 | HASH GROUP BY | | 5684 | 28420 | 21612 (2)| 00:04:20 |
| 4 | TABLE ACCESS FULL| TEMP | 8449K| 40M| 21340 (1)| 00:04:17 |
11 rows selected.
SQL> select owner,object_name from dba_objects where owner='VISHNU';
OWNER
OBJECT_NAME
VISHNU
PLAN_TABLE
VISHNU
TEMP
VISHNU
SYS_LOB0000073414C00036$$
SQL> select owner from dba_objects where owner='VW_DAG_0';
no rows selected
can any one please explain this behavior.
1. oracle tells us that when the full table scans are performed db file scattered event appears but here clearly db file parallel read was occuring.
2. as the table was going through the full table scan as oracle 11gr2 default behavior will not cache the blocks that are part of the table going through the full table scan is this the reason why the db file parallel read wait event was occuring.
3. clearly in the explain plan it used a view called VW_DAG_0 which is inexistant on the database is this a bug or this is the behavior of oracle optimizer to create a view.
4. before collecting any statistics on the table when the same sql statement to count is executed a lot of db file parallel read waits appeared, can any one please explain this behavior.
5. while doing the full table scans if the oracle shows the waits as db file parallel read (occurs when the recovery or parallel processes are used), but is this behavior changed.
finally,
6. can any one please explain the difference between the db file parallel read and db file scattered read.
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - ProductionSQL ID: ff1a7d4fgcgnb
Plan Hash: 2024630721
create table temp as select * from dba_extents
call count cpu elapsed disk query current rows
Parse 1 0.27 0.27 0 0 0 0
Execute 1 3.44 3.69 5157 24380 393 8262
Fetch 0 0.00 0.00 0 0 0 0
total 2 3.71 3.96 5157 24380 393 8262
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 85
Rows Row Source Operation
0 LOAD AS SELECT (cr=40860 pr=5157 pw=77 time=0 us)
8262 VIEW DBA_EXTENTS (cr=40583 pr=5157 pw=0 time=3945962 us cost=1915 size=4550182 card=25001)
8262 UNION-ALL (cr=40583 pr=5157 pw=0 time=3927787 us)
0 NESTED LOOPS (cr=161 pr=0 pw=0 time=0 us cost=862 size=228 card=1)
0 NESTED LOOPS (cr=161 pr=0 pw=0 time=0 us cost=22 size=100 card=1)
0 TABLE ACCESS FULL UET$ (cr=161 pr=0 pw=0 time=0 us cost=22 size=91 card=1)
0 TABLE ACCESS BY INDEX ROWID FILE$ (cr=0 pr=0 pw=0 time=0 us cost=0 size=9 card=1)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 44)
0 VIEW SYS_DBA_SEGS (cr=0 pr=0 pw=0 time=0 us cost=840 size=128 card=1)
0 UNION ALL PUSHED PREDICATE (cr=0 pr=0 pw=0 time=0 us)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=828 size=161 card=1)
0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us cost=827 size=147 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=826 size=128 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=824 size=95 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=823 size=675 card=9)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=6 card=1)(object id 44)
0 VIEW SYS_OBJECTS (cr=0 pr=0 pw=0 time=0 us cost=823 size=621 card=9)
0 UNION-ALL (cr=0 pr=0 pw=0 time=0 us)
0 TABLE ACCESS FULL TAB$ (cr=0 pr=0 pw=0 time=0 us cost=201 size=22 card=1)
0 TABLE ACCESS FULL TABPART$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=15 card=1)
0 TABLE ACCESS FULL CLU$ (cr=0 pr=0 pw=0 time=0 us cost=199 size=14 card=1)
0 TABLE ACCESS FULL IND$ (cr=0 pr=0 pw=0 time=0 us cost=201 size=19 card=1)
0 TABLE ACCESS FULL INDPART$ (cr=0 pr=0 pw=0 time=0 us cost=3 size=15 card=1)
0 TABLE ACCESS FULL LOB$ (cr=0 pr=0 pw=0 time=0 us cost=201 size=20 card=1)
0 TABLE ACCESS FULL TABSUBPART$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=52 card=1)
0 TABLE ACCESS FULL INDSUBPART$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=52 card=1)
0 TABLE ACCESS FULL LOBFRAG$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=17 card=1)
0 TABLE ACCESS CLUSTER SEG$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=20 card=1)
0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 9)
0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=33 card=1)
0 INDEX RANGE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 36)
0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
0 TABLE ACCESS CLUSTER TS$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 INDEX UNIQUE SCAN I_TS# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us cost=5 size=95 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=4 size=76 card=1)
0 MERGE JOIN CARTESIAN (cr=0 pr=0 pw=0 time=0 us cost=3 size=53 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=2 size=39 card=1)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=6 card=1)(object id 44)
0 TABLE ACCESS FULL UNDO$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=33 card=1)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 TABLE ACCESS CLUSTER TS$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 INDEX UNIQUE SCAN I_TS# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
0 TABLE ACCESS CLUSTER SEG$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=23 card=1)
0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 9)
0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us cost=4 size=65 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=3 size=46 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=2 size=23 card=1)
0 TABLE ACCESS BY INDEX ROWID FILE$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=9 card=1)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 44)
0 TABLE ACCESS CLUSTER TS$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 INDEX UNIQUE SCAN I_TS# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
0 TABLE ACCESS CLUSTER SEG$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=23 card=1)
0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 9)
0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
8262 NESTED LOOPS (cr=40422 pr=5157 pw=0 time=3893345 us cost=896 size=6400000 card=25000)
5409 HASH JOIN (cr=18394 pr=70 pw=0 time=12576 us cost=895 size=495 card=3)
5409 VIEW SYS_DBA_SEGS (cr=18391 pr=70 pw=0 time=243234 us cost=892 size=468 card=3)
5409 UNION-ALL (cr=18391 pr=70 pw=0 time=236820 us)
5398 NESTED LOOPS OUTER (cr=18172 pr=70 pw=0 time=224038 us cost=850 size=161 card=1)
5398 NESTED LOOPS (cr=12770 pr=70 pw=0 time=141702 us cost=849 size=142 card=1)
5398 HASH JOIN (cr=10992 pr=65 pw=0 time=27110 us cost=847 size=109 card=1)
5409 NESTED LOOPS (cr=5578 pr=0 pw=0 time=115706 us cost=23 size=40 card=1)
5409 NESTED LOOPS (cr=165 pr=0 pw=0 time=67914 us cost=22 size=26 card=1)
5409 TABLE ACCESS FULL SEG$ (cr=161 pr=0 pw=0 time=16978 us cost=22 size=20 card=1)
5409 INDEX UNIQUE SCAN I_FILE2 (cr=4 pr=0 pw=0 time=0 us cost=0 size=6 card=1)(object id 44)
5409 TABLE ACCESS CLUSTER TS$ (cr=5413 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
5409 INDEX UNIQUE SCAN I_TS# (cr=4 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
8489 VIEW SYS_OBJECTS (cr=5414 pr=65 pw=0 time=42954 us cost=824 size=181746 card=2634)
8489 UNION-ALL (cr=5414 pr=65 pw=0 time=31637 us)
2761 TABLE ACCESS FULL TAB$ (cr=1349 pr=64 pw=0 time=9594 us cost=201 size=23540 card=1070)
88 TABLE ACCESS FULL TABPART$ (cr=4 pr=1 pw=0 time=0 us cost=2 size=1320 card=88)
10 TABLE ACCESS FULL CLU$ (cr=1349 pr=0 pw=0 time=0 us cost=199 size=140 card=10)
4660 TABLE ACCESS FULL IND$ (cr=1349 pr=0 pw=0 time=7376 us cost=201 size=25764 card=1356)
104 TABLE ACCESS FULL INDPART$ (cr=5 pr=0 pw=0 time=0 us cost=3 size=1560 card=104)
865 TABLE ACCESS FULL LOB$ (cr=1349 pr=0 pw=0 time=7344 us cost=201 size=60 card=3)
0 TABLE ACCESS FULL TABSUBPART$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=52 card=1)
0 TABLE ACCESS FULL INDSUBPART$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=52 card=1)
1 TABLE ACCESS FULL LOBFRAG$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=17 card=1)
5398 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=1778 pr=5 pw=0 time=0 us cost=2 size=33 card=1)
5398 INDEX RANGE SCAN I_OBJ1 (cr=1228 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 36)
5398 TABLE ACCESS CLUSTER USER$ (cr=5402 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
5398 INDEX UNIQUE SCAN I_USER# (cr=4 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
11 NESTED LOOPS (cr=58 pr=0 pw=0 time=340 us cost=14 size=95 card=1)
11 NESTED LOOPS OUTER (cr=43 pr=0 pw=0 time=260 us cost=13 size=81 card=1)
11 NESTED LOOPS (cr=28 pr=0 pw=0 time=190 us cost=12 size=62 card=1)
11 NESTED LOOPS (cr=24 pr=0 pw=0 time=140 us cost=12 size=56 card=1)
11 TABLE ACCESS FULL UNDO$ (cr=3 pr=0 pw=0 time=20 us cost=2 size=330 card=10)
11 TABLE ACCESS CLUSTER SEG$ (cr=21 pr=0 pw=0 time=0 us cost=1 size=23 card=1)
11 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=10 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 9)
11 INDEX UNIQUE SCAN I_FILE2 (cr=4 pr=0 pw=0 time=0 us cost=0 size=6 card=1)(object id 44)
11 TABLE ACCESS CLUSTER USER$ (cr=15 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
11 INDEX UNIQUE SCAN I_USER# (cr=4 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
11 TABLE ACCESS CLUSTER TS$ (cr=15 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
11 INDEX UNIQUE SCAN I_TS# (cr=4 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
0 NESTED LOOPS (cr=161 pr=0 pw=0 time=0 us cost=25 size=65 card=1)
0 NESTED LOOPS (cr=161 pr=0 pw=0 time=0 us cost=24 size=51 card=1)
0 NESTED LOOPS OUTER (cr=161 pr=0 pw=0 time=0 us cost=23 size=42 card=1)
0 TABLE ACCESS FULL SEG$ (cr=161 pr=0 pw=0 time=0 us cost=22 size=23 card=1)
0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
0 TABLE ACCESS BY INDEX ROWID FILE$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=9 card=1)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 44)
0 TABLE ACCESS CLUSTER TS$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 INDEX UNIQUE SCAN I_TS# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
5 TABLE ACCESS FULL FILE$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=36 card=4)
8262 FIXED TABLE FIXED INDEX X$KTFBUE (ind:1) (cr=22028 pr=5087 pw=0 time=5544 us cost=1 size=758303 card=8333)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
asynch descriptor resize 3 0.00 0.00
db file scattered read 4 0.00 0.00
db file sequential read 5148 0.01 1.51
Disk file operations I/O 2 0.00 0.00
direct path write 6 0.00 0.00
direct path sync 1 0.02 0.02
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 11.67 11.67
SQL ID: 0jh7zzgmva195
Plan Hash: 587733453
insert into temp select * from dba_extents
call count cpu elapsed disk query current rows
Parse 3 0.28 0.28 0 0 0 0
Execute 3 6.44 6.22 15262 73584 2321 24838
Fetch 0 0.00 0.00 0 0 0 0
total 6 6.72 6.50 15262 73584 2321 24838
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 85
Rows Row Source Operation
0 LOAD TABLE CONVENTIONAL (cr=40826 pr=5088 pw=0 time=0 us)
8279 VIEW DBA_EXTENTS (cr=40590 pr=5087 pw=0 time=2646667 us cost=1733 size=4550182 card=25001)
8279 UNION-ALL (cr=40590 pr=5087 pw=0 time=2594580 us)
0 NESTED LOOPS (cr=161 pr=0 pw=0 time=0 us cost=850 size=241 card=1)
0 NESTED LOOPS (cr=161 pr=0 pw=0 time=0 us cost=22 size=100 card=1)
0 TABLE ACCESS FULL UET$ (cr=161 pr=0 pw=0 time=0 us cost=22 size=91 card=1)
0 TABLE ACCESS BY INDEX ROWID FILE$ (cr=0 pr=0 pw=0 time=0 us cost=0 size=9 card=1)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 44)
0 VIEW SYS_DBA_SEGS (cr=0 pr=0 pw=0 time=0 us cost=828 size=141 card=1)
0 UNION ALL PUSHED PREDICATE (cr=0 pr=0 pw=0 time=0 us)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=819 size=161 card=1)
0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us cost=818 size=147 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=817 size=128 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=815 size=95 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=814 size=675 card=9)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=6 card=1)(object id 44)
0 VIEW SYS_OBJECTS (cr=0 pr=0 pw=0 time=0 us cost=814 size=621 card=9)
0 UNION-ALL (cr=0 pr=0 pw=0 time=0 us)
0 TABLE ACCESS FULL TAB$ (cr=0 pr=0 pw=0 time=0 us cost=201 size=22 card=1)
0 TABLE ACCESS FULL TABPART$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=15 card=1)
0 TABLE ACCESS FULL CLU$ (cr=0 pr=0 pw=0 time=0 us cost=199 size=14 card=1)
0 TABLE ACCESS FULL IND$ (cr=0 pr=0 pw=0 time=0 us cost=201 size=19 card=1)
0 TABLE ACCESS FULL INDPART$ (cr=0 pr=0 pw=0 time=0 us cost=3 size=15 card=1)
0 TABLE ACCESS FULL LOB$ (cr=0 pr=0 pw=0 time=0 us cost=201 size=20 card=1)
0 TABLE ACCESS FULL TABSUBPART$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=52 card=1)
0 TABLE ACCESS FULL INDSUBPART$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=52 card=1)
0 TABLE ACCESS FULL LOBFRAG$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=17 card=1)
0 TABLE ACCESS CLUSTER SEG$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=20 card=1)
0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 9)
0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=33 card=1)
0 INDEX RANGE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 36)
0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
0 TABLE ACCESS CLUSTER TS$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 INDEX UNIQUE SCAN I_TS# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us cost=5 size=95 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=4 size=76 card=1)
0 MERGE JOIN CARTESIAN (cr=0 pr=0 pw=0 time=0 us cost=3 size=53 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=2 size=39 card=1)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=6 card=1)(object id 44)
0 TABLE ACCESS FULL UNDO$ (cr=0 pr=0 pw=0 time=0 us cost=2 size=33 card=1)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 TABLE ACCESS CLUSTER TS$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 INDEX UNIQUE SCAN I_TS# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
0 TABLE ACCESS CLUSTER SEG$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=23 card=1)
0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 9)
0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us cost=4 size=65 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=3 size=46 card=1)
0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=2 size=23 card=1)
0 TABLE ACCESS BY INDEX ROWID FILE$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=9 card=1)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 44)
0 TABLE ACCESS CLUSTER TS$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 INDEX UNIQUE SCAN I_TS# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
0 TABLE ACCESS CLUSTER SEG$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=23 card=1)
0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 9)
0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
8279 NESTED LOOPS (cr=40429 pr=5087 pw=0 time=2513328 us cost=883 size=6725000 card=25000)
5410 HASH JOIN (cr=18398 pr=0 pw=0 time=13333 us cost=882 size=534 card=3)
5410 VIEW SYS_DBA_SEGS (cr=18395 pr=0 pw=0 time=279632 us cost=879 size=507 card=3)
5410 UNION-ALL (cr=18395 pr=0 pw=0 time=271959 us)
5399 NESTED LOOPS OUTER (cr=18176 pr=0 pw=0 time=250065 us cost=840 size=161 card=1)
5399 NESTED LOOPS (cr=12773 pr=0 pw=0 time=153780 us cost=839 size=142 card=1)
5399 HASH JOIN (cr=10993 pr=0 pw=0 time=50967 us cost=837 size=109 card=1)
5410 NESTED LOOPS (cr=5579 pr=0 pw=0 time=118117 us cost=23 size=40 card=1)
5410 NESTED LOOPS (cr=165 pr=0 pw=0 time=55725 us cost=22 size=26 card=1)
5410 TABLE ACCESS FULL SEG$ (cr=161 pr=0 pw=0 time=9685 us cost=22 size=20 card=1)
5410 INDEX UNIQUE SCAN I_FILE2 (cr=4 pr=0 pw=0 time=0 us cost=0 size=6 card=1)(object id 44)
5410 TABLE ACCESS CLUSTER TS$ (cr=5414 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
5410 INDEX UNIQUE SCAN I_TS# (cr=4 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
8490 VIEW SYS_OBJECTS (cr=5414 pr=0 pw=0 time=63796 us cost=814 size=181746 card=2634)
8490 UNION-ALL (cr=5414 pr=0 pw=0 time=42830 us)
2762 TABLE ACCESS FULL TAB$ (cr=1349 pr=0 pw=0 time=5784 us cost=201 size=23540 card=1070)
88 TABLE ACCESS FULL TABPART$ (cr=4 pr=0 pw=0 time=0 us cost=2 size=1320 card=88)
10 TABLE ACCESS FULL CLU$ (cr=1349 pr=0 pw=0 time=0 us cost=199 size=140 card=10)
4660 TABLE ACCESS FULL IND$ (cr=1349 pr=0 pw=0 time=11906 us cost=201 size=25764 card=1356)
104 TABLE ACCESS FULL INDPART$ (cr=5 pr=0 pw=0 time=0 us cost=3 size=1560 card=104)
865 TABLE ACCESS FULL LOB$ (cr=1349 pr=0 pw=0 time=5184 us cost=201 size=60 card=3)
0 TABLE ACCESS FULL TABSUBPART$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=52 card=1)
0 TABLE ACCESS FULL INDSUBPART$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=52 card=1)
1 TABLE ACCESS FULL LOBFRAG$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=17 card=1)
5399 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=1780 pr=0 pw=0 time=0 us cost=2 size=33 card=1)
5399 INDEX RANGE SCAN I_OBJ1 (cr=1230 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 36)
5399 TABLE ACCESS CLUSTER USER$ (cr=5403 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
5399 INDEX UNIQUE SCAN I_USER# (cr=4 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
11 NESTED LOOPS (cr=58 pr=0 pw=0 time=720 us cost=14 size=95 card=1)
11 NESTED LOOPS OUTER (cr=43 pr=0 pw=0 time=580 us cost=13 size=81 card=1)
11 NESTED LOOPS (cr=28 pr=0 pw=0 time=360 us cost=12 size=62 card=1)
11 NESTED LOOPS (cr=24 pr=0 pw=0 time=130 us cost=12 size=56 card=1)
11 TABLE ACCESS FULL UNDO$ (cr=3 pr=0 pw=0 time=10 us cost=2 size=330 card=10)
11 TABLE ACCESS CLUSTER SEG$ (cr=21 pr=0 pw=0 time=0 us cost=1 size=23 card=1)
11 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=10 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 9)
11 INDEX UNIQUE SCAN I_FILE2 (cr=4 pr=0 pw=0 time=0 us cost=0 size=6 card=1)(object id 44)
11 TABLE ACCESS CLUSTER USER$ (cr=15 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
11 INDEX UNIQUE SCAN I_USER# (cr=4 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
11 TABLE ACCESS CLUSTER TS$ (cr=15 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
11 INDEX UNIQUE SCAN I_TS# (cr=4 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
0 NESTED LOOPS (cr=161 pr=0 pw=0 time=0 us cost=25 size=65 card=1)
0 NESTED LOOPS (cr=161 pr=0 pw=0 time=0 us cost=24 size=51 card=1)
0 NESTED LOOPS OUTER (cr=161 pr=0 pw=0 time=0 us cost=23 size=42 card=1)
0 TABLE ACCESS FULL SEG$ (cr=161 pr=0 pw=0 time=0 us cost=22 size=23 card=1)
0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=19 card=1)
0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 11)
0 TABLE ACCESS BY INDEX ROWID FILE$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=9 card=1)
0 INDEX UNIQUE SCAN I_FILE2 (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 44)
0 TABLE ACCESS CLUSTER TS$ (cr=0 pr=0 pw=0 time=0 us cost=1 size=14 card=1)
0 INDEX UNIQUE SCAN I_TS# (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 7)
5 TABLE ACCESS FULL FILE$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=36 card=4)
8279 FIXED TABLE FIXED INDEX X$KTFBUE (ind:1) (cr=22031 pr=5087 pw=0 time=10961 us cost=1 size=758303 card=8333)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
asynch descriptor resize 6 0.00 0.00
db file sequential read 15262 0.00 0.23
SQL*Net message to client 3 0.00 0.00
SQL*Net message from client 3 0.00 0.00
SQL ID: 23wm3kz7rps5y
Plan Hash: 0
commit
call count cpu elapsed disk query current rows
Parse 2 0.00 0.00 0 0 0 0
Execute 2 0.00 0.00 0 0 2 0
Fetch 0 0.00 0.00 0 0 0 0
total 4 0.00 0.00 0 0 2 0
Misses in library cache during parse: 0
Parsing user id: 85
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
log file sync 2 0.01 0.01
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 17.73 17.73
SQL ID: fw2rqy6u5zfuz
Plan Hash: 1896031711
insert /*APPEND*/ into temp select * from temp
call count cpu elapsed disk query current rows
Parse 9 0.00 0.00 0 1 0 0
Execute 9 41.68 47.27 137424 465979 1377104 16914100
Fetch 0 0.00 0.00 0 0 0 0
total 18 41.68 47.27 137424 465980 1377104 16914100
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 85
Rows Row Source Operation
0 LOAD TABLE CONVENTIONAL (cr=1073 pr=82 pw=0 time=0 us)
33100 TABLE ACCESS FULL TEMP (cr=498 pr=82 pw=0 time=247667 us cost=104 size=5340972 card=29346)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file scattered read 1877 0.06 2.59
db file sequential read 162 0.00 0.01
SQL*Net message to client 9 0.00 0.00
SQL*Net message from client 9 1.83 7.39
undo segment extension 2 0.01 0.01
log file switch (private strand flush incomplete)
5 0.01 0.03
log file switch completion 41 0.14 1.24
log file switch (checkpoint incomplete) 9 1.00 1.29
log buffer space 6 0.05 0.09
db file parallel read 7 0.06 0.07
reliable message 94 0.00 0.01
rdbms ipc reply 92 0.00 0.01
SQL ID: f7nsg2m3xsq5g
Plan Hash: 750244813
select distinct owner
from
temp
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 1 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 3 11.56 14.49 156820 286796 0 16
total 5 11.56 14.49 156820 286797 0 16
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 85
Rows Row Source Operation
16 HASH UNIQUE (cr=286796 pr=156820 pw=0 time=0 us cost=54654605 size=124596205299 card=7329188547)
16947200 TABLE ACCESS FULL TEMP (cr=286796 pr=156820 pw=0 time=58012160 us cost=78220 size=124596205299 card=7329188547)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 3 0.00 0.00
reliable message 1 0.00 0.00
enq: KO - fast object checkpoint 1 1.43 1.43
direct path read 2473 0.02 4.84_
asynch descriptor resize 2 0.00 0.00
buffer busy waits 1 0.00 0.00
SQL*Net message from client 3 37.70 37.70 -
Hi,
OS: SPARC 64 bit
Oracle Version: 10.2.0.3.0 64 bit
My query hangs when I include the outer query. When I execute without outer query It comes out in a fraction of second but when I includes outer query it starts hang
Below is my original query which hangs
select * from (select raw_sql_.**, rownum raw_rnum_ from (SELECT /*+ FIRST_ROWS */ NETWORK_ID||'","'||CALLER_NUMBER||'","'||CALLED_NUMBER FROM CDR FROM CDR WHERE 1 = 1
AND day_of_year = 99 AND INTERFACE = 'TRAFIC' AND TIME_STAMP BETWEEN to_date('2009/04/08 00:00:00','yyyy/mm/dd hh24:mi:ss') AND to_date
('2009/04/09 00:00:00','yyyy/mm/dd hh24:mi:ss') AND NETWORK_ID IN (1025,1026) order by id desc) raw_sql_ WHERE rownum <= 10000) WHERE raw_rnum_ > 0;
when I execute this it will come out immediately
select raw_sql_.**, rownum raw_rnum_ from (SELECT /*+ FIRST_ROWS */ NETWORK_ID||'","'||CALLER_NUMBER||'","'||CALLED_NUMBER FROM CDR FROM CDR WHERE 1 = 1
AND day_of_year = 99 AND INTERFACE = 'TRAFIC' AND TIME_STAMP BETWEEN to_date('2009/04/08 00:00:00','yyyy/mm/dd hh24:mi:ss') AND to_date
('2009/04/09 00:00:00','yyyy/mm/dd hh24:mi:ss') AND NETWORK_ID IN (1025,1026) order by id desc) raw_sql_ WHERE rownum <= 10000
select * from (select raw_sql_.**, rownum raw_rnum_ from (SELECT /*+ FIRST_ROWS */ NETWORK_ID||'","'||CALLER_NUMBER||'","'||CALLED_NUMBER FROM CDR FROM CDR WHERE 1 = 1
AND day_of_year = 99 AND INTERFACE = 'TRAFIC' AND TIME_STAMP BETWEEN to_date('2009/04/08 00:00:00','yyyy/mm/dd hh24:mi:ss') AND to_date
('2009/04/09 00:00:00','yyyy/mm/dd hh24:mi:ss') AND NETWORK_ID IN (1025,1026) order by id desc) raw_sql_ WHERE rownum <= 10000) WHERE raw_rnum_ > 0;
but when I includes outer query I hangs it is really very weird for me?
Here is the explain plan for that query
Execution Plan
Plan hash value: 3493649369
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 2015 | 1 (0)| 00:00:01 | | |
|* 1 | VIEW | | 1 | 2015 | 1 (0)| 00:00:01 | | |
|* 2 | COUNT STOPKEY | | | | | | | |
| 3 | PARTITION RANGE SINGLE | | 1 | 5894 | 1 (0)| 00:00:01 | 99 | 99 |
| 4 | PARTITION LIST ALL | | 1 | 5894 | 1 (0)| 00:00:01 | 1 | 48 |
|* 5 | TABLE ACCESS BY LOCAL INDEX ROWID| CDR | 1 | 5894 | 1 (0)| 00:00:01 | 4705 | 4752 |
| 6 | BITMAP CONVERSION TO ROWIDS | | | | | | | |
|* 7 | BITMAP INDEX SINGLE VALUE | IX_CDR_INTERFACE | | | | | 4705 | 4752 |
Predicate Information (identified by operation id):
1 - filter("RAW_RNUM_">0)
2 - filter(ROWNUM<=10000)
5 - filter("DAY_OF_YEAR"=99 AND "TIME_STAMP">=TO_DATE('2009-04-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND
"TIME_STAMP"<=TO_DATE('2009-04-09 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND ("NETWORK_ID"=1025 OR
"NETWORK_ID"=1026))
7 - access("INTERFACE"='TRAFIC')
can one explain why it happen? what could be the reason? Is it a bug or something? what should I do now? Issue is critical in the production enviromentent
Waiting for your Valuable Reply
Thanks In Advance
With Regards
Boouser454189 wrote:
I suspect the issue with the where clause (raw_rnum_ > 0)
Actually I using bitmap index on ' INTERFACE' column. Does it causing a prob or raw_rnum_ causing a problem?Boo,
a couple of comments:
1. Why do you use the deprecated FIRST_ROWS hint? From 9i on the FIRST_ROWS_n mode should be used instead, and since you're using a top-N query format the hint should be superfluous anyway since the optimizer should switch to FIRST_ROWS_n mode automatically.
2. Why do you use a BITMAP index and not a conventional b*tree index? Let me hazard a guess: Because the INTERFACE column has a small number of distinct values? That would be in most cases a bad idea.
3. What seems to be odd that you're accessing the data via the BITMAP index on INTERFACE, but request an ORDER BY ID DESC. But there is no order by in the execution plan posted. I wonder where the order should come from? Can you show us the DDL of the bitmap index?
4. What does the plan look like if you run only the inner query without the outer query?
You can always gain more information by tracing the statement execution or using the GATHER_PLAN_STATISTICS hint together with the DBMS_XPLAN.DISPLAY_CURSOR function.
Please read this HOW TO: Post a SQL statement tuning request - template posting that explains what you should provide if you have SQL statement tuning question and how to format it here so that the posted information is readable by others.
This accompanying blog post shows step-by-step instructions how to obtain that information.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
In our enterprise MPLS network we are using 192.168.20.0/24 subnet, in this subnet we have not assigned the IP 192.168.20.200/30 & 204/30, But still these subnets are reachable . Are these NNI IP ...Please explain.
I have checked with ISP, there response is like below:
Those are the NNI to GBNET IPs for Dominican Republic. They are Network IPs. You should be able to ping them-that means they are working.
WANRT01#show ip route | include 192.168.20.20
B 192.168.20.200/30 [20/0] via 192.168.20.226, 02:18:29
B 192.168.20.204/30 [20/0] via 192.168.20.226, 02:18:29
Here its shows from any of our MPLS site we are able to trace the IP and it seems like, 192.168.20.204/30 is one more site but in actual its not.
INMUMWANRT01#ping 192.168.20.205
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.205, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 224/232/260 ms
INMUMWANRT01#trace
INMUMWANRT01#traceroute 192.168.20.205
Type escape sequence to abort.
Tracing the route to 192.168.20.205
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.20.226 24 msec 24 msec 24 msec
2 192.168.20.206 [AS 8035] 232 msec 232 msec 252 msec
3 192.168.20.205 [AS 8035] 224 msec 224 msec * -
I just purchased a new laptop, so consequently had to buy Itunes Match to get all of my music back. Now everything is in the cloud, and I can't play them and cannot make a cd. Please explain how I can get my library out of the cloud and keep them on my computer so they are available when I want them? Wow.......why have you made everything so difficult now?
SKF5656 wrote:
I just purchased a new laptop, so consequently had to buy Itunes Match to get all of my music back.
No you didn't.
Now everything is in the cloud
Except for anything you did not purchase in iTunes Store.
Only you iTunes purchases are in the cloud.
Reada the article that brenden dv posted to copy your iTunes library to new computer.
Maybe you are looking for
-
Old Appletalk Printer Stopped Working With Snow Leopard
My old Apple 630 Pro Printer, which is connected to one of the Ethernet ports of my Time Capsule station, used to work perfectly through Appletalk... till I installed Snow Leopard. No more Appletalk in Snow Leopard, the printer is gone. If I could fi
-
Photoshop CS6 keyboard shortcuts in PSE 12
Has the structure of the .kys file changed in CS6? I used to be able to use the keyboard shortcuts from CS5 with my wife's laptop. We recently went to CS6 on my desktop and PSE 12 on her laptop, and now the keyboard shortcuts that I try to copy fro
-
Does the latest iPad have flash Player built in?
Does the latest iPad support Flash Player? Is it built in?
-
Hi, In Fusion APplications, we dont find Forms based Applications...only Self Service Web Applications...i have read some where about this.... Forms ----> Jdeveloper Reports ---> XML Publishser what does it mean...Self Service...any meaning for that.
-
Interactive Form Offline - Scenario invoke Web services
Hi All, I need developed a adobe form offline invoked webservices to update the BackEnd. I can use WD for Abap?? or only work with wd for Java ?? Tks Ivo Hashimoto