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 replies
Hi 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
Similar Messages
-
Please help me what other way i can tune this select query..
Hello Guru,
I have a select query which retrieve data from 10 tables and around 4 tables having 2-4 Lac record and rest are having 80,000 - 1 Lac record.
It is taking around 7-8 seconds to fetch 55000 record.
I was strictly told by the client that i should not use HINTS in my query. My query is below. Please help me what other way i can tune this select query..
select
CT.CUST_ID
,CT.ROMANISED_SURNAME
,CT.SURNAME
,CT.ROMANISED_GIVEN_NAME
,CT.GIVEN_NAME
,CT.ROMANISED_MIDDLE_NAME
,CT.MIDDLE_NAME
,CT.ROMANISED_NAME_SUFFIX
,CT.NAME_SUFFIX
,CT.ROMANISED_TITLE
,CT.TITLE
,CT.ROMANISED_NAME_INITIALS
,CT.NAME_INITIALS
,CT.NAME_TEXT
,CT.CUST_JRNY_ID
,RK.REMARK_TYPE
,RK.REMARK_ID+CT.CUST_ID as REMARK_ID
,RK.REMARK_STATUS
,RK.REMARK_TEXT
,RK.HOST_ONLY_IND
,RK.SUPERVISORY_IND
,RK.CUST_COMM_IND
,RK.REMARK_SEQ
,RK.REMARK_CODE
,RK.DEFAULT_CUST_REL_IND
,RK.DEFAULT_FLIGHT_SEG_REL_IND
,RK.IATA_CODE
,RK.ICAO_CODE
,CJ.RECORD_LOCATOR "SITA_RECORD_LOCATOR"
,Cjv.Record_Locator "ORIGINATOR_RECORD_LOCATOR"
,FS.TRAVELLING_GROUP_CODE
,CG.GROUP_NAME
FROM FLIGHT_LEG FL
,CUST_FLIGHT_LEG CFL
,CUST CT
,CUST_REMARK CTR
,REMARK RK
,FLIGHT_SEG_FLIGHT_LEG FSFL
,FLIGHT_SEG FS
,CUST_JRNY CJ
,CUST_JRNY_VERSION CJV
,CUST_GROUP CG
WHERE FL.OPR_FLIGHT_NUMBER = 1--I_OPR_FLIGHT_NUMBER
and FL.HISTORY_VERSION_NUMBER = 0
and FL.DEPARTURE_STATION_CODE = 'DEL'--I_DEPARTURE_STATION_CODE
and FL.DEPARTURE_DATETIME = TO_DATE('10-DEC-2012 18.45.00', 'DD-MON-YYYY HH24.MI.SS')
and FL.OPR_SERVICE_PROVIDER_CODE= 'AI'--i_opr_service_provider_code
and FL.OPR_FLIGHT_SUFFIX = 'A'--NVL(I_OPR_FLIGHT_SUFFIX, FL.OPR_FLIGHT_SUFFIX)
AND FL.FLIGHT_LEG_ID = CFL.FLIGHT_LEG_ID
AND CFL.CUST_ID = CT.CUST_ID
AND FL.FLIGHT_LEG_ID=FSFL.FLIGHT_LEG_ID
AND FSFL.FLIGHT_SEG_ID=FS.FLIGHT_SEG_ID
AND CT.CUST_ID = CTR.CUST_ID(+)
AND CTR.REMARK_ID = RK.REMARK_ID(+)
AND FL.CUST_JRNY_ID = CJ.CUST_JRNY_ID
and CJ.CUST_JRNY_ID = CJV.CUST_JRNY_ID
AND CG.CUST_JRNY_ID(+) = CT.CUST_JRNY_ID
AND CFL.HISTORY_VERSION_NUMBER = 0
AND CT.HISTORY_VERSION_NUMBER = 0
AND NVL(CTR.HISTORY_VERSION_NUMBER,0) = 0
AND NVL(RK.HISTORY_VERSION_NUMBER,0) = 0
AND FS.HISTORY_VERSION_NUMBER = 0
AND FSFL.HISTORY_VERSION_NUMBER = 0
-- AND CJ.HISTORY_VERSION_NUMBER = 0
and CJV.VERSION_NUMBER = 0 --- Need to check
AND NVL(CG.HISTORY_VERSION_NUMBER,0) = 0
order by CT.CUST_JRNY_ID,CT.CUST_ID;
The Tables having record:
select COUNT(*) from FLIGHT_LEG -----241756
select COUNT(*) from CUST_FLIGHT_LEG---632585
select COUNT(*) from CUST---240015
select COUNT(*) from CUST_REMARK---73724
select COUNT(*) from REMARK---73654
select COUNT(*) from FLIGHT_SEG_FLIGHT_LEG---241789
select COUNT(*) from FLIGHT_SEG----260004
select COUNT(*) from CUST_JRNY----74288
select COUNT(*) from CUST_JRNY_VERSION----74477
select COUNT(*) from CUST_GROUP----55819
Thanks,
HP..Plan hash value: 3771714931
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 10239 | 2949K| | 7515 (1)| 00:01:31 | | |
| 1 | SORT ORDER BY | | 10239 | 2949K| 3160K| 7515 (1)| 00:01:31 | | |
|* 2 | HASH JOIN | | 10239 | 2949K| | 6864 (1)| 00:01:23 | | |
| 3 | PARTITION HASH ALL | | 73687 | 1079K| | 417 (1)| 00:00:06 | 1 | 512 |
|* 4 | TABLE ACCESS FULL | CUST_JRNY_VERSION | 73687 | 1079K| | 417 (1)| 00:00:06 | 1 | 512 |
|* 5 | HASH JOIN | | 10239 | 2799K| | 6445 (1)| 00:01:18 | | |
| 6 | PARTITION HASH ALL | | 73654 | 863K| | 178 (1)| 00:00:03 | 1 | 512 |
| 7 | TABLE ACCESS FULL | CUST_JRNY | 73654 | 863K| | 178 (1)| 00:00:03 | 1 | 512 |
|* 8 | FILTER | | | | | | | | |
|* 9 | HASH JOIN RIGHT OUTER | | 10239 | 2679K| | 6267 (1)| 00:01:16 | | |
| 10 | PARTITION HASH ALL | | 55315 | 756K| | 137 (1)| 00:00:02 | 1 | 512 |
| 11 | TABLE ACCESS FULL | CUST_GROUP | 55315 | 756K| | 137 (1)| 00:00:02 | 1 | 512 |
|* 12 | FILTER | | | | | | | | |
|* 13 | HASH JOIN OUTER | | 10240 | 2540K| 2056K| 6129 (1)| 00:01:14 | | |
|* 14 | FILTER | | | | | | | | |
|* 15 | HASH JOIN RIGHT OUTER | | 10242 | 1930K| | 5531 (1)| 00:01:07 | | |
| 16 | INDEX FAST FULL SCAN | CUST_REMARK_PK | 73677 | 935K| | 190 (0)| 00:00:03 | | |
|* 17 | HASH JOIN | | 10257 | 1802K| | 5339 (1)| 00:01:05 | | |
|* 18 | HASH JOIN | | 10257 | 701K| | 3516 (1)| 00:00:43 | | |
|* 19 | HASH JOIN | | 3963 | 220K| | 2476 (1)| 00:00:30 | | |
|* 20 | HASH JOIN | | 3963 | 181K| | 1300 (1)| 00:00:16 | | |
| 21 | PARTITION HASH ALL | | 3963 | 131K| | 728 (1)| 00:00:09 | 1 | 512 |
|* 22 | TABLE ACCESS FULL | FLIGHT_LEG | 3963 | 131K| | 728 (1)| 00:00:09 | 1 | 512 |
|* 23 | INDEX FAST FULL SCAN| FLIGHT_SEG_FLIGHT_LEG_PK | 240K| 3059K| | 571 (1)| 00:00:07 | | |
| 24 | PARTITION HASH ALL | | 259K| 2531K| | 1175 (1)| 00:00:15 | 1 | 512 |
|* 25 | TABLE ACCESS FULL | FLIGHT_SEG | 259K| 2531K| | 1175 (1)| 00:00:15 | 1 | 512 |
| 26 | PARTITION HASH ALL | | 631K| 8011K| | 1037 (1)| 00:00:13 | 1 | 512 |
|* 27 | TABLE ACCESS FULL | CUST_FLIGHT_LEG | 631K| 8011K| | 1037 (1)| 00:00:13 | 1 | 512 |
| 28 | PARTITION HASH ALL | | 239K| 25M| | 1822 (1)| 00:00:22 | 1 | 512 |
|* 29 | TABLE ACCESS FULL | CUST | 239K| 25M| | 1822 (1)| 00:00:22 | 1 | 512 |
| 30 | PARTITION HASH ALL | | 73623 | 4385K| | 243 (1)| 00:00:03 | 1 | 512 |
| 31 | TABLE ACCESS FULL | REMARK | 73623 | 4385K| | 243 (1)| 00:00:03 | 1 | 512 |
Predicate Information (identified by operation id):
2 - access("CJ"."CUST_JRNY_ID"="CJV"."CUST_JRNY_ID")
4 - filter("CJV"."VERSION_NUMBER"=0)
5 - access("FL"."CUST_JRNY_ID"="CJ"."CUST_JRNY_ID")
8 - filter(NVL("CG"."HISTORY_VERSION_NUMBER",0)=0)
9 - access("CG"."CUST_JRNY_ID"(+)="CT"."CUST_JRNY_ID")
12 - filter(NVL("RK"."HISTORY_VERSION_NUMBER",0)=0)
13 - access("CTR"."REMARK_ID"="RK"."REMARK_ID"(+))
14 - filter(NVL("CTR"."HISTORY_VERSION_NUMBER",0)=0)
15 - access("CT"."CUST_ID"="CTR"."CUST_ID"(+))
17 - access("CFL"."CUST_ID"="CT"."CUST_ID")
18 - access("FL"."FLIGHT_LEG_ID"="CFL"."FLIGHT_LEG_ID")
19 - access("FSFL"."FLIGHT_SEG_ID"="FS"."FLIGHT_SEG_ID")
20 - access("FL"."FLIGHT_LEG_ID"="FSFL"."FLIGHT_LEG_ID")
22 - filter("FL"."DEPARTURE_STATION_CODE"='DEL' AND "FL"."DEPARTURE_DATETIME"=TO_DATE(' 2012-12-10 18:45:00', 'syyyy-mm-dd
hh24:mi:ss') AND "FL"."OPR_SERVICE_PROVIDER_CODE"='AI' AND "FL"."OPR_FLIGHT_NUMBER"=1 AND "FL"."OPR_FLIGHT_SUFFIX"='A' AND
"FL"."HISTORY_VERSION_NUMBER"=0)
23 - filter("FSFL"."HISTORY_VERSION_NUMBER"=0)
25 - filter("FS"."HISTORY_VERSION_NUMBER"=0)
27 - filter("CFL"."HISTORY_VERSION_NUMBER"=0)
29 - filter("CT"."HISTORY_VERSION_NUMBER"=0) -
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 -
Please suggest a select query / sub query with out using any subprograms or
source table: Three columns ORIGIN, DESTINATION,MILES
Origin Destination Miles
Sydney Melbourne 1000
Perth Adelaide 3000
Canberra Melbounre 700
Melbourne Sydney 1000
Brisbane Sydney 1000
Perth Darwin 4000
Sydney Brisbane 1000
out put :Three columns ORIGIN, DESTINATION,MILES
Duplicate routes are to be ignored so the output is
Origin Destination Miles
Sydney Melbourne 1000
Perth Adelaide 3000
Canberra Melbounre 700
Brisbane Sydney 1000
Perth Darwin 4000
Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Hi,
user9368047 wrote:
... Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Why? If the most efficient way to get the results you want involves using a function, why wouldn't you use it?
Here's one way, without any functions:
SELECT a.*
FROM source_table a
LEFT OUTER JOIN source_table b ON a.origin = b.destination
AND a.destination = b.origin
AND a.miles = b.miles
WHERE b.origin > a.origin -- Not b.origin > b.origin
OR b.origin IS NULL
;If you'd care to post CREATE TABLE and INSERT statements for your sample data, then I could test this.
Edited by: Frank Kulash on Nov 6, 2012 7:39 PM
Corrected WHERE clause after MLVrown (below) -
EXTENDED_PROGRAM_CHECK please explain this FM and uses of this and Sub FM
EXTENDED_PROGRAM_CHECK please explain this FM and uses of this and Sub FM
Points Awarded if useful answer,Hi,
This is FM for extended program checking. Description of implemented tests when making the test selection.
This same same as the extended program check of the SE38 program.
Open any program in ABAP editor.
Goto program->check->extended program check.
Select the check boxes and execute. It displays all the error and warning of the selected crieteria. Now you can check all these error conditions. The FM is for achieving the same functionality
Hope this helps.
Regards,
Richa -
What can i do for removing SINGLE in this select query??
What can i do for removing SINGLE in this select query given below and also NOT USE 'ENDSELECT'??
I have defined g_t_zv7_cachemapping as following ::
DATA : BEGIN OF g_t_zv7_cachemapping OCCURS 0,
kostl LIKE zv7_cachemapping-kostl,
END OF g_t_zv7_cachemapping.
SELECT SINGLE kostl FROM zv7_cachemapping INTO g_t_zv7_cachemapping
WHERE auart = g_t_vbak-auart.
IF sy-subrc = 0 .
ENDIF.Shashank,
DATA : BEGIN OF g_t_zv7_cachemapping OCCURS 0,
AUART LIKE zv7_cachemapping-AUART,
kostl LIKE zv7_cachemapping-kostl,
END OF g_t_zv7_cachemapping.
If not g_t_vbak[] is initial.
SELECT auart kostl
FROM zv7_cachemapping INTO table g_t_zv7
for all entries in g_t_vbak
WHERE auart = g_t_vbak-auart.
Endif.
sort : g_t_zv7 by auart ,
g_t_vbak by auart.
loop at g_t_vbak.
READ TABLE g_t_zv7 WITH KEY AUART = g_t_vbak-AUART
BINARY SEARCH.
IF sy-subrc eq 0.
ENDIF.
endloop.
Pls. reward if useful -
Can anyone please explain this code to me?
I am a new (junior)programmer?Can anyone please explain this code to me in lame terms? I am working at a client location and found this code in a project.
_file name is AtccJndiTemplate.java_
Why do we use the Context class?
Why do we use the properties class?
package org.atcc.common.utils;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.springframework.jndi.JndiTemplate;
public class AtccJndiTemplate extends JndiTemplate
private static Logger logger = Logger.getLogger(AtccJndiTemplate.class.getName());
private String jndiProperties;
protected Context createInitialContext()
throws NamingException
Context context = null;
InputStream in = null;
Properties env = new Properties();
logger.info("Load JNDI properties from classpath file " + this.jndiProperties);
try
in = AtccJndiTemplate.class.getResourceAsStream(this.jndiProperties);
env.load(in);
in.close();
catch (NullPointerException e) {
logger.warning("Did not read JNDI properties file, using existing properties");
env = System.getProperties();
} catch (IOException e) {
logger.warning("Caught IOException for file [" + this.jndiProperties + "]");
throw new NamingException(e.getMessage());
logger.config("ENV: java.naming.factory.initial = " + env.getProperty
("java.naming.factory.initial"));
logger.config("ENV: java.naming.factory.url.pkgs = " + env.getProperty
("java.naming.factory.url.pkgs"));
logger.info("ENV: java.naming.provider.url = " + env.getProperty
("java.naming.provider.url") + " timeout=" + env.getProperty("jnp.timeout"));
context = new InitialContext(env);
return context;
public String getJndiProperties()
return this.jndiProperties;
public void setJndiProperties(String jndiProperties)
this.jndiProperties = jndiProperties;
}Hi,
JNDI needs some property such as the
java.naming.factory.initial
java.naming.provider.url
which are needed by the
InitialContext(env);
where env is a properties object
Now if you can not find the physical property file on the class path
by AtccJndiTemplate.class.getResourceAsStream(this.jndiProperties);
where the String "jndiProperties" get injected by certain IOC ( inverse of control container ) such as Spring framework
if not found then it will take the property from the system which will come from the evniromental variables which are set during the application start up i.e through the command line
java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory -Danother=value etc..
I hope this could help
Regards,
Alan Mehio
London,UK -
Can we replace this SELECT query by more efficient code
can we replace this SELECT query by more efficient code ?:-
SELECT * FROM zv7_custord
INTO TABLE G_T_ZV7_CUSTORD
WHERE ( SENDER in S_SENDER and
ORDNUM in S_ORDER and
ZDATE in S_DATE ) OR
( SENDER in S_SENDER AND
STATUS = SPACE )
ORDER BY IDOCNUM.Hi
U can leave ORDER BY option and sort the table by yourself and try to split the query:
SELECT * FROM zv7_custord
INTO TABLE G_T_ZV7_CUSTORD
WHERE SENDER in S_SENDER and
ORDNUM in S_ORDER and
ZDATE in S_DATE .
SELECT * FROM zv7_custord
APPENDING TABLE G_T_ZV7_CUSTORD
WHERE SENDER in S_SENDER and
NOT ORDNUM in S_ORDER and
NOT ZDATE in S_DATE and
STATUS = SPACE
or
SELECT * FROM zv7_custord
INTO TABLE G_T_ZV7_CUSTORD
WHERE SENDER in S_SENDER and
ORDNUM in S_ORDER and
ZDATE in S_DATE .
SELECT * FROM zv7_custord
APPENDING TABLE G_T_ZV7_CUSTORD
WHERE SENDER in S_SENDER and
STATUS = SPACE.
* Sort the table key fields
SORT G_T_ZV7_CUSTORD BY <KEY1> <KEY2> .....
DELETE ADJACENT DUPLICATES FROM G_T_ZV7_CUSTORD COMPARING <KEY1> .....
Max -
Please validate my select query with offset
Could you please validate my select query below :
AND kadky+0(4) IN s_gjahr is correct ?
=====================================
SELECT-options:
s_gjahr FOR ckhs-gjahr NO-EXTENSION NO INTERVALS OBLIGATORY DEFAULT sy-datum+0(4).
SELECT bzobj
kalnr
kalka
kadky
tvers
bwvar
kkzma
matnr
werks
feh_sta
FROM keko
INTO TABLE i_keko
FOR ALL ENTRIES IN i_mackw
WHERE matnr = i_mackw-matnr
AND werks = i_mackw-werks
AND kadky+0(4) IN s_gjahr <==
AND ( feh_sta = 'FR'
OR feh_sta = 'VO' )Hi,
Use the below code.
ranges: r_gjahr for ckhs-gjahr.
r_gjahr-low = s_gjahr-low.
r_gjahr-sign = 'I'.
r_gjahr-option = 'EQ'.
append r_gjahr.
r_gjahr-low = s_gjahr-low - 1.
r_gjahr-sign = 'I'.
r_gjahr-option = 'EQ'.
append r_gjahr.
SELECT bzobj
kalnr
kalka
kadky
tvers
bwvar
kkzma
matnr
werks
feh_sta
FROM keko
INTO TABLE i_keko
FOR ALL ENTRIES IN i_mackw
WHERE matnr = i_mackw-matnr
AND werks = i_mackw-werks
AND ( feh_sta = 'FR'
OR feh_sta = 'VO' ).
if sy-subrc = 0.
delete i_keko where not kadky+0(4) IN r_gjahr.
endif.
Regards,
Kumar Bandanadham
Edited by: Velangini Showry Maria Kumar Bandanadham on May 28, 2009 7:37 AM -
Need help tuning on this select query
select a.exceptionid, c.sequencenumber, c.messagedelay,a.exceptioncode
from exceptiondetailview a, exceptionrecaltkey b, sequencerconfig c
where a.exceptionid = b.exceptionid
and a.transactiontype = c.transactiontype
and a.exceptionid in (
select exceptionid
from exceptionrecaltkey
where altkeyname = 'SequenceKey' and altkeyvalue like ('%[11968176]%'))
minus
select exceptionid
from exceptionrecaltkey
where altkeyname = 'SequenceFlowName'
and altkeyvalue <> 'APV_OUTBOUND')
and b.altkeyname = 'SequenceKey'
and c.sequenceflowname = 'APV_OUTBOUND'
and c.sequencenumber > ( decode(ASN, null, (select min(sequencenumber) from sequencerconfig where sequenceflowname = 'APV_OUTBOUND' and exceptioncode = a.exceptioncode),
(select sequencenumber from sequencerconfig where sequenceflowname = 'APV_OUTBOUND' and transactiontype = ASN and exceptioncode = a.exceptioncode) ) )
and a.status = 'New'Hi,
Please try this ,
select a.exceptionid, c.sequencenumber, c.messagedelay,a.exceptioncode
from exceptiondetailview a, exceptionrecaltkey b, sequencerconfig c
where
exists a.exceptionid in (
select exceptionid
from exceptionrecaltkey
where altkeyname = 'SequenceKey' and altkeyvalue like ('%[11968176]%'))
and a.exceptionid = b.exceptionid
and a.transactiontype = c.transactiontype
minus
select exceptionid
from exceptionrecaltkey
where altkeyname = 'SequenceFlowName'
and altkeyvalue 'APV_OUTBOUND')
and b.altkeyname = 'SequenceKey'
and c.sequenceflowname = 'APV_OUTBOUND'
and c.sequencenumber > ( decode(ASN, null, (select min(sequencenumber) from sequencerconfig where sequenceflowname = 'APV_OUTBOUND' and exceptioncode = a.exceptioncode),
(select sequencenumber from sequencerconfig where sequenceflowname = 'APV_OUTBOUND' and transactiontype = ASN and exceptioncode = a.exceptioncode) ) )
and a.status = 'New'
REgards,
N.Senthil -
Make this select query to Select Insert query
Hi,
How to make this select query to select Insert query..
;WITH DateDim AS
SELECT CAST('1900-01-01' AS DATETIME) StartDate
UNION ALL
SELECT StartDate + 1
FROM DateDim
WHERE StartDate + 1 <= '2099-12-31'
SELECT CAST(CONVERT(CHAR(8),CAST(StartDate AS DATETIME),112) AS INT) AS DateKey
, StartDate
, DATEPART(dw, StartDate) AS DayNumberOfWeek
, DATENAME(dw, StartDate) AS EnglishDayNameOfWeek
, DAY(StartDate) AS DayNumberOfMonth
, (CASE WHEN MONTH(StartDate)>=1 AND MONTH(StartDate) <=6 THEN 1 ELSE 2 END) AS CalendarSemester
FROM DateDim
OPTION (MAXRECURSION 0)
GOThe final solution is
;WITH DateDim AS
SELECT CAST('1900-01-01' AS DATETIME) StartDate
UNION ALL
SELECT StartDate + 1
FROM DateDim
WHERE StartDate + 1 <= '2099-12-31'
SELECT CAST(CONVERT(CHAR(8),CAST(StartDate AS DATETIME),112) AS INT) AS DateKey
, StartDate
, DATEPART(dw, StartDate) AS DayNumberOfWeek
, DATENAME(dw, StartDate) AS EnglishDayNameOfWeek
, DAY(StartDate) AS DayNumberOfMonth
, (CASE WHEN MONTH(StartDate)>=1 AND MONTH(StartDate) <=6 THEN 1 ELSE 2 END) AS CalendarSemester
Into new_tablenameFROM
DateDim
OPTION (MAXRECURSION 0)
GO -
Someone Please Explain This to me-Quad G5 running slower that Christmas
I just got my Quad Powermac G5 fully loaded w/ 8 Gigs; 2 500 Gig Hd's and this thing is running slower than my 15 inch powerbook with 2 gigs. I am running Motion 1 and I am simply taking a picture and applying an effect (nothing crazy just simple blurs and such) and it will not play in real time? it seems to be just as slow at rendering effects as my powerbook? it took 3 mins. to render 15 seconds? Could someone please explain this phenomenom? I am a little baffled and ****** off.
Quad Powermac G5 Mac OS X (10.4.3)Mac OS X is heavily cache and swap dependant, its like the OS was designed to run with flash RAM instead of hard drives or something.
The speed of Mac OS X will improve greatly upon the I/O speed of your boot drive.
Since you got the stock 250 GB, most likely without a large 16Mb cache, Mac OS X will crawl slower and slower as the boot drive fills up.
I've noticed with my brand new 20" iMac G5 that I'm getting beachballs, there is nothing hardly on the drive and it's not even hooked ot the internet and it's slow, a pig 250 GB 7,200 RPM drive.
My main machine in my signature is lighting quick, windows snap open, program launch fast as heck and boot time is under 30 seconds. Actually it's a combination of things, fast video card, plenty of RAM and fast drive I/O speed that make a Mac snappy with the feature and eye candy rich Mac OS X.
The Quad has four processors, so CPU intensive multi-threaded applications will perform long jobs in short order. As well as running many applications at once.
What will help make your Quad snappy is to replace your boot drive with a 74 GB 10,000 RPM Western Digital Raptor and keep it slim, keep your files on a second drive, leave your iTunes and User "home" folders alone on the Raptor just near empty.
I've written it up here in a text doc
(I get no comp for product mention) -
Hi there,
I didn't understand how exactly the query ran and what exactly happened.
Can someone please explain?
SQL> set autotrace on
SQL> select salary,department_name,e.department_id,d.department_id from employees e,departments d where e.department_id>d.department_id and first_name like 'K%';
SALARY DEPARTMENT_NAME DEPARTMENT_ID DEPARTMENT_ID
13500 Public Relations 80 70
13500 IT 80 60
13500 Shipping 80 50
13500 Human Resources 80 40
13500 Purchasing 80 30
13500 Marketing 80 20
13500 Administration 80 10
2400 Human Resources 50 40
2400 Purchasing 50 30
2400 Marketing 50 20
2400 Administration 50 10
SALARY DEPARTMENT_NAME DEPARTMENT_ID DEPARTMENT_ID
3000 Human Resources 50 40
3000 Purchasing 50 30
3000 Marketing 50 20
3000 Administration 50 10
3800 Human Resources 50 40
3800 Purchasing 50 30
3800 Marketing 50 20
3800 Administration 50 10
5800 Human Resources 50 40
5800 Purchasing 50 30
5800 Marketing 50 20
SALARY DEPARTMENT_NAME DEPARTMENT_ID DEPARTMENT_ID
5800 Administration 50 10
2500 Marketing 30 20
2500 Administration 30 10
25 rows selected.
Execution Plan
Plan hash value: 3586199209
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
|
| 0 | SELECT STATEMENT | | 9 | 612 | 8 (25)| 00:00:0
1 |
| 1 | MERGE JOIN | | 9 | 612 | 8 (25)| 00:00:0
1 |
| 2 | SORT JOIN | | 7 | 266 | 4 (25)| 00:00:0
1 |
|* 3 | TABLE ACCESS FULL| EMPLOYEES | 7 | 266 | 3 (0)| 00:00:0
1 |
|* 4 | SORT JOIN | | 27 | 810 | 4 (25)| 00:00:0
1 |
| 5 | TABLE ACCESS FULL| DEPARTMENTS | 27 | 810 | 3 (0)| 00:00:0
1 |
Predicate Information (identified by operation id):
3 - filter("FIRST_NAME" LIKE 'K%')
4 - access(INTERNAL_FUNCTION("E"."DEPARTMENT_ID")>INTERNAL_FUNCTION("D".
"DEPARTMENT_ID"))
filter(INTERNAL_FUNCTION("E"."DEPARTMENT_ID")>INTERNAL_FUNCTION("D".
"DEPARTMENT_ID"))
Note
- dynamic sampling used for this statement
Statistics
0 recursive calls
0 db block gets
7 consistent gets
0 physical reads
0 redo size
1292 bytes sent via SQL*Net to client
395 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
25 rows processedPS: JOIN has to be done with '=' operator. Is this correct?
Thanks
RajivDear Rajiv,
Because you make a join with > sign
Oracle decide
First - search all EMPLOYEES that match you filter condition first_name like 'K%' and ordering then by departament id
Then - Oracle sort all departament on dept table by id
With both sets Sorted, Oracle simply go to one set and check another set, and join then.
Regards
Helio Dias
www.heliodias.com -
Please explain this code,this is regarding to ODS activation.
Hi,
Please I am unable to understand this code,this exists initial activation of ODS,please can anyone please explain me this
ob started
Step 001 started (program RSPROCESS, variant &0000000055152, user ID ALEREMOTE)
Activation is running: Data target ZYL_O82, from 1.165.349 to 1.165.349
Data to be activated successfully checked against archiving objects
SQL: 20.06.2007 05:34:26 ALEREMOTE
ANALYZE TABLE "/BIC/AZYT_O6240" DELETE STATISTICS
SQL-END: 20.06.2007 05:34:26 00:00:00
SQL: 20.06.2007 05:34:26 ALEREMOTE
BEGIN DBMS_STATS.GATHER_TABLE_STATS ( OWNNAME =>
'SAPR3', TABNAME => '"/BIC/AZYT_O6240"',
ESTIMATE_PERCENT => 1 , METHOD_OPT => 'FOR ALL
INDEXED COLUMNS SIZE 75', DEGREE => 1 ,
GRANULARITY => 'ALL', CASCADE => TRUE ); END;
Thanks & Regards,
ManoHi,
Please I am unable to understand this code,this exists initial activation of ODS,please can anyone please explain me this
ob started
Step 001 started (program RSPROCESS, variant &0000000055152, user ID ALEREMOTE)
Activation is running: Data target ZYL_O82, from 1.165.349 to 1.165.349
Data to be activated successfully checked against archiving objects
SQL: 20.06.2007 05:34:26 ALEREMOTE
ANALYZE TABLE "/BIC/AZYT_O6240" DELETE STATISTICS
SQL-END: 20.06.2007 05:34:26 00:00:00
SQL: 20.06.2007 05:34:26 ALEREMOTE
BEGIN DBMS_STATS.GATHER_TABLE_STATS ( OWNNAME =>
'SAPR3', TABNAME => '"/BIC/AZYT_O6240"',
ESTIMATE_PERCENT => 1 , METHOD_OPT => 'FOR ALL
INDEXED COLUMNS SIZE 75', DEGREE => 1 ,
GRANULARITY => 'ALL', CASCADE => TRUE ); END;
Thanks & Regards,
Mano -
How to split this select query
Hi all,
Can any one help me to split this single select query into 9 select query.
select KNA1STCEG VBRKBUKRS VBRKVKORG VBRKVBELN VBRKFKDAT VBRKFKART VBRKVBTYP VBRKVBUND VBRKKUNAG VBRKKUNRG VBRK~NETWR
VBRKWAERK VBRKFKSTO VBRKSFAKN VBRKLAND1 T001WKUNNR VBRPPOSNR VBRPWERKS VBRPFKIMG VBRPVRKME VBRPPRSDT
VBRPNETWR VBRPVGBEL VBRPVGPOS VBRPMATNR VBRPPRCTR VBRPCHARG VBRPAUBEL VBRPAUPOS VBRPVBELN T001WAERS T001~BUKRS
MBEWSTPRS MBEWPEINH MBEWMATNR MBEWBWKEY LIKPLFART LIKPWERKS LIKPVBELN MBEW_RECVSTPRS MBEW_RECV~PEINH
MBEW_RECVBWKEY MBEW_RECVMATNR CKMLCRBDATJ CKMLCRPOPER CKMLCRSTPRS CKMLCRWAERS CKMLCRPEINH CKMLCRCURTP
CKMLCRKALNR CKMLCR_RECVSTPRS CKMLCR_RECVWAERS CKMLCR_RECVPEINH CKMLCR_RECVCURTP CKMLCR_RECVBDATJ CKMLCR_RECV~POPER
CKMLCR_RECV~KALNR
from ( KNA1
left outer join VBRK
on VBRKKUNRG = KNA1KUNNR
inner join T001W
on T001WKUNNR = VBRKKUNAG
inner join VBRP
on VBRPVBELN = VBRKVBELN
inner join T001
on T001BUKRS = VBRKBUKRS
left outer join MBEW
on MBEWMATNR = VBRPMATNR
and MBEWBWKEY = VBRPWERKS
left outer join LIKP
on LIKPVBELN = VBRPVGBEL
inner join MBEW as MBEW_RECV
on MBEW_RECVBWKEY = T001WBWKEY
and MBEW_RECVMATNR = VBRPMATNR
inner join CKMLCR
on CKMLCRKALNR = MBEWKALN1
inner join CKMLCR as CKMLCR_RECV
on CKMLCR_RECVKALNR = MBEW_RECVKALN1 )
where VBRP~WERKS in SP$00005
and VBRP~MATNR in SP$00008
and VBRP~CHARG in SP$00009
and VBRP~AUBEL in SP$00017
and CKMLCR~CURTP in SP$00015
and CKMLCR~BDATJ in SP$00013
and CKMLCR~POPER in SP$00014
and CKMLCR_RECV~CURTP in SP$00019
and CKMLCR_RECV~BDATJ in SP$00020
and CKMLCR_RECV~POPER in SP$00018 .Hi, it is not good for your performance to split into 9 selects but the select you are now using is also not so good. Start with VBRP instead of KNA1.
You can do it in the following way. For example:
DATA tb_kna1 TYPE STANDARD TABLE OF kna1.
DATA tb_vbrk TYPE STANDARD TABLE OF vrbk.
DATA tb_vrbp TYPE STANDARD TABLE OF vrbp.
Start with VRBP for a better performance
SELECT * FROM vrbp
INTO CORRESPONDING FIELDS OF TABLE tb_vbrp
WHERE werks IN .... etc.
SELECT * FROM vbrk
INTO CORRESPONDING FIELDS OF TABLE tb_vbrk
FOR ALL ENTRIES IN tb_vrbp
WHERE vbeln = tb_vrbp-vbeln.
SELECT * FROM kna1
INTO CORRESPONDING FIELDS OF TABLE tb_kna1
FOR ALL ENTRIES IN tb_vrbk
WHERE kunnr = tb_vrbk-kunnr.
Success.
Maybe you are looking for
-
Https front end and http backend
Hi there....I am having a small issue....I have a web app that is https based....I have installed the cert on the CSS, and DNS for this app points to the VIP....the client is wanting to have an https front end, and then load balance in http to the ba
-
Firefox opens but nothing shows/load in the window, not even menu buttons
I open Firefox & a window opens but nothing loads or shows up, not even menu buttons. Occasionally when you blindly click around some menus will open but options beyond that don't produce anything. I have (not necessarily in this order): Uninstalled
-
Juggling items in Multiple Desktops
I have always used & liked Multiple Desktops. I'll admit, I may have this wrong so just bear w/ me a moment. Initially, could not move items from one Desktop to another. I really like it when that ability was introduced. However it only applied t
-
Pros and cons of using DB LINK
Hi I am planning to use dblink in my current project to acess external database .But is there any other alternative to this ? What are the pros and cons of using Oracle DB Links ? Can anybody help me on this ? Thanks in advance . Pradipta
-
MacBook purchase in USA, can i use it with the french language ?
Hello, If i buy a MacBook in USA, can i use it with french language. I'm gong in USA for holiday, and i may buy a Mac, but i dont Know if i can use it in France. Is warranty are the same. Thanks for your answer. By.