Suppressing sql statement in spool file
I am trying to run a report in sql and I am spooling the output to a file. I cannot seem to figure out what set command will suppress the sql statement.
Hi,
It is "set echo off"
Deepak
Similar Messages
-
Spooling Extracts from Multiple SQL statements in 1 File
Hi all,
I am trying to spool extract results of 3 separate SQL statements into one single file. I wrote a SQL block similar to the one below. However, the result of the statements overwrite each other: 3 overwrote 2 and overwrote 1. Any suggestion how to combined there extracted results in one file?
spool c:\test.txt
<SQL statement 1>
<SQL statement 2>
<SQL statement 3>
/spool OFF
Thanks in advance
JasonPlease paste you SQL file here. These is no way one should overwrite another.
Eric -
How to export the result from executing sql statement to excel file ?
HI all,
Great with Oracle SQL Developer, but I have have a trouble as follwing :
I want to export the result from executing sql statement to excel file . I do easily like that in TOAD ,
anyone can help me to do that ? Thanks so much
SigmasvnHello Sue,
I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
AddVMOption -Duser.language=en
AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
Regards
Marcus -
Tkprof : 0 user SQL statement in trace file
Hello!
Please explain , what is difference of tkprof-converting of user session trace file and an internal/background process ?
Get I message "0 user SQL statement in trace file" cause this difference?
In my target session I issued :
begin
sys.dbms_system.set_ev(...., .., 10046, 12, '');
end;
begin
sys.dbms_system.set_ev(..., .., 10053, 1, '');
end;
/Thanks and regards,
PavelDid you try to tkprof a 10053 trace ?
That is not going to show anything. 10053 traces are meant to be read as they are. tkprof is there to deal with 10046 traces. -
Run sql statement from batch file
How can we execute SQL Statement using Batch file???
I did a test.
create batch file test.bat
sqlplus "username@db /pass" @\script.sql
script.sql file has following statement
select sysdate from dual;
exit
it is working but I want to call sql statement in the same batch file instead of calling .sql script file. how can I do that any idea..This is very easy in unix shell scripting, but AFAIK, not available with Windows. It's a function of how the shell/command processor handles input redirection.
-
How to store data into database by reading sql statements from text file
how to write java program for storing data into database by reading sql statements from text file
Step 1: Create a property file to add various queries.
Step 2: Read the properties file using ResourceBundle
Step 3: Use the jdbc to execute the query read from the property file.
So in future if you need to change query no need do any modifications in java program. But depends on how you use the property file. -
FDM-generated SQL statement in log file?
Hello all, hopefully a simple question:
When you perform an import using FDM, I know that behind the scenes a SQL SELECT statement is composed and executed against the database server. My question: is the actual SQL statement kept in a log somewhere (so that we can see it?) In our case it's an Oracle DB server and we're using the ERPI Adapter; not sure if that's relevant. We would like to grab that SQL statement and use it as a jumping-off point for some other things.
Thanks in advance for anything you can offer.The SQL Statement is not written to the log for the adapter. The only things that are logged are what show in the adapter log file if you enable loggin for the ERPi source adapter in the "Get Data" action.
-
How to remove sql statement in spool output?
Hi Gurus,
If my spool query is like this
set feedback off
set verify off
set trimspool on
set heading off
spool c:\test\test.csv
select * FROM test;
spool offI am getting my csv file as like this:
SELECT * FROM test1
SSO
shsrgh
dehrerdh
wtw55hd
dhdfhdfh
hdhdh
SET SPOOL OFF;What do I need to change in my SQL query such that I will not include these lines:
SELECT * FROM test1
SSO
SET SPOOL OFF;Thanksuser10679113 wrote:
What do I need to change in my SQL query such that I will not include these lines:
SELECT * FROM test1
SSO
SET SPOOL OFF;
You cannot change anything in your SQL query so as to exclude those lines.
Those lines pertain to the client you are using viz. SQL*Plus and do not have anything to do with the SQL language per se.
You could put all those SQL*Plus commands in a script file and run that script file from SQL*Plus, as shown below:
test@ORA10G>
test@ORA10G> -- show contents of the script: c:\test.sql
test@ORA10G> host type c:\test.sql
set feedback off
set trimspool on
set heading off
set echo off
spool c:\test.log
select ename from emp;
spool off
set echo on
set heading on
set feedback on
test@ORA10G>
test@ORA10G> -- run the script
test@ORA10G> @c:\test.sql
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
test@ORA10G> set heading on
test@ORA10G> set feedback on
test@ORA10G>
test@ORA10G> -- show contents of the spooled file: c:\test.log
test@ORA10G> host type c:\test.log
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
test@ORA10G>HTH,
isotope -
Folks
I need to separate SQL statements from Java Code, How do i put these SQL Statements in an XML file and how to access these SQL statements from a Java code,
Any help with sample code is greatful,The use of entities as kstc_jyu may help. It really depends on how you design the XML vocabulary based on the expected usage (e.g., if the SQL statements change very often).
Back to the original question, I am right to interpret "how to use SQL statements in XML ?" as how to design an XML vocabulary to store SQL statements?
If not, you can simply use the scheme proposed by DrClap. Reading and extracting the SQL statement would be just as you would with any other XML document. Google for a Java XML tutorial. -
How to execute sql statement under bat file?
I want to execute following statement
C:\>sqlplus /nolog
SQL> conn scott/tiger
SQL> select * from tab;
I know I can realize it as following test.bat and testdb.sql file
test.bat is follows:
sqlplus /nolog @testdb.sql
testdb.sql is follows:
conn scott/tiger
select * from tab;
Now I don't want to use sql file,I only want to use bat file,like follows:
test.bat is follows:
sqlplus /nolog
conn scott/tiger
select * from tab;
when I run test.bat,I find only sqlplus /nolog statement execute,the other statements don't execute.
1)I want to know whether there is a method to execute sql statement only by bat file without a sql file? How to realize it?
2)If I call sql file,how to hide passord of user? Because I don't want to other persons know scott password,if I use conn scott/tiger in testdb.sql,other person can see testdb.sql and know the password. Is there a good method to avoid?
Thanks!I'm running *NIX, but works the same on Windows
bcm@bcm-laptop:~$ cat here.sh
sqlplus dbadmin/admindb << EOF
select count(*) from user_objects;
exit
EOF
bcm@bcm-laptop:~$ sh here.sh
SQL*Plus: Release 11.2.0.1.0 Production on Mon May 17 18:14:09 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
COUNT(*)
9
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
bcm@bcm-laptop:~$ Edited by: sb92075 on May 17, 2010 6:15 PM -
SQL*Plus - how to suppress the SQL in a spool file
This is my SQL*Plus script. I thought I had solved the problem, but it is back now and I don't know what I am missing. But I don't want the query at the top of the file.
SET SERVEROUTPUT ON
SET MARKUP HTML ON -SILENT
SET ECHO OFF
SET PAGESIZE 33
SET TERMOUT OFF
Spool C:\DuaneWilson.xls
SELECT *
FROM RPT_DS1_CNT_CAT_vw
WHERE ROWNUM <=100
ORDER BY CVBI_KEY;
SET MARKUP HTML OFF
SET ECHO ON
SET PAGESIZE 20
SET TERMOUT ON
SET SERVEROUTPUT OFFIt turns out when I run the script with the @ or Start with the file name, there is no SQL put out to the file. But when I just copy the text out of the file and run it at the prompt, the SQL appears in the output file. In reference to the -SILENT, I put that in after the MARKUP statement and got an error. Maybe I don't know where that goes. And I am not sure why there is a difference if it is run as a script or just pasted to the buffer. At least it should be the same in the output file, I would think.
-
Load sql statement in .bat file
Hi
I need to execute a simple sql command eg: +"truncate table tab1"+ from a DOS batch file...
my bat file contains following statement
sqlplus dilanjan/dilanjan@XE @trun.sql
my trun.sql file contains following statement
truncate tabe base
once I save the .bat file and double click it. It connects to database but the table is not getting truncated...
Some one please help me with this!What does your screen output show you.
Did you try to execute the statement in the batch file manually?
Are the files in the same directory?
Please post some screen output
Thanks
FJFranken -
Correct the PL/SQL statement to open file in MS Word?
Hi Friends,
I use this command in when button press trigger , to open the MS Word file. But it gives some compilation errors.
word.fileopen (oshook.filespec('c:\user1.rtf'));
kindly solve this problem on urgent.
Best regards,
ShahzadThis works for me on Forms v6:
out_file := "your_file_pathname"
-- Call Word to edit the new document output.
host ('c:\program files\microsoft office\office\winword.exe '||out_file); -
Batch executing SQL Statements stored in a file in SAP DB
hi,
I am using SAP DB as database in my j2ee application. As a part of the application purpose, i need to insert a large no. of records in to the database directly. I have created the SQL file which contains the insert statements for the records
Now i need to execute this file sothat the insert statement which are inside the file get executed. I am using SQL Studio to access to the Database.
I would like to know whether any options are available in SQL Studio to for executing a SQL File.
Kindly help
Best regards,
Sudheesh...Hi,
I believe that the solution to your problem lies in creating sql studio objects.Please refer to the link below.Select the link "sql dialog" on the page.
The following options are available for sql dialog.
The following options are available in the SQL dialog:
· Creating and executing SQL statements
· Setting parameters for SQL statements
· Importing and exporting SQL statements
Select the "Importing and exporting sql statements" link on this page to know more about it.This will tell you how to import sql statements from ascii files.
Basically,what you need to do is From the context menu for the SQL dialog, choose Import File or Export File.
The link I have provided,gives a lot of other information as well.
http://help.sap.com/saphelp_nw04s/helpdata/en/ee/1c5bdfeba711d4aa2800a0c9430730/frameset.htm
Hope this helps.
Regards,
Harish
(Please award points for helpful answers)
Message was edited by: HARISH SUBRAMANIAN -
Please help to tune the below query. I have provided following information
1. Query To be tuned
2. Parameter Relevant to Optimizer
3. Explain Plan and AutoTrace Ouput
4. Query traced at Level 8 and Its Tkprof Ouput
5. EXPLAIN PLAN output of DBMS_XPLAN.DISPLAY
INFORMATION 1. SQL QUERY TO BE TUNED
SELECT DISTINCT C.MAN_WIP_T_IN_TS,
C.RCP_NO,
C.WRK_CTR_ID,
C.WTR_FREE_TST_FLG,
A.COMPANY_ID,
A.PROD_ORDER,
A.PART_NO,
A.CARRIER_QTY,
B.PHY_CARID,
C.WIP_SEQ,
A.RCP_NO "CARRIER_RCP"
FROM dbadmintest.PF2_PROD_ORDER_CARRIER A,
PF2_PHYSICAL_CARRIER B,
WORK_IN_PROCESS C
WHERE C.UNIT_TYPE_CD = RTRIM('TL7')
AND C.UNIT_NM = RTRIM('T41')
AND C.WIP_TYPE_CD = 'HANDHELD'
AND C.PHY_CARRIER_SEQ = A.PHY_CARRIER_SEQ
AND A.PHY_CARRIER_SEQ = B.PHY_CARRIER_SEQ
AND ((A.CARRIER_LD_TS <= C.MAN_WIP_T_IN_TS
AND A.CARRIER_UNLD_TS >= C.MAN_WIP_T_IN_TS)
OR ( A.CARRIER_LD_TS <= C.MAN_WIP_T_IN_TS
AND A.CARRIER_UNLD_TS IS NULL))
AND ((A.CARRIER_UNLD_TS >= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')
AND A.CARRIER_UNLD_TS <= TO_DATE('2012-01-12 10:03:00', 'YYYY-MM-DD HH24:MI:SS'))
OR (A.CARRIER_LD_TS >= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')
AND A.CARRIER_LD_TS <= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS'))
OR (A.CARRIER_LD_TS <= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')
AND A.CARRIER_UNLD_TS IS NULL)
OR (A.CARRIER_LD_TS <= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')
AND A.CARRIER_UNLD_TS >= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')))
ORDER BY 6,5,1
INFORMATION 2. PARAMETER RELEVANT TO OPTIMIZER
NAME TYPE VALUE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 10.2.0.4
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
db_file_multiblock_read_count integer 16
cursor_sharing string EXACT
SQL> column sname format a20
column pname format a20
column pval2 format a20
select
sname
, pname
, pval1
, pval2
from sys.aux_stats$;SQL>
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 08-25-2009 07:27
SYSSTATS_INFO DSTOP 08-25-2009 07:27
SYSSTATS_INFO FLAGS 1
SYSSTATS_MAIN CPUSPEEDNW 1592.87183
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED
SYSSTATS_MAIN MBRC
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
INFORMATION 3. EXPLAIN PLAN AND AUTOTRACE OUTPUT
Execution Plan
Plan hash value: 850402268
| Id | Operation | Name | Rows | Bytes | Cost (%CPU) | Time |
| 0 | SELECT STATEMENT | | 11 | 1100 | 1568 (1) | 00:00:19 |
| 1 | SORT UNIQUE | | 11 | 1100 | 1567 (1) | 00:00:19 |
|* 2 | HASH JOIN | | 11 | 1100 | 1566 (1) | 00:00:19 |
|* 3 | TABLE ACCESS BY INDEX ROWID | PF2_PROD_ORDER_CARRIER | 5 | 270 | 763 (0) | 00:00:10 |
| 4 | NESTED LOOPS | | 11 | 1001 | 1562 (1) | 00:00:19 |
|* 5 | TABLE ACCESS BY INDEX ROWID | WORK_IN_PROCESS | 2 | 74 | 35 (0) | 00:00:01 |
|* 6 | INDEX RANGE SCAN | WORK_IN_PROCESS_IX2 | 56 | | 3 (0) | 00:00:01 |
|* 7 | INDEX RANGE SCAN | PF2_PROD_ORDER_CARRIER_IX3 | 2361 | | 6 (0) | 00:00:01 |
| 8 | TABLE ACCESS FULL | PF2_PHYSICAL_CARRIER | 1736 | 15624 | 4 (0) | 00:00:01 |
Predicate Information (identified by operation id):
2 - access("A"."PHY_CARRIER_SEQ"="B"."PHY_CARRIER_SEQ")
3 - filter(("A"."CARRIER_UNLD_TS" IS NULL AND "A"."CARRIER_LD_TS"<=TO_DATE(' 2012-01-12 08:03:00',
'syyyy-mm-dd hh24:mi:ss') OR "A"."CARRIER_UNLD_TS">=TO_DATE(' 2012-01-12 08:03:00', 'syyyy-mm-dd
hh24:mi:ss') AND "A"."CARRIER_LD_TS"<=TO_DATE(' 2012-01-12 08:03:00', 'syyyy-mm-dd hh24:mi:ss') OR
"A"."CARRIER_UNLD_TS">=TO_DATE(' 2012-01-12 08:03:00', 'syyyy-mm-dd hh24:mi:ss') AND
"A"."CARRIER_UNLD_TS"<=TO_DATE(' 2012-01-12 10:03:00', 'syyyy-mm-dd hh24:mi:ss') OR
"A"."CARRIER_LD_TS"=TO_DATE(' 2012-01-12 08:03:00', 'syyyy-mm-dd hh24:mi:ss')) AND
("A"."CARRIER_LD_TS"<="C"."MAN_WIP_T_IN_TS" AND "A"."CARRIER_UNLD_TS">="C"."MAN_WIP_T_IN_TS" OR
"A"."CARRIER_UNLD_TS" IS NULL AND "A"."CARRIER_LD_TS"<="C"."MAN_WIP_T_IN_TS"))
5 - filter("C"."WIP_TYPE_CD"='HANDHELD' AND "C"."PHY_CARRIER_SEQ" IS NOT NULL)
6 - access("C"."UNIT_TYPE_CD"='TL7' AND "C"."UNIT_NM"='T41')
7 - access("C"."PHY_CARRIER_SEQ"="A"."PHY_CARRIER_SEQ")
filter("A"."PHY_CARRIER_SEQ" IS NOT NULL)
Statistics
1 recursive calls
0 db block gets
13525998 consistent gets
7024 physical reads
0 redo size
1758 bytes sent via SQL*Net to client
492 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
14 rows processed
INFORMATION 4. QUERY TRACES AT LEVEL 8 AND TKPROF OUTPUT
TKPROF: Release 10.2.0.4.0 - Production on Wed Jan 18 01:48:53 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: ././ppf2_ora_5439924.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
SELECT DISTINCT C.MAN_WIP_T_IN_TS,
C.RCP_NO,
C.WRK_CTR_ID,
C.WTR_FREE_TST_FLG,
A.COMPANY_ID,
A.PROD_ORDER,
A.PART_NO,
A.CARRIER_QTY,
B.PHY_CARID,
C.WIP_SEQ,
A.RCP_NO "CARRIER_RCP"
FROM PF2_PROD_ORDER_CARRIER A,
PF2_PHYSICAL_CARRIER B,
WORK_IN_PROCESS C
WHERE C.UNIT_TYPE_CD = RTRIM('TL7')
AND C.UNIT_NM = RTRIM('T41')
AND C.WIP_TYPE_CD = 'HANDHELD'
AND C.PHY_CARRIER_SEQ = A.PHY_CARRIER_SEQ
AND A.PHY_CARRIER_SEQ = B.PHY_CARRIER_SEQ
AND ((A.CARRIER_LD_TS <= C.MAN_WIP_T_IN_TS
AND A.CARRIER_UNLD_TS >= C.MAN_WIP_T_IN_TS)
OR ( A.CARRIER_LD_TS <= C.MAN_WIP_T_IN_TS
AND A.CARRIER_UNLD_TS IS NULL))
AND ((A.CARRIER_UNLD_TS >= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')
AND A.CARRIER_UNLD_TS <= TO_DATE('2012-01-12 10:03:00', 'YYYY-MM-DD HH24:MI:SS'))
OR (A.CARRIER_LD_TS >= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')
AND A.CARRIER_LD_TS <= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS'))
OR (A.CARRIER_LD_TS <= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')
AND A.CARRIER_UNLD_TS IS NULL)
OR (A.CARRIER_LD_TS <= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')
AND A.CARRIER_UNLD_TS >= TO_DATE('2012-01-12 08:03:00', 'YYYY-MM-DD HH24:MI:SS')))
ORDER BY 6,5,1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 219.55 294.41 14030 13523455 0 14
total 4 219.55 294.41 14030 13523455 0 14
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: SYS
Rows Row Source Operation
14 SORT UNIQUE (cr=13523455 pr=14030 pw=0 time=294417731 us)
14 HASH JOIN (cr=13523455 pr=14030 pw=0 time=294416444 us)
14 TABLE ACCESS BY INDEX ROWID PF2_PROD_ORDER_CARRIER (cr=13523440 pr=14030 pw=0 time=292675360 us)
98184018 NESTED LOOPS (cr=270067 pr=9028 pw=0 time=294901120 us)
12128 TABLE ACCESS BY INDEX ROWID WORK_IN_PROCESS (cr=9842 pr=8788 pw=0 time=20479883 us)
15241 INDEX RANGE SCAN WORK_IN_PROCESS_IX2 (cr=49 pr=48 pw=0 time=54577 us)(object id 65980)
98171889 INDEX RANGE SCAN PF2_PROD_ORDER_CARRIER_IX3 (cr=260225 pr=240 pw=0 time=808956 us)(object id 65990)
1736 TABLE ACCESS FULL PF2_PHYSICAL_CARRIER (cr=15 pr=0 pw=0 time=83 us)
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
SQL*Net message from client 3 0.00 0.00
db file sequential read 14030 0.47 43.56
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
Parsing user id: SYS
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
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 0 0
Fetch 2 219.55 294.41 14030 13523455 0 14
total 6 219.55 294.41 14030 13523455 0 14
Misses in library cache during parse: 0
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
SQL*Net message from client 3 0.00 0.00
db file sequential read 14030 0.47 43.56
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 0 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 0 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
2 user SQL statements in session.
0 internal SQL statements in session.
2 SQL statements in session.
Trace file: ././ppf2_ora_5439924.trc
Trace file compatibility: 10.01.00
Sort options: default
1 session in tracefile.
2 user SQL statements in trace file.
0 internal SQL statements in trace file.
2 SQL statements in trace file.
2 unique SQL statements in trace file.
14137 lines in trace file.
294 elapsed seconds in trace file.
INFORMATION 5. EXPLAIN PLAN OUTPUT OF DBMS_XPLAN.DISPLAY
SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
SQL_ID 1z1cccq5kxt11, child number 0
SELECT /*+ gather_plan_statistics */ DISTINCT C.MAN_WIP_T_IN_TS, C.RCP_NO, C.WRK_CTR_ID, C.WTR_FREE_TST_FLG,
A.COMPANY_ID, A.PROD_ORDER, A.PART_NO, A.CARRIER_QTY, B.PHY_CARID, C.WIP_SEQ, A.RCP_NO "CARRIER_RCP"
FROM PF2_PROD_ORDER_CARRIER A, PF2_PHYSICAL_CARRIER B, WORK_IN_PROCESS C
WHERE C.UNIT_TYPE_CD = RTRIM('TL7') AND C.UNIT_NM = RTRIM('T41') AND C.WIP_TYPE_CD ='HANDHELD'
AND C.PHY_CARRIER_SEQ = A.PHY_CARRIER_SEQ AND A.PHY_CARRIER_SEQ = B.PHY_CARRIER_SEQ
AND ((A.CARRIER_LD_TS <=C.MAN_WIP_T_IN_TS AND A.CARRIER_UNLD_TS >= C.MAN_WIP_T_IN_TS) OR
( A.CARRIER_LD_TS <= C.MAN_WIP_T_IN_TS AND A.CARRIER_UNLD_TS IS NULL)) AND ((A.CARRIER_UNLD_TS >= TO_DATE('2012-01-12
08:03:00', 'YYYY-MM-DD HH24:MI:SS') AND A.CARRIER_UNLD_TS<= TO
Plan hash value: 850402268
| Id | Operation | Name | Starts |E-Rows | A-Rows |A-Time | Buffers | Reads |OMem |1Mem | Used-Mem |
| 1 | SORT UNIQUE | | 1 | 11 | 14 |00:05:41.48 | 13M | 6571 | 2048 | 2048 | 2048 (0) |
|* 2 | HASH JOIN | | 1 | 11 | 14 |00:05:41.48 | 13M | 6571 | 807K | 807K | 614K (0) |
|* 3 | TABLE ACCESS BY INDEX ROWID | PF2_PROD_ORDER_CARRIER | 1 | 5 | 14 |00:05:39.89 | 13M | 6571 | | | |
| 4 | NESTED LOOPS | | 1 | 11 | 98M |00:04:55.08 | 270K | 6569 | | | |
|* 5 | TABLE ACCESS BY INDEX ROWID | WORK_IN_PROCESS | 1 | 2 | 12130 |00:00:13.15 | 9845 | 6569 | | | |
|* 6 | INDEX RANGE SCAN | WORK_IN_PROCESS_IX2 | 1 | 56 | 15244 |00:00:00.06 | 49 | 45 | | | |
|* 7 | INDEX RANGE SCAN | PF2_PROD_ORDER_CARRIER_IX3 | 12130 | 2361 | 98M |00:00:00.92 | 260K | 0 | | | |
| 8 | TABLE ACCESS FULL | PF2_PHYSICAL_CARRIER | 1 | 1736 | 1736 |00:00:00.01 | 15 | 0 | | | |
Predicate Information (identified by operation id):
2 - access("A"."PHY_CARRIER_SEQ"="B"."PHY_CARRIER_SEQ")
3 - filter(((("A"."CARRIER_UNLD_TS" IS NULL AND "A"."CARRIER_LD_TS"<=TO_DATE(' 2012-01-12 08:03:00', 'syyyy-mm-dd hh24:mi:ss')) OR
("A"."CARRIER_UNLD_TS">=TO_DATE(' 2012-01-12 08:03:00', 'syyyy-mm-dd hh24:mi:ss') AND "A"."CARRIER_LD_TS"<=TO_DATE(' 2012-01-12 08:03:00',
'syyyy-mm-dd hh24:mi:ss')) OR ("A"."CARRIER_UNLD_TS">=TO_DATE(' 2012-01-12 08:03:00', 'syyyy-mm-dd hh24:mi:ss') AND
"A"."CARRIER_UNLD_TS"<=TO_DATE(' 2012-01-12 10:03:00', 'syyyy-mm-dd hh24:mi:ss')) OR "A"."CARRIER_LD_TS"=TO_DATE(' 2012-01-12 08:03:00',
'syyyy-mm-dd hh24:mi:ss')) AND (("A"."CARRIER_LD_TS"<="C"."MAN_WIP_T_IN_TS" AND "A"."CARRIER_UNLD_TS">="C"."MAN_WIP_T_IN_TS") OR
("A"."CARRIER_UNLD_TS" IS NULL AND "A"."CARRIER_LD_TS"<="C"."MAN_WIP_T_IN_TS"))))
5 - filter(("C"."WIP_TYPE_CD"='HANDHELD' AND "C"."PHY_CARRIER_SEQ" IS NOT NULL))
6 - access("C"."UNIT_TYPE_CD"='TL7' AND "C"."UNIT_NM"='T41')
7 - access("C"."PHY_CARRIER_SEQ"="A"."PHY_CARRIER_SEQ")
filter("A"."PHY_CARRIER_SEQ" IS NOT NULL)
41 rows selected.
Regards
RahulRahul, post your question on the SQL and PL/SQL forum PL/SQL. This forum is for Oracle Berkeley DB not Oracle Database.
Thanks,
Andrei
Maybe you are looking for
-
Gurus, I have copied a plant & created.When i try to raise a PO,the system is asking to enter the plant.When i press F4 the plant is not listed?.What might be the issue?
-
Thunderbolt port not working in new Windows 8.1 32 bit install
I have a new HP Zbook 15 G2 that came with 64 bit operating systems for both Windows 8 and 7. I chose to install the windows 7 version, and the thunderbolt port is recognized properly and works fine. Howver due to the need for video capture in a 32 b
-
Firefox does not load web pages but gives no error message
Hi guys, I have been having this problem occasionaly for the past few weeks and can't remember making any changes to my computer or firefox that would have prompted it. Basically what happens is that when I try to load a web page, it says "loading...
-
Calling a function from a custom component
I got source files from another company that did a flex project for us before I started working here. They have custom compenents (mxml files) that they are currently calling public functions in, but when I add a new public function to the mxml comp
-
My Windows part of the drive got all of the files deleted and got renamed
My Windows part of the drive got all of the files deleted and got renamed to Time Machine Backups. This all happened when i woke up and i tried to do to the windows part of the drive and it was not there. So I went to the mac part and i saw it was re