How i can obtain explain plan without run the query
Hello,
i need to know the result of explain of a query without run the query, it's this possible?
Thanks and best regards.
explain plan for <your query>;
select * from table(dbms_xplan.display);Regards,
Rob.
Similar Messages
-
How to see an explain plan?
Hi all,
I'm looking to tune one sql sentence of my application. To do it, I've used the sqltune package. When I see the report, I obtain the actual explain plan and, finally the suggestion to use an SQL Profile.
How can I see the new explain plan of this option before apply it?
I attach the report result for your information:
SELECT DBMS_SQLTUNE.report_tuning_task('analisis_matriculation_view') AS recommendations FROM dual;SQL> SQL> SQL>
RECOMMENDATIONS
GENERAL INFORMATION SECTION
Tuning Task Name : analisis_matriculation_view
Tuning Task Owner : A9
Scope : COMPREHENSIVE
Time Limit(seconds) : 3600
Completion Status : COMPLETED
Started at : 08/11/2010 09:33:18
Completed at : 08/11/2010 10:23:16
Number of SQL Profile Findings : 1
Schema Name: A9
SQL ID : gd8b5pwyj0yu8
SQL Text : SELECT PO.ID POID, BO.ID BOID, MAT.AGENT_ID AGENTID,
MAT.AGENCY_ID AGENCYID, MAT.ID MATID,MAT.PARTNERBRANCH_ID
PBRANCHID, MAT.DOSSIERNUMBER, MAT.DOSSIERVERSION,
MAT.FILINGDATE,MAT.TELEMATIC, MAT.MANUALDGTTAXCODE,
MAT.ASSIGNDGTTAX, MAT.STATUS, MAT.PLATENUMBER,MAT.REJECTIONCAUSE,
MAT.REJECTIONNOTES, MAT.COLOR, MAT.CREATEDON, MAT.MODIFIEDON,
FO.COLOR,AG.MEMBERID, US.NAME AGENTNAME, US.SURNAME
AGENTSURNAME, US.SURNAME2 AGENTSURNAME2, US.NIF AGENTNIF,AY.NAME
AGENCYNAME, VD.SERIALNUMBER, VOWN.NAME OWNERNAME, VOWN.SURNAME
OWNERSURNAME,VOWN.SURNAME2 OWNERSURNAME2, UPPER(VOWN.NAME) || '
' || UPPER(VOWN.SURNAME) || ' ' || UPPER(VOWN.SURNAME2)
OWNERFULLNAME,VOWN.FISCALID OWNERNIF, FO.ID FOLDERID, FO.NAME
FOLDERNAME, FO.STATUS FOLDERSTATUS, IVTM.ID IVTMID,IVTM.STATUS
IVTMSTATUS, IVTM.FINALAMOUNT IVTMAMOUNT, IVTM.IVTMCOLLECTOR,
F576.ID F576ID,F576.PAYMENTCOMPLETEREFNUMBER NRC576,
F576.MATRICULATIONCODE CEM576, F576.AEATELECTRONICCODEMANUAL
CEM576MANUAL,F576.NRCMANUAL NRC576MANUAL, F06.ID F06ID,
F06.MATRICULATIONCODE CEM06, F06.AEATELECTRONICCODEMANUAL
CEM06MANUAL,F06.NRE NRE06, F06.NREMANUAL NRE06MANUAL, F05.ID
F05ID, F05.MATRICULATIONCODE CEM05, F05.AEATELECTRONICCODEMANUAL
CEM05MANUAL FROM A9_MATRICULATION MAT INNER JOIN A9_AGENT AG ON
(MAT.AGENT_ID = AG.ID) INNER JOIN A9_USER US ON (AG.ID = US.ID)
INNER JOIN A9_BRANCHOFFICE BO ON (AG.BRANCHOFFICE_ID = BO.ID)
INNER JOIN A9_PROFESSIONALORDER PO ON (BO.PROFESSIONALORDER_ID =
PO.ID) INNER JOIN A9_AGENCY AY ON (MAT.AGENCY_ID = AY.ID) INNER
JOIN A9_VEHICLEDATA VD ON (MAT.VEHICLEDATA_ID = VD.ID) INNER
JOIN A9_VEHICLEOWNER VOWN ON (VOWN.MATRICULATION_ID = MAT.ID)
LEFT JOIN A9_MATRICULATIONFOLDER FO ON
(MAT.MATRICULATIONFOLDER_ID = FO.ID) LEFT JOIN A9_IVTM IVTM ON
(MAT.IVTM_ID = IVTM.ID)LEFT JOIN A9_FORM576 F576 ON
(MAT.FORM576_ID = F576.ID) LEFT JOIN A9_FORM05 F05 ON
(MAT.FORM05_ID = F05.ID) LEFT JOIN A9_FORM06 F06 ON
(MAT.FORM06_ID = F06.ID) WHERE VOWN.MAINOWNER = 1 AND MAT.VALID
= 1 AND US.DELETEDON IS NULL AND PO.DELETEDON IS NULL AND
BO.DELETEDON IS NULL AND AY.DELETEDON IS NULL AND VOWN.DELETEDON
IS NULL AND FO.DELETEDON IS NULL AND IVTM.DELETEDON IS NULL AND
VD.DELETEDON IS NULL AND F576.DELETEDON IS NULL AND
F05.DELETEDON IS NULL AND F06.DELETEDON IS NULL AND
MAT.DELETEDON IS NULL ORDER BY DOSSIERNUMBER DESC
FINDINGS SECTION (1 finding)
1- SQL Profile Finding (see explain plans section below)
Se ha encontrado un plan de ejecucion potencialmente mejor para esta
sentencia.
Recommendation (estimated benefit: 35,82%)
- Puede aceptar el perfil SQL recomendado.
execute dbms_sqltune.accept_sql_profile(task_name =>
'analisis_matriculation_view', replace => TRUE);
EXPLAIN PLANS SECTION
1- Original With Adjusted Cost
Plan hash value: 1271206505
Id Operation Name Rows Bytes TempSpc Cost (%CPU) Time
0 SELECT STATEMENT 4728K 2015M 783K (1) 02:36:41
1 SORT ORDER BY 4728K 2015M 4346M 783K (1) 02:36:41
* 2 HASH JOIN 4728K 2015M 1857M 333K (1) 01:06:48
* 3 HASH JOIN 4728K 1803M 1736M 231K (1) 00:46:14
* 4 HASH JOIN 4728K 1682M 133K (1) 00:26:42
* 5 TABLE ACCESS FULL A9_AGENCY 1076 34432 8 (0) 00:00:01
* 6 FILTER
* 7 HASH JOIN OUTER 5029K 1635M 1568M 133K (1) 00:26:42
* 8 FILTER
* 9 HASH JOIN OUTER 5029K 1510M 235M 45724 (2) 00:09:09
* 10 FILTER
* 11 HASH JOIN RIGHT OUTER 846K 226M 7792K 23780 (2) 00:04:46
12 TABLE ACCESS FULL A9_MATRICULATIONFOLDER 185K 5613K 731 (2) 00:00:09
* 13 FILTER
* 14 HASH JOIN RIGHT OUTER 846K 201M 6784K 12190 (2) 00:02:27
15 TABLE ACCESS FULL A9_FORM06 192K 4517K 1340 (3) 00:00:17
* 16 FILTER
* 17 HASH JOIN RIGHT OUTER 65680 14M 2784K 9769 (2) 00:01:58
18 TABLE ACCESS FULL A9_FORM05 91913 1705K 592 (2) 00:00:08
* 19 HASH JOIN 65680 12M 8360 (2) 00:01:41
* 20 HASH JOIN 560 37520 25 (8) 00:00:01
* 21 HASH JOIN 560 14560 10 (10) 00:00:01
* 22 HASH JOIN 8 112 7 (15) 00:00:01
* 23 TABLE ACCESS FULL A9_PROFESSIONALORDER 6 30 3 (0) 00:00:01
* 24 TABLE ACCESS FULL A9_BRANCHOFFICE 16 144 3 (0) 00:00:01
25 TABLE ACCESS FULL A9_AGENT 1053 12636 3 (0) 00:00:01
* 26 TABLE ACCESS FULL A9_USER 2245 92045 14 (0) 00:00:01
* 27 TABLE ACCESS FULL A9_MATRICULATION 123K 16M 8333 (2) 00:01:41
28 TABLE ACCESS FULL A9_FORM576 899K 30M 8158 (2) 00:01:38
29 TABLE ACCESS FULL A9_IVTM 1207K 29M 7562 (3) 00:01:31
* 30 TABLE ACCESS FULL A9_VEHICLEDATA 979K 25M 9552 (1) 00:01:55
* 31 TABLE ACCESS FULL A9_VEHICLEOWNER 983K 44M 7771 (2) 00:01:34
Predicate Information (identified by operation id):
2 - access("VOWN"."MATRICULATION_ID"="MAT"."ID")
3 - access("MAT"."VEHICLEDATA_ID"="VD"."ID")
4 - access("MAT"."AGENCY_ID"="AY"."ID")
5 - filter("AY"."DELETEDON" IS NULL)
6 - filter("IVTM"."DELETEDON" IS NULL)
7 - access("MAT"."IVTM_ID"="IVTM"."ID"(+))
8 - filter("F576"."DELETEDON" IS NULL)
9 - access("MAT"."FORM576_ID"="F576"."ID"(+))
10 - filter("FO"."DELETEDON" IS NULL)
11 - access("MAT"."MATRICULATIONFOLDER_ID"="FO"."ID"(+))
13 - filter("F06"."DELETEDON" IS NULL)
14 - access("MAT"."FORM06_ID"="F06"."ID"(+))
16 - filter("F05"."DELETEDON" IS NULL)
17 - access("MAT"."FORM05_ID"="F05"."ID"(+))
19 - access("MAT"."AGENT_ID"="AG"."ID")
20 - access("AG"."ID"="US"."ID")
21 - access("AG"."BRANCHOFFICE_ID"="BO"."ID")
22 - access("BO"."PROFESSIONALORDER_ID"="PO"."ID")
23 - filter("PO"."DELETEDON" IS NULL)
24 - filter("BO"."DELETEDON" IS NULL)
26 - filter("US"."DELETEDON" IS NULL)
27 - filter("MAT"."VALID"=1 AND "MAT"."DELETEDON" IS NULL)
30 - filter("VD"."DELETEDON" IS NULL)
31 - filter("VOWN"."DELETEDON" IS NULL AND "VOWN"."MAINOWNER"=1)
2- Using SQL Profile
Plan hash value: 1408211821
Best regards,
dbajug
Edited by: dbajug on Aug 11, 2010 6:31 AMHi all,
the aswer is on this post:
Re: Explain plan
Regards,
dbajug -
Explain plan for running query
Hi everyone,
I come to know how to generate explain plan for a given query by giving
Explain plan for select * fro emp;
Consider a query running for 5 hrs in a session and i want to genrate explain plan for that current query in its 4th hour i dont know the sql as well
all the steps by step would be much apppreciated
like finding Current SQL then so on
Thanks
Shareef912856 wrote:
Hi everyone,
I come to know how to generate explain plan for a given query by giving
Explain plan for select * fro emp;
Consider a query running for 5 hrs in a session and i want to genrate explain plan for that current query in its 4th hour i dont know the sql as well
all the steps by step would be much apppreciated
like finding Current SQL then so on
Thanks
ShareefYOu can also use dbms_xplain to generate plan used in v$sql. like for example
SQL>SELECT SQL_ID, CHILD_NUMBER FROM V$SQL WHERE SQL_TEXT LIKE 'select * from em%';
SQL_ID CHILD_NUMBER
6kd5fkqdjb8fu 0
SQL>SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('6kd5fkqdjb8fu',0,'ALLSTATS'));If you need the actual tuntime statistics used by sql statement then you need to put hint /*+ gather_plan_statistics */ in sql ststement, something like
select /*+ gather_plan_statistics */ * from emp;
and then generate the explain plan for this
Have a look
http://hoopercharles.wordpress.com/2010/03/01/dbms_xplan-format-parameters/
select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST')); -
1. How to create an explain plan with rowsource statistics for a complex query that include multiple table joins ?
When multiple tables are involved , and the actual number of rows returned is more than what the explain plan tells. How can I find out what change is needed in the stat plan ?
2. Does rowsource statistics gives some kind of understanding of Extended stats ?You can get Row Source Statistics only *after* the SQL has been executed. An Explain Plan midway cannot give you row source statistics.
To get row source statistics either set STATISTICS_LEVEL='ALL' in the session that executes theSQL OR use the Hint "gather_plan_statistics" in the SQL being executed.
Then use dbms_xplan.display_cursor
Hemant K Chitale -
Hello, I would like to know how I can open a file without downloading it? Thank you
Hello, I would like to know how I can open a file without downloading it? Thank you
matrix wrote in message
news:[email protected]..
> I tried that, attached is the vi.
> My actual aim is to allow data to be plotted to the graph 4 24 hours,
> after which, it should clear the chart and start at the beginning
> agin.
> Does this vi do this.
No. The attached is the simplest way of modifying it to do as you want. I've
sped things up a little to make it obvious.
> Will the array be able to keep all the data, is there a way i can do
> it without arrays, i.e. kind of dynamically, and therefore try to save
> memory usage.
You already are. You're making the arrays as you go along so only the memory
needed for the data that's in the plot is in use at any one time. To do it
without storing
arrays at all you'd need to keep retrieving the data from
the XYgraph, adding the new datapoint and writing it back. Messy and I
suspect incredibly inefficient.
You're going to use the memory in any case- a better option would be to
pre-initialise an array and fill it slowly. At the end of each 24 hour block
zap all the data and start again without destroying and recreating the
arrays. Or if you're only doing the 24 hour wipes to save memory, simply
start again at the start of the buffer woithout erasing the previous data
and you always have 24 hours of data to liik at once the system's running.
Do a search for keywords like "pre initialise" or "circular buffer" on
ni.com
[Attachment xy-time_modified.vi, see below]
Attachments:
xy-time_modified.vi 51 KB -
I just got a replacement i phone and i was setting it up and I cannot restore it with my iTunes because the soft wear is to old how to i update the soft wear without running the process
Hi Balzer1313,
Thanks for visiting Apple Support Communities.
If you have an older version of iTunes installed on your computer, you can update it using this menu option:
Windows: Choose Help > Check for Updates.
Mac: Choose iTunes > Check for Updates.
From:
iTunes: How to install the latest version
http://support.apple.com/kb/ht5654
If iTunes is not installed on your computer, you can download it here:
http://www.apple.com/itunes/download/
Cheers,
Jeremy -
How can i transfer videos without losing the sound to my iPhone 3G?
Hi
I have bought my iPhone 3G yesterday. I have found out how to transfer music from iTunes however i can't transfer videos. I'm selecting the videos i want to transfer on the videos tab after i chose my iphone from the side menu and pressing apply. iTunes says that its syncing my iphone but it doesnt transfer the videos.
Lately i have found out a function on the advanced menu for movies as "create iphone or ipod version". When i used that it transfered that video to my iPhone however the sound was completely lost besides that action takes too much time(around 10 mins for a 3 min video and i have a pretty strong computer).
How can i transfer videos without losing the sound to my iPhone 3G?One thing I'd recommend is that you make sure the video/audio you're trying to transfer falls within the guidelines listed in the 'Video' section here:
http://www.apple.com/iphone/specs.html
What's most likely happening is that the file is not converted as such so when you try to transfer it, it's wanting to convert it but is unable to for any number of reasons.
There's software out there that might make this easier for you but I can't recommend anything specifically. -
I have a 4S and just tried updating to the latest iOS version and my phone went into recovery mode and iTunes says I need to restore to factory settings. Anyone know how I can fix my phone without losing all my content?
You would only be able to restore to a backup to iCloud or iTunes:
Restore from Backup
Cheers,
GB -
How i can make a backup without separate hdd?
How i can make a backup without seperate hdd?
how i can partition the hd? please step by step...
today it's my first apple-day ... i was 18 years windows user
While I agree with everyone else, get a second disk and backup to that disk, I will point you in the directory of partitioning.
Applications -> Utilities -> Disk Utility
Disk Utility may or may not be able to carve a new partition out of your existing partition, depending on whether the end of the current partition is unused so the current partition can be reduced in size and a new partition added.
It may be necessary to use an external disk, clone your internal disk using SuperDuper or Carbon Copy Cloner (both free to use when creating a full clone), then partition your internal disk, and finally restore the external clone to the internal disk again using SuperDuper or Carbon Copy Cloner.
If you do not want to get a 2nd disk, then consider using an on-line service such as CrashPlan, Carbonite, Mozy, etc... for the files you absolutely cannot aford to loose. -
How can I copy/paste without copying the formatting?
How can I copy/paste without copying the formatting? For example, if I copy a sentence from a website and paste it on text editing program, it copies all the formatting as well. How can I turn that off?
There is an app called "No Formatting" in the App Store. It is simple and works perfectly - it strips formatting from paste (Ctr-V). I needed it for Word and Excel, which don't have keyboard shortcuts for this. It can be toggled on and off from the Menu Bar.
-
Hello! I'm out of the country and all my iWeb information is on my computer at home. Now I need to make changes on the webpage... how can i do that without using the computer i made the page on? Thank you!!
iWeb uses the domain.sites2 files to store its assets.
You'll find it here :
~/Library/Application Support/iWeb/
where ~ is your Home directory.
If you take a computer with you, you have to store that file in the same location.
It's not different from taking documents with you if you want to edit them.
A solution is to remotely control your computer at home.
TeamViewer, LogMeIn, Apple Remote Desktop or any VNC application you can use, like "Chicken of the VNC". -
How i can see a page without logon to the portal
Who knows how i can see a pge without logon to the portal?
Thanks anywayi don't understand your, but
my users login to page by portlet on all pages or custom login page.
pl/sql portlet on all page:
put pl/sql portlet on page
pl/sql text:
begin
if portal.wwctx_api.is_logged_on then
htp.p('<center>logout<center><br>');
else
htp.p('<table BORDER="1" WIDTH="100%" CELLPADDING="2" CELLSPACING="0" class="RegionBorder">
<tr><td class="RegionHeaderColor" WIDTH="100%"><script TYPE="text/javascript">
<!-- Comment out script for old browsers
function loginsubmit()
document.LoginForm.uname.value =
document.LoginForm.ssousername.value;
document.LoginForm.pwd.value =
document.LoginForm.password.value;
document.LoginForm.ssousername.value = "";
document.LoginForm.password.value = "";
document.LoginForm.submit();
//-->
</script>
<form ACTION="PORTAL.wwptl_login.login_url" METHOD="POST" name="LoginForm" AutoComplete="Off" onSubmit="loginsubmit()">
<input TYPE="hidden" NAME="p_requested_url" VALUE="http://your.curent.name">
<input TYPE="hidden" NAME="p_cancel_url" VALUE="http://your.curent.name">
<input TYPE="hidden" NAME="uname" VALUE="">
<input TYPE="hidden" NAME="pwd" VALUE="">
<table ALIGN="center">
<tr>
<td><font class="PortletText1">name</font></td>
<td><input TYPE="text" NAME="ssousername" SIZE="10" MAXLENGTH="80" style="font-size:10px;"></td>
</tr>
<td><font class="PortletText1">password</font></td>
<td><input TYPE="password" NAME="password" SIZE="10" MAXLENGTH="255" style="font-size:10px;"></td>
</tr>
</table>
<center>
<input TYPE="submit" VALUE="Registration">
</center>
</form></td></tr></table>');
end if;
end;
set show directly in page.
good luck ?:( -
How can i start aperture without retyping the serial number?
how can i start aperture without retyping the serial number?
Quit Aperture.
Go to your Macintosh HD and open the folder "Library", then "Application Support", then "ProApps".
Remove the File "ProAppsSystemID" to the Desktop, if it exist and restart Aperture.
Reenter your serial number, hopefully for the last time. -
i have purchased a second hand iphone 5s but it was not activate now when am going to activating my iphone ,its ask me to log in by registered apple id, tell me how i can activate my iphone without apple id?
rajajaved wrote:
i have purchased a second hand iphone 5s ..
The Apple ID and Password that was Originally used to Activate the iDevice is required.
If you cannot get this information from the seller
Removing a device from a previous owner’s account
You need to return the Device for a refund, as you will not be able to re-activate it. -
About 2/3 of the time I leave Firefox, it is evidently retained in memory so I can't restart it without using the task manager. I don't use Norton or Skype programs. How do I keep this from happening?
== After I have used Firefox and "closed" it.See this:
https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit
Maybe you are looking for
-
Hi, I would like to evaluate the option of using TDMS files instead of an SQL database. I will need to simply extract/query results that follow some conditions from multiple TDMS files. I found many articles but could not find one example of how to e
-
Hi, We have an xml api that accepts order requests and returns xml responses based on the processing performed. I would like to add a tag called <Lables> to the xml response that contains the contents (bytes?) of a pdf file generated on our side. I h
-
All v8 files saved from Illustrator CC seem to be corrupt - anyone else see this?
Hi There, I've tried searching for this but couldn't find anything. I'm trying to import an illustrator file into Cinema4D which requires me to save a v8 eps - but when I try to import, nothing happens. At first I hought it was a C4D issue but if I:
-
Hi. When installing Windows 8.1 there is an option to sign in before even finishing up installation. Well I didn't know that there is an option to bypass that so I put in my hotmail account settings. So all was well and then I added the pc to domai
-
Another cross-post from the Minneapolis LabVIEW User's Group. This evening's main presentor was Tom Brass of St. Bernard Engineering. Tom is a CLA and one of the fastest LabVIEW coders I know. Tom has taken the time to actually work a CLD practice