Why tkprof did not show explain plan for some sql statements
Hi,
I did a trace for one of the session, hoping to find the explain plan for its tkprof. However, I only get this:
INSERT INTO AUDIT_TABLE
VALUES
( :B1 , :B2 , :B3 , :B4 , :B5 , :B6 , :B8 , :B7 )
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3698 8.08 59.41 3348 566 19092 3698
Fetch 0 0.00 0.00 0 0 0 0
total 3699 8.08 59.42 3348 566 19092 3698
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: 30 (recursive depth: 2)
********************************************************************************Any idea why the explain plan is missing?
Also looking at the above statistics, what can I conclude?
Thanks John. What's ur take on this statistics then?
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1798 12.23 36.75 1758 5404 7418 1798
Fetch 0 0.00 0.00 0 0 0 0
total 1798 12.23 36.75 1758 5404 7418 1798
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: 30 (recursive depth: 1)
********************************************************************************
Similar Messages
-
Explain plan for a sql statement
Hi,
I have a simple sql statement which has a cost of 122, cardinality 59 and CPU cost 1966777.
Same sql statement written in another way (using a nested select in the 'from' clause), has a cost of 58, cardinality 24 but cpu cost is much higher 29078895.
What should I look for? For a better cost overall, or for a better cpu cost? Which statement should I consider? What is most important?
Thanks.Roger25 wrote:
... Based on this, my question is what statement to choose? which is more important, the cost or the cpu cost?
Thanks.
Based on this, sorry, but my reply will remain unchanged:
Again, you cannot compare explain plan of two different queries.
Find out more:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:313416745628
Nicolas. -
Hi
I have done an explain for one of my sql and i got the result as follows
SELECT STATEMENT Cost = 502
SORT AGGREGATE
HASH JOIN
NESTED LOOPS
HASH JOIN
TABLE ACCESS FULL CMC_NWPE_RELATION
HASH JOIN
TABLE ACCESS FULL CMC_NWST_NET_SET
NESTED LOOPS
TABLE ACCESS FULL CMC_NWPR_RELATION
INDEX UNIQUE SCAN SYS_C006513
INDEX UNIQUE SCAN SYS_C006316
TABLE ACCESS FULL CMC_MEPR_PRIM_PROV
I need to know whether i have gone wrong with any of the joins in the sql. For the matter of fact I need to interpret the result of the explain plan for my sql.
Thanks in advance
Chandra SekharHi
First of all u haven't send the complete explanation in the plan table. As far i got from your result ur accesing the ful table scan CMC_NWPE_RELATION ,CMC_NWST_NET_SET , CMC_NWPR_RELATION & one more.
check in your auery why these table are accesing full when the data in this table will volumonuous ur system this query will become very slow as it will have to acces nosof rowsin table 1*nosof rowsin table 2*nosof rowsin table 3*nosof rowsin table 4 so u create the index in those tables and index should be made on the columns which r used in ur where clause of the query
Amit -
I created an HTML5 appcache app as follow:
<!DOCTYPE html>
<html manifest="url.manifest">
<head>
</head>
<body>
</body>
Upon onload() event, I made several AJAX calls (POST) to the servers to load the data for the first time and they all done via HTTPS. I've inspected the servers' access log and I did not see the request for url.manifest and the loading of the appcache fails with an error (no details provided).
Chrome is working fine with current setup and here is the content of my manifest:
CACHE MANIFEST
CACHE:
/images/flower.gifThis forum answers many webdev questions, but I think yours calls for a higher level of expertise. You may want to try the [http://forums.mozillazine.org/viewforum.php?f=25 mozillaZine Web Development board]. It is an unofficial forum with separate registration.
-
Explain plans for PL/SQL code?
Hi!
I am pulling SQL statements (select, insert, update, delete, etc.) from PL/SQL code and producing explain plans. Some of the delete statements have "WHERE CURRENT OF" in them which produces an ORA-3001 error (feature not implemented) error. How can I do an explain plan of these statements? Can I replace "WHERE CURRENT OF" with "=" to get a plan? How far off will the plan be? Any suggestions, ideas, etc. greatfully appreciated!
This is Oracle 9.2.0.4/5 on AIX if it makes a difference.
Thanks!
Dave VenusWHERE CURRENT OF shouldn't be a problem. Here above an example on 9.2.0.4 on AIX5.2 :
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
SQL> create table TBL_USER_PROFILE_CATEGORY
2 as
3 select 654 id_category, 1103 id_user from dual union all
4 select 654 id_category, 1104 id_user from dual union all
5 select 18 id_category, 1103 id_user from dual union all
6 select 629 id_category, 1103 id_user from dual union all
7 select 110 id_category, 1103 id_user from dual union all
8 select 110 id_category, 1104 id_user from dual union all
9 select 18 id_category, 1104 id_user from dual union all
10 select 37 id_category, 1103 id_user from dual union all
11 select 24 id_category, 1103 id_user from dual union all
12 select 7 id_category, 104 id_user from dual union all
13 select 37 id_category, 1104 id_user from dual union all
14 select 22 id_category, 1103 id_user from dual union all
15 select 22 id_category, 1104 id_user from dual union all
16 select 25 id_category, 1104 id_user from dual union all
17 select 25 id_category, 1103 id_user from dual ;
Table created.
SQL>
SQL> alter table TBL_USER_PROFILE_CATEGORY add primary key (id_category, id_use
Table altered.
SQL>
SQL> CREATE OR REPLACE
2 PROCEDURE P$UPDATE_TBL_USER_PROFILE_CAT(p_id_cat_old IN NUMBER) AS
3 p_id_category number;
4 p_id_user number;
5 cursor mycur is select id_category, id_user
6 from TBL_USER_PROFILE_CATEGORY
7 where id_category = p_id_cat_old
8 for update of id_category;
9 BEGIN
10 open mycur;
11 LOOP
12 FETCH mycur INTO p_id_category, p_id_user;
13 EXIT WHEN mycur%NOTFOUND;
14 BEGIN
15 DELETE FROM TBL_USER_PROFILE_CATEGORY
16 WHERE CURRENT OF mycur;
17 END;
18 END LOOP;
19 CLOSE mycur;
20 COMMIT;
21 EXCEPTION WHEN OTHERS THEN rollback;
22 END;
23 /
Procedure created.
SQL>
SQL> exec P$UPDATE_TBL_USER_PROFILE_CAT(654)
PL/SQL procedure successfully completed.
SQL> select * from TBL_USER_PROFILE_CATEGORY;
ID_CATEGORY ID_USER
18 1103
629 1103
110 1103
110 1104
18 1104
37 1103
24 1103
7 104
37 1104
22 1103
22 1104
25 1104
25 1103
13 rows selected.
SQL> Please, paste here what's your code...
Nicolas. -
Hi ,
Our db version is Oracle 8i and looking for solution.
I have multiple select sql statments and need to get the explain plan for all statments.
Is it possible to take explain plan for all statments one time? If so please provide the steps.
Thanks.
Happy Halloween.Not sure exactly you are looking. But if you do
set autotrace on
from sqlplus and put all the query in a script, you should get all explain plan in one shot. You can spool the output to a file. -
IPhone does not show album artwork for some songs!
My iPhone recently stopped showing album artwork for newly added music....
I tried to add the album artwork thousand time but no use...
Restore didnt help as well...
Any solutions?no, it shows only for some, the old ones...not the newly imported ones
I select all the songs from the album, I drag the picture -from folder or safari- then i drop it in the artwork box...
sometimes shows for the first song only, but always shows for the album little preview, and never for the rest of the songs... -
Book POV not showing all deminsions for some users
I have a book that is suppose to display Scenario, Year, Period & Currency when it is run. However, one user who runs this book only sees Scenario, Year & Period. Her user group is the same as many others within our company who do not have this problem. Does anyone know why this is happening?
The user only belongs to one group and other users within the group get the full POV selections. Also, we don't have any nested security groups.
This issue has also presented itself in showing the incorrect POV to some users. I've discovered that this is related to the User's POV in User Preferences though I do not know how to fix it.
If you go into File>Preferences and select Financial Reporting on the left you should see a button that says "Setup Members". Once inside, Person A sees Scenario, Year, Period, View, Entity, Value, Account, ICP, C1, C2, C3, C4, this is correct. However, Person B sees Scenario, Year, Period, View, Entity, Value, Account, ICP, C4, C1, C2, C3. When this occurs, and these two run the same book, Person A would see the Proper selections for POV. However, person B would see the incorrect custom dimensions. For example, If C1 should be displayed Person B would see C4, If C2 should be displayed Person B would see C1, etc...
Correct Incorrect
C1 = C4
C2 = C1
C3 = C2
C4 = C3 -
Team,
some of my users are experiencing the issue that our russian friend had:
https://supportforums.cisco.com/discussion/12304681/vsom-751-does-not-started-ie11
However we are running the english interface and had no issues for a while (not sure for how long as the users infrequently use the system)
When navigating to the login screen there are no fields for the user to enter their credentials in internet explorer. Tried IE 8 - IE 11. Played with compatibility mode and safe sites etc... without success.
Firefox works without issues and so does chrome for the login.
Anyone run into this issue in the past couple of weeks?Yeah it is working now, it may have been a reboot Thanks!
-
Finder not showing icon thumbnail for some excel documents
I have two MS Excel documents that are, except for the data contained within, virtually identical. One was created as an offshoot of the other.
In the Finder, the original displays a thumbnail for the icon, but the offshoot copy displays the standard Excel icon with the (XLSX) "button" in the lower left corner.
I've tried doing a "Save As" and giving the file a different name. That didn't work.
I've checked Get Info on both, and the only anomaly I see is that the offshoot is a larger file, despite containing fewer tabs and less data. (Curiouser and curiouser.)
Would appreciate any ideas, as I'm stumped.
(Off-topic: Strange, isn't it, that the form on discussions.apple.com for submitting questions doesn't allow Safari to do it's on as-you-type spellcheck? Instead you have to click a spellcheck button on the form itself! ***, Apple?)Hi Nick,
Try deleting the Finder .plist file.
Go to ~/Library/Preferences. Move the com.apple.finder.plist file to the Trash. Restart your Mac.
~ (Tilde) represents your home folder
Carolyn -
Sharepoint Designer Workflow - Edit this task button not showing in outlook for some users.
Hello all,
I have created a "collect data from user" workflow in Sharepoint Designer, with around 9 "else" instances as to who to collect data from. My problem is that some users do not have the "Edit this task" button at the top of the email (Nor do they have the
"create rule.." button). They DO have the enabled hyperlink in the body of the email, which brings them to a screen where they can view the details of the task, then edit it by clicking on "Edit".
My users who have the button at the top of the email are having a much more simplified experience, and I would like all users to have it. All permissions are equivalent across the board as best I can tell. Is this an Outlook settings issue perhaps?
Any input is much appreciated!
Thanks!Hi Fender,
Please can you confirm which version of Outlook your users have (and if they are all on the same version)? All my none 2007 users lack the Edit Item button, and have to use the links in the body of the email, which I believe is simply due to the fact that
2003 et al lacks the same SharePoint integration options as 2007.
Cheers
Stew -
Issue with showing input forms for update SQL statement
Hi guys - I'm currently doing a college project and I'm not overly experienced in the area of Java/JSP but I'm having an issue with a project. I have a JSP project inserting, viewing and deleting rows from a database but having an issue getting the update/modify function working in my project.
If I hardcode values into my variables and launch the project it updates fine, but I believe theres an issue with how I'm calling the existing rows. I wish for the user to be able to view the rows from the database and modify as they wish. Once they submit the modifications, I want the row to be updated. Can anyone see where the problem might exist in my code below? I hope it's something small, but I'm not able to fix it at the moment and would apreciate anyone's help! :)
The problem I'm facing at the moment is the input boxes for displaying the current rows from the database are not even showing up..
ModifyNode.jsp:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="suaspackage.NodeManager" %>
<jsp:useBean id="AddNode" scope="session" class="suaspackage.NodeManager"/>
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Suas</title>
</head>
<body
<%! // Class level declarations
Connection dbCon; // interface type in java SQL
ResultSet rs; // interface type in java SQL
String serverName = "localhost";
String nodeID;
String valowneremail;
String valownersms;
boolean bFirstTime;
%>
<%
bFirstTime = true;
if(request !=null){
if(request.getParameter("submit") != null){
nodeID = "6";
valowneremail = request.getParameter("OwnerEmail");
valownersms = request.getParameter("OwnerSms");
bFirstTime = false;
AddNode.update(nodeID, valowneremail, valownersms);
%>
%>
<%
try{
Class.forName("com.mysql.jdbc.Driver"); // SQLServer specifics 1
dbCon = DriverManager.getConnection( // SQLServer specifics 2
"jdbc:mysql://" + serverName + ":3306" + "/suasdb", "root", "9631");
Statement stmt;
String sqlString = "select nodeid, node, owneremail, ownersms from nodemanager";
stmt = dbCon.createStatement();
rs = stmt.executeQuery(sqlString);
} catch (ClassNotFoundException e){
out.write("<B><CENTER><P>");
out.write("Error loading class for Suas database connection: </P><P>");
out.write(e.toString());
out.write("</B></CENTER></P>");
} catch (SQLException e){
out.write("<B><CENTER><P>");
out.write("Error accessing Suas database connection: </P><P>");
out.write("</B></CENTER></P>");
if(rs!=null){
%>
<jsp:include page="includeheader.jsp" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/pagemarker_nodemanager.jpg" alt="Node manager" width="176" height="55"></td>
</tr>
</table>
<jsp:include page="includenodemenu.jsp" />
<TABLE WIDTH="75% BORDER="0" CELLPADDING="5" ALIGN="CENTER">
<TR BGCOLOR="#9ddc4f"> </TR>
<br>
<TR BGCOLOR="#9ddc4f">
<TH>Node ID</TH>
<TH>Node</TH>
<TH>Owner E-Mail Address</TH>
<TH>Owner SMS Number</TH>
<TH></TH>
</TR>
<% } else {
%>
<% while (rs.next()){
%>
<FORM>
<TR BGCOLOR="#d7eabf">
<TD><%=rs.getString("nodeid")%></TD>
<TD><%=rs.getString("node")%></TD>
<TD><INPUT size="20" type="text" name="OwnerEmail" value="<%=rs.getString("owneremail")%>"</TD>
<TD><INPUT size="20" type="text" name="OwnerSms" value="<%=rs.getString("ownersms")%>"</TD>
<TD><INPUT type="submit" name="submit" value="Save"></TD>
</TR>
<% }
%>
</body>
</html>
{code}
The relevant part of my NodeManger package:
{code}
public void update(String updateNodeId, String valEmail, String valSMS) throws ClassNotFoundException, SQLException{
try{
String updateSQL;
String nodeid = updateNodeId;
String updateowneremail = valEmail;
String updateownersms = valSMS;
Connection dbCon;
Statement stmt;
ResultSet rs;
String serverName = "localhost";
Class.forName("com.mysql.jdbc.Driver"); // SQLServer specifics 1
dbCon = DriverManager.getConnection( // SQLServer specifics 2
"jdbc:mysql://" + serverName + ":3306" + "/suasdb", "root", "9631");
updateSQL = "update nodemanager SET owneremail='" + updateowneremail + "', ownersms='" + updateownersms + "' WHERE nodeid='" + nodeid + "'";
stmt = dbCon.createStatement();
stmt.execute(updateSQL);
} catch (ClassNotFoundException e){
throw(e);
} catch (SQLException e){
throw(e);
}{code}
Edited by: daveomcgee on Apr 9, 2009 8:03 AMI support what ThomYork suggests. Learn how to properly separate database/business logic from your view logic. Learn how to use servlets and JSPs together. Read abourt DAO classes. Learn how to build a view in JSPs using taglibs (JSTL to begin with).
You might think it is too much work, but if you learn this stuff the wrong way now, it is going to be that much harder converting to the clean, readable, reusable and maintainable way later on. -
Explain plan for query with variables
Trying to Explain plan for some sql in sql*plus. The query has a variable in it. How do I do this ?
I did look into explain plan and dbms_xplan but could not find anything with variablesuse sqlplus bind variables:
SQL> --define variable
SQL> var x varchar2
SQL> -- notice the colon prefixing the variable
SQL> explain plan for select * from customer where cid = :x;
Explained.
SQL> select * from table( dbms_xplan.display );
PLAN_TABLE_OUTPUT
Plan hash value: 1709312366
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 67 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| CUSTOMER | 1 | 67 | 2 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | CID | 1 | | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("CID"=:X)
14 rows selected.the variable does not need to be set to explain the query, since explain does not actually execute.
Edited by: shoblock on Nov 6, 2008 4:51 PM -
Why the content of the Explain Plan not show out?
Why the content of the Explain Plan not show out?
I am using Oracle 11g.
I already ran the utlxplan.sql sctipt and I also set serveroutput on.
SQL> set autotrace on
SQL> EXPLAIN PLAN FOR SELECT*FROM DEMO_TABLE WHERE OWNER='HR';
Explained.
Elapsed: 00:00:00.67When you say:
My release 10.2 database display the Explain Plan automatically.
How to make 11.1.0.6 Oracle database to display the Explain Plan automatically.What do you mean? Specifically, what commands are you executing in the 10.2 database, that displays the execution plan "automatically"?
Are you saying that if you execute the same command in 11.1.0.6, you don't get a similar result? What happens? Do you get an error?
For both the 10.2 case and the 11.1.0.6 case, post the full output of the commands you're executing, and the result you are seeing.
Then, maybe someone can help you.
When you post the output, please encapsulate it in a pair "code" tags, which is the word "code" without the quotes, surrounded by a pair of curly braces {}.
When you do this correctly, the output looks like:
This is output from my execution plan run.and is much easier to read.
Don't be afraid to use the preview tab to see if your message will be posted with the correct formatting.
-Mark -
Most of the songs on my iPod Classic no longer show up on iTunes on my laptop. I deleted iTunes & installed the latest version but this did not change anything. For example on 1 playlist I have 66 songs but only 1 shows on the iTunes screen. Thanks you for any help.
See Empty/corrupt iTunes library after upgrade/crash or
Recover your iTunes library from your iPod or iOS device.
tt2
Maybe you are looking for
-
What needs to be changed if we change hostname in linux
Dear all, I have a question and will appreciate for appropriate answer(s). My machine name was lxcms120.cern.ch and Oracle 10g DB was running fine on it (listener, DB, Enterprise Manager). It is not a production system rather a test system. Now, i ch
-
SAPSCRIPT how to place item header on next page
Hi Guys The situation iam facing is this outside the loop i have printed the item header then iam looping on an internal table which is printing all the items. When the o/p is one page this works fine but when the o/p is more than one page the item h
-
Latency compensation doesn't work on I/O plugin?
So, I thought this was supposed to work... I tried to set up some parallel compression by sending my drum bus to another Aux which had the I/O plug inserted. The I/O plug sent the drum signals to my hardware compressor (and back). But the problem is,
-
Cannot download .rdl files in SSRS Report Manager 2012.
I am unable to download .rdl reports in report manager 2012. I am able to create reports using report builder and I am able to run /view reports that I create. However , the drop down box does not work work when I attempt to access drop down menu tha
-
Hi Experts, I was trying to find any documentation explaining how return traffic works for wifi client data traffic in a capwap AP WLC architecture where the APs are in local mode (no HREAP) but was unable to find any detailed references for this. I