Order of the sql operation
hi experts,
I want to clear my basic concepts here.
I want to know the order of the sql operation.
actually the problem with me that i have read from different blog and websites
about the order of operation of the sqkl queries , hence i am confused here.
what i think the order of operation iis
-----------MY assumptuion---------------------
From
|
where
|
group
|
having
|
select
|
order by
is my assupmtion is correct?
if yes , then if suppose there is rownum clause in my selection criteria,at which timing
will it apply?
on some site i have seen below criteria
1. The FROM/WHERE clause goes first.
2. ROWNUM is assigned and incremented to each output row from the FROM/WHERE clause.
3. SELECT is applied.
4. GROUP BY is applied.
5. HAVING is applied.
6. ORDER BY is applied.
is this correct or my assumption is correct?
thanks a lot in advance..!!
regards,
prashant
Hi Prashant,
Instead of memorizing, why not check the query plan -
-->-- Creating a test table
CREATE TABLE test_tbl as
SELECT 'A' name, 100 sal FROM dual UNION ALL
SELECT 'A' name, 120 sal FROM dual UNION ALL
SELECT 'B' name, 66 sal FROM dual UNION ALL
SELECT 'C' name, 20 sal FROM dual UNION ALL
SELECT 'C' name, 50 sal FROM dual UNION ALL
SELECT 'C' name, 60 sal FROM dual UNION ALL
SELECT 'D' name, 90 sal FROM dual UNION ALL
SELECT 'D' name, 110 sal FROM dual;
-->-- Query explain plan
EXPLAIN PLAN for
SELECT name, SUM(sal) sm
FROM test_tbl
GROUP BY name
HAVING Sum(sal) > 150
ORDER BY sm;
-->-- Fetching the plan from cursor pool
SELECT *
FROM TABLE(dbms_xplan.display);
-->-- Query plan
PLAN_TABLE_OUTPUT
Plan hash value: 3401269832
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 8 | 128 | 5 (40)| 00:00:01 |
| 1 | SORT ORDER BY | | 8 | 128 | 5 (40)| 00:00:01 |
|* 2 | FILTER | | | | | |
| 3 | HASH GROUP BY | | 8 | 128 | 5 (40)| 00:00:01 |
| 4 | TABLE ACCESS FULL| TEST_TBL | 8 | 128 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter(SUM("SAL")>150)
Now, how to read the plan?
Start reading the plan - with the line "Operation" indented towards extreme right. Line-4 in this case.
Note: If two lines are indented similarly i.e. on same vertical line... read normally as-in order.
Like this:
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 8 | 128 | 5 (40)| 00:00:01 |
| 1 | SORT ORDER BY | | 8 | 128 | 5 (40)| 00:00:01 |
|* 2 | FILTER | | | | | |
| 3 | HASH GROUP BY | | 8 | 128 | 5 (40)| 00:00:01 |
| 4 | TABLE ACCESS FULL| TEST_TBL_1 | 8 | 128 | 3 (0)| 00:00:01 |
| 5 | TABLE ACCESS FULL| TEST_TBL_2 | 8 | 128 | 3 (0)| 00:00:01 |
Read: line 4 and then line 5, since both are on same vertical level.
Final sequence:
1- (Line 4) Table Access : FROM clause
2- (Line 3) GROUP BY
3- (Line 2) Filtering : WHERE clause
4- (Line 1) Sorting : ORDER BY clause
5- (Line 0) SELECT
Hope this helps.
-- Ranit
Similar Messages
-
Hi,<BR>While adding/Changing member in planning it gives the error "The SQL operation failed with an error code: 0" and not allowing any of the changes. I am not able to open the forms giving the error as "Fiscal Days Input - is invalid". Interestingly one form was opening, when the Page selection is changed it also started giving error as like "Fisacal Days Input(form name) - is invalid check log for details". <BR>Pls advice us that what is this error and how to resolve this.<BR><BR>And Which log is to be referred for the details.<BR><BR>Thanks<BR>Ravi
If a form is invalid it generally means that one of the dimension references is missing.<BR><BR>Can you get in to edit the form?<BR>If you can, see if you can preview it. I suspect you will not be able to.<BR><BR>If not, check all dimension boxes have at least one member against them.<BR>If you have multiple rows and/or columns check all of them too.<BR><BR>I've had a couple of forms in dev "drop" a dimension reference but only once or twice so not enough to reproduce or find out what is causing it. Each time I got the "form invalid" error message and managed to fix it.<BR><BR>Hope this helps.<BR>
-
"SQL Operation failed" When deleting forms EPMA
V11.1.2.1 - Planning through EPMA.
I have a form which I made to test something that I cant get rid of. I can edit it, I can hide it and I can change any normal setting you would expect on it. When I open it, everything appears as expected. This is happening for just one form, I can create and delete others in the same folder. I've tried renaming it and deleting and that still doesn't work.
I just cant select it and click "Delete": I get an error message saying "The SQL Operation failed. Check logs for details.
Does anyone know which logs in particular might point me to the cause of the problem?
Has anyone had and resolved this before?
Regards
EdCheck the user_projects/<instancename>/diagnostics/logs/starter or services depending on linx/windows. Check the Hyperion Planning log to see what errors are generated in the log when you attempt the delete. You should see an sql error message.
If you don't see any messages you want to set planning property debug_enabled TRUE (the instructions for this are in the troubleshooting documentation for EPM) and restart the server.
Retry and reexamine the logs. -
SQL Azure - Intermittent The wait operation timed out
I have a website engine which runs a few hundred "white label" sites. It's hosted on Azure with a SQL Azure Business database. Generally everything is fine - it all works and runs at a good speed.
However, throughout the day I get maybe 40 or 50 of the error:
System.ComponentModel.Win32Exception: The wait operation timed out
Please don't refer me to the connectivity blog at http://blogs.msdn.com/b/sqlazure/archive/2010/03/22/9982979.aspx as this seems to refer to problems where you just can't connect. My problem is that it's fine most of the time, but I still get these
intermittently.
This is sometimes on the main database, but we're also using a database for sessions and this gets the errors too. Both databases are on the same server.
I also get errors like:
An existing connection was forcibly closed by the remote host
and:
System.Data.SqlClient.SqlException: The service has encountered an error processing your request. Please try again. Error code 40143. A severe error occurred on the current command. The results, if any, should be discarded.
and, when evil bots are hammering the site:
System.Data.SqlClient.SqlException: Resource ID : 1. The request limit for the database is 180 and has been reached. See 'http://go.microsoft.com/fwlink/?LinkId=267637' for assistance.
Each website can potentially have a Google footprint of around 10,000 pages. The result it that bots are hitting the sites regularly, indexing lots of pages for hundreds of sites. I also have some worker roles doing data work. The database is clearly busy!
I am hoping to add 2 or 3 times the number of sites that I currently have to the "engine".
I am looking at efficiency where possible, but the sites are clearly under a fair load from bots and visitors.
My question is, will one of the upgrades from Business to S2, P1, P2 or P3 resolve these problems? The financial cost of these database instances stagger greatly so I wouldn't want to update and find I'm left with the same problems but am paying many times
more each month.
Thank you in advance.Hello,
For Web/Business edition database, the maximum limit of concurrent requests is 180. Beyond this limit, you will receive error.
The Max woker threads for Standard(S2) is 100, you should upgrade your database to Permium tier.
The concurrent requests limit of premium database varies depending on the reservation size of a premium database. For example, for P1, the max worker threads is 200.
Reference:Azure SQL Database Resource Governance
Azure SQL Database Service Tiers and Performance Levels
Regards,
Fanny Liu
If you have any feedback on our support, please click here.
Fanny Liu
TechNet Community Support -
Sorting of Date field in the SQL Query useing ORDER BY
Hi
I am facing a problem when I am getting the results of a query from the ORacle 8i database using jdbc connection.
The query is having a date field and I have to sort the query results using ORDER By for the Date field. The query is giving exact results in the SQL PLus interface.
When I am getting this results in the GUI where servlets are being used an Exception is coming as not supported RefreshRow method.
If anyone has faced this problem and have got the solutions please let me know.
thanks
sulfyThat doesn't sound at all like an SQL problem.
More like you trying to do updates on the resultset which is not allowed ...
send a some code (not to much pls :) and we'll be
able to help more
cu
Spieler -
I have a web app that is backed by a an Azure SQL Database. The problem is that I had multiple issues when connecting to the database mainly when trying to establish a connection, or timeouts. This is the log I just encountered when trying to use the web
app.
[Win32Exception (0x80004005): The wait operation timed out]
[SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21970; handshake=1; ]
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +671
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +116
System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1012
System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +6712291
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +152
System.Data.SqlClient.SqlConnection.Open() +229
System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +102Hi Affar2k,
According to your description, we need to verify if there is no network issue and the Sqlclient version is older than .NET 4.5. You can try to connect to the Windows Azure SQL database via SSMS and check if it can run well. When you
connect to the SQL Azure database via ADO.NET, you need to verify that the server name and passwords are right in the connection string.
For more information, you can review the following article about how to connect to Windows Azure SQL Database using ADO.NET.
http://msdn.microsoft.com/en-us/library/windowsazure/ee336243.aspx
Thanks,
Sofiya Li
Sofiya Li
TechNet Community Support -
How to delete an operation from order using the bapi
Can somebody please tell me how to delete an operation from order using the bapi
BAPI_ALM_ORDER_MAINTAIN.
Following was the test data for the BAPI.
000000 OPERATION DELETE 0000040052810070
000000 SAVE 0000040052810070
Even I tried entering the operation table. The BAPI control ends fine, but when I check the order using IW32, the operation still exists.
So, can you please tell me where Iam going wrong.Hi Subash Mohanvel,
Check bapireturn parameter of the bapi BAPI_ALM_ORDER_MAINTAIN after execution of the code , and if there is no error message in the return table then call bapi_Transaction_commit.
Unless you call this database saving of the records/values will not get reflected in the system.
Hope that helps.
Regards
Kapadia
***Assigning points is the way to say thanks in SDN.*** -
Using the Unpivot Operator when in Oracle8i PL/SQL Generation Mode
Hi,
when you are validating a mapping with contains an unpivot operator and the PL/SQL Generation Mode is set to Oracle8i (because you're using an Oracle8i 8.1.7. target database) the following error is raised:
VLD-3127: Cannot generate code for UNPIVOT because the unpivot operator is only supported starting with the Oracle9i version of the database.","The unpivot operator is only supported starting with the Oracle9i version of the database. To resolve this, set the PL/SQL Generation Mode to Oracle9i in the configuration of the Oracle module that contains this mapping.
When you set the PL/SQL Generation Mode to Oracle9i and after successfully validating the mapping generate the code you can see that within the generated code case-statements are used for the unpivot translation.
like:
MIN(CASE WHEN "AGG_YEAR_MONTH" = 200301 THEN "NO_CALLS" ELSE NULL END) "JAN2003_CALLS"
And as Oracle8i doesn't support the case-statement, the raised validation error is understandable. But the generated code can be easily modified using decode-classes instead of the case-statements.
results in:
MIN(DECODE("AGG_YEAR_MONTH",''200301'',"NO_CALLS",NULL)) "JAN2003_CALLS"
And the generated code works fine in the Oracle8i 8.1.7 target database.
But now my question:
Does someone know if it is possible to create a custom unpivot operator in OWB9.2.0 which will generate the code using the decode-class instead of using the case-statements. And if so, how I can create such custom operator.
Many Thx in advantage!
RemcoHi,
The reason why OWB does not generate decode statements is that the generated code needs to support both set-based and row-based operation modes. Decodes are valid in SQL (set based), but not in PL/SQL (row based)
Oracle 8i (8.1.7) does in fact support CASE, but only in SQL statements, not PL/SQL
Have you considered creating a view to perform the unpivot operation using decode? It should also be possible solve your problem using a function
Regards,
Roald -
How do I incorporate the 'WHEN' operator in a SQL*Loader mapping?
Environment:
OWB 10g
Repository: 9.2.0.4
Target: 9.2.0.4
O/S: AIX 5.2
I have the need to incorporate the WHEN clause in a flat file mapping to eliminate some unneeded rows in the flat file.
I can't seem to find the configuration option or property setting or whatever it takes to get that done.
I thought it would be part of the FILTR operator but I kept getting an 'Invalid expression' error message.
In this case I want to ignore any rows that have a 'M', 'D' or 'S' in the first column.
Many thanks for all your help.
GaryJean-Pierre
Thanks very much for your quick response.
One last point and we should drop this in favor of other more urgent issues we both ahve to deal with.
The data is coming from a comma delimited (CSV) file using a comma ',' and optional quotes (") as field separators.
The first column of 'good' data is read as an INTEGER EXTERNAL because of course it is a number. However, the 'bad' rows I want to eliminate have character text in them where I would normally find numbers and they all start with 'D','M' or 'S'.
I don't have an actual column in the data file or resulting table definition that represents that first character that I'm trying to test on. Hence my use of (1) to reporesent the 1st character of data on the line regardless of whether its numeric or character.
As I stated, the syntax works fine in SQL*Loader when I typed the WHEN clause in manually.
I guess if there was a way to define a pseudo column that could be defined using the POSITION notation and everything else using the variable length delimited notation I could test on that psuedo column. I don't want the pseudo column to appear in my resulting table so that seems to be an issue. Enough.
Since I've worked around it using external tables for this issue I'm not going to spend any more time on it today.
As usual, many thanks for your help.
Have a great day! I'll be back soon with another issue :-)>
Gary -
I have an iMac with a 10.4.11 operating system. When I click on iTunes Store, I no longer get the iTunes screen, instead, I get a new iTunes download screen.
I can't download the new iTunes without upgrading my operating system. Is there a way around this problem without buying the new operating system?
I haven't been able to download songs for awhile now.which version of iTunes are you on ? if it's earlier than iTunes 9.2.1, get it here.
-
Hi,
I have started sql agent service on the SQL server but I still cannot subscribe. I have followed few instructions but no joy.
Can you please help?
Thanks,Hi Mo,
According to your description, you want to subscribe a report with E-mail delivery extension, right?
In Reporting Services, since the E-mail delivery extension is not configured by default, if we want to subscribe reports with E-mail delivery extension, we should specify E-mail settings in Reporting Services Configuration Manager. Besides, we should specify
advanced settings in rsReportServer.config file. In your scenario, please make sure you have configured the E-mail delivery extension correctly. For more information, please refer to this article:
Configure a Report Server for E-Mail Delivery (SSRS Configuration Manager).
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Re: Error in submitting Import Standard Purchase orders from Pl/Sql
Hi All,
Iam using the following code to submit a concurret program
"Import Standard Purchase orders" from pl/sql
Program is sucessfully submittted but it is Completing in error status i am stuck there please help me in resolving this
My instance R12
My Code
======
DECLARE
v_request_id VARCHAR2 (100);
BEGIN
mo_global.set_policy_context ('S', 204); --org_id for the operating unit which the purchase order records belong too
mo_global.init ('PO'); -- sets the application
FND_GLOBAL.APPS_INITIALIZE (1013436, 50578, 201); --Consists of the user_id, responsibility_id, responsibility_application_id which is 201 for purchasing
v_request_id :=
fnd_request.submit_request (application => 'PO',
program => 'POXPOPDOI',
description => NULL,
start_time => NULL, -- To start immediately
sub_request => FALSE,
argument1 => '31348', -- Buyer_ID
argument2 => 'STANDARD', -- Doc Type
argument3 => '', -- doc subtype
argument4 => 'N', -- update items
argument5 => '', -- create sourcing rules not used
argument6 => 'INCOMPLETE', -- Approval status
argument7 => '', -- release generation method
argument8 => '1021387', -- batch_id
argument9 => '', -- operating unit null
argument10 => '', -- global agreement null
argument11 => '', -- enable sourcing null
argument12 => '', -- sourcing level null
argument13 => '', -- inv org enabled null
argument14 => '' -- inv org null
DBMS_OUTPUT.put_line ('Request submitted. ID = ' || v_request_id);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (
'Request set submission failed - unknown error: ' || SQLERRM
END;
output
=====
when i check output i am getting the follwing error
DECLARE
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at line 133
Log message
==========
+-----------------------------
| Starting concurrent program execution...
+-----------------------------
Arguments
31348
STANDARD
N
INCOMPLETE
1021387
Start of log messages from FND_FILE
To get the log messages for PDOI, please use the following id to query against FND_LOG_MESSAGES table:
AUDSID = 945297
ORA-01403: no data found in Package po.plsql.PO_PDOI_PVT. Procedure init_sys_parameters.0
ORA-01403: no data found in Package po.plsql.PO_PDOI_PVT. Procedure init_startup_values.10
ORA-01403: no data found in Package po.plsql.PO_PDOI_PVT. Procedure start_process.50
User-Defined Exception in Package po.plsql.PO_PDOI_Concurrent. Procedure POXPDOI.30
End of log messages from FND_FILE
Thanks
Manoj kumarPass NULL instead of ''
Check the flag
SELECT multi_org_category
FROM fnd_concurrent_programs
WHERE concurrent_program_name = 'POXPOPDOI'Update it as per the below MOS Doc
R12 / POXPOPDOI - 'ORA-01422' Error While Running 'Import Standard Purchase Orders' [ID 457628.1]
Otherwise,
Follow the below doc and insert values to the interface tables (headers, lines and distribution) and run the Import Standard Purchase Orders from the front end.
How To Diagnose Problems With Importing Standard Purchase Orders [ID 781351.1]
HTH
Cheers,
ND
Use the "helpful" or "correct" buttons to award points to replies / Mark the thread as answered, if your question is answered. -
Having issues after installing Essbase V9.3.1,configuring the SQL interface
I am having issues after installing Essbase V9.3.1 and configuring the SQL interface. we are using UNIX/AIX box for our Essbase server and UDB DB2 9.1 SP6 as our SQL Interface.
When tried to run an ESSCMD script to perform BUILDDIM operation on Essbase application using the load rule (with the SQL interface), got the error as recorded in the application log file and is attached at the bottom and the .odbc.ini file on the server looks as follows.
Can somebody tell me whether .odbc.ini needs any correction or what else should I do to correct the issue and able to work thru using SQL interface? Appreciate any help provided in this regard. Thanks,
.odbc.ini
[ODBC Data Sources]
DOLU003=IBM DB2 ODBC DRIVER
[DOLU003]
Driver=/home/db2inst1/sqllib/lib/libdb2.a
Database=DOLU003
[ODBC]
Trace=0
TraceFile=odbctrace.out
InstallDir=/home/db2inst1/sqllib/odbclib
[Mon Apr 20 15:16:29 2009]Local/New_Bud/Budget/Olapadm/Info(1021020)
Cannot read SQL driver name for [] from [home/hyperion/.odbc.ini]
[Mon Apr 20 15:16:43 2009]Local/New_Bud/Budget/Olapadm/Info(1013091)
Received Command [SQLRetrieve] from user [Olapadm]
[Mon Apr 20 15:16:43 2009]Local/New_Bud/Budget/Olapadm/Info(1021020)
Cannot read SQL driver name for [] from [home/hyperion/.odbc.ini]
[Mon Apr 20 15:16:43 2009]Local/New_Bud/Budget/Olapadm/Info(1021004)
Connection String is generated
[Mon Apr 20 15:16:43 2009]Local/New_Bud/Budget/Olapadm/Info(1021041)
Connection String is [DSN=DOLU003;UID=...;PWD=...]
[Mon Apr 20 15:16:43 2009]Local/New_Bud/Budget/Olapadm/Info(1021006)
SELECT Statement [SELECT * FROM DB2OLADM.BD_DIMENSION_DEF_PC WHERE DIMENSION_ID
= 12 ORDER BY TREE_NODE_NUM, PARENT_NODE, CHILD_NODE] is generated
[Mon Apr 20 15:16:44 2009]Local/New_Bud/Budget/Olapadm/Info(1021013)
ODBC Layer Error: [7] ==> [[DataDirect][ODBC 20101 driver]6013]
[Mon Apr 20 15:16:44 2009]Local/New_Bud/Budget/Olapadm/Info(1021014)
ODBC Layer Error: Native Error code [0]
[Mon Apr 20 15:16:44 2009]Local/New_Bud/Budget/Olapadm/Error(1021001)
Failed to Establish Connection With SQL Database Server. See log for more information
--------------------------------------------------------------------------------------------------------------------------------------------I had similar errors when first setting up the SQL interface. Are you on a 64 bit operating system on the essbase server? If so Essbase needs to use the 32 bit odbc driver, not the default 64 bit driver.
The 32 bit driver is still available here SysWOW64\odbcad32.exe <-----This is the 32 bit (Use)
The Administrative tools by default uses system32\odbcad32.exe <----This is the 64 bit (Don't Use)
Once I opened the 32 bit driver interface directly and set it up the errors went away. -
How does the Filter Operator "Contains" work on the Interactive Reports?
version 4.0.2.00.07
Hello,
I'm creating Tool Tip definitions for the Operators in the Filter on the Interactive Reports. I was looking for a definition for the 'Contains' operator and from what I've found this operator is used to do a text search and it returns a relevance score for every row selected.
I've also read that in order for that score to be determined that the column(s) need to be indexed with a CONTEXT index. Non of the columns in the tables are indexed with a CONTEXT index, however, when I put a value in the Expression box for a column I get a record returned.
If I run the same query in PL/SQL Developer like:
SELECT <column>
FROM <table>
WHERE contains(<column>,<search text>,1) > 0;I get an error that the column is not indexed, so how does it work in APEX?
Thanks,
JoeJoe R wrote:
I'm creating Tool Tip definitions for the Operators in the Filter on the Interactive Reports. I was looking for a definition for the 'Contains' operator and from what I've found this operator is used to do a text search and it returns a relevance score for every row selected.The IR "Contains" filter is not the same as the Oracle Text <tt>contains</tt> operator.
The IR "Contains" filter performs a simple string comparison on all of the column values returned. It does not make use of any Oracle Text indexes on the underlying data.
Despite < a href="https://forums.oracle.com/forums/thread.jspa?messageID=2434666">vague promises of enhancement</a>, no Oracle Text support has yet been included in Interactive Reports. -
Where to find the SQL text in v$ views?
Hi All,
Oracle 11.2.0.3 on RedHat.
I am trying to find out SQL activity on my database for a very narrow time window. Please see the SQLs I did
SQL> select distinct user_id, sql_id
2 from v$active_session_history
3 where sample_time between to_date('20120704012000','yyyymmddhh24miss') and
4 to_date('20120704012200','yyyymmddhh24miss')
5 and user_id = 111 ;
USER_ID SQL_ID
111
111 gjg25k7stx9ba
111 a8m049aj31b1y
111 asjw7b7h99w4m
111 fvffk1aqrb55n
111 9gskv9b1u7mau
111 03tsb9pp3h1uj
111 dm0jppss5z0ay
111 44n0svyuc000x
111 16t1tpr7mdqnf
111 bzpu510tng689
111 dsqzhqdvzamys
12 rows selected.
SQL> select * from v$sqltext where sql_id='16t1tpr7mdqnf' order by piece ;
no rows selected
SQL> select * from table( dbms_xplan.display_awr('16t1tpr7mdqnf') ) ;
no rows selectedI can see the text for all SQLs in v$sqltext, except 16t1tpr7mdqnf. User id 111 is the user used to run our batch processes.
Where can I find the text for this SQL id 16t1tpr7mdqnf ?
This SQL has run about 8 hours ago.
Thanks in advanceWhen you say, ASH captures active sessions, does that mean, it only captures "session" information, which may not include details about SQL ?Exactly, it's a snapshot of session level information for active sessions.
So, session X can be executing sql statement abc123 and be captured by ASH which takes a snapshot of all active sessions every 1 second in V$ACTIVE_SESSION_HISTORY.
1 in 10 of these active sessions is stored in the repository - DBA_HIST_ACTIVE_SESS_HISTORY (in practice, this 1 in 10 sample is literally as simple as store the active sessions from every 10th second).
Independently of this, obviously you have the shared pool and V$SQL. If your statements are in here then great.
Otherwise you have AWR which captures the top N sql from each interval.
So, as mentioned, perfectly normal to have references to sql ids and sql plan hash values captured in ASH but not AWR.
One interesting thing here is, sql_exec_id is blank. What does that say? It depends.
It's likely to be one of two things:
1. some sort of bug or limitation - there are certain operations and time limits were some of the ASH values get cleared out or don't get cleared out.
2. occasionally I've seen the ASH information be misleading when it comes to certain recursive operations - one specific example I can think of related to the recursive merge of sql plan baseline metric tracking operations.
Maybe you are looking for
-
Version count in statspack report-How to reduce this
I generate stats report every week for 24 Hr time period and analyze all top20 queries interms of buffer gets,physical reads and executions.I could tune the queries with the help of you.Recently my Boss asked me to look in to top version count querie
-
Warning message on BB Desktop Software.
Hello, there was a new update for my curve. So I plugged it up to v4.7 of desktop, and it wanted me to update it. so I did. I brought up a warning message, saying : " After completing the loading operation, you must activate you device wirelessly to
-
I have an iPhone 4S and it has been stuck in recovery mode for whatever reason. I have tried using data recovery software that can turn my phone to normal mode but when it tries all my phone does in turn off and then on again, back into recovery mode
-
New Blackberry, huge increase in data usage
Hi, After 2 years with a Blackberry 8520, which I just used to keep track of emails and browse occasionally, I have upgraded to a Blackberry 9720. With the 8520, my data usage each month never went above 33MB, so the advisor I saw at EE said that I
-
How can we include the property value into the News RSS?
We have defined object property u201CDepartmentu201D that is used in News XML creating form. How can we include the property value into the News RSS (set value of the particular RSS XML tag)?