Several SQL statements with zero executions in the region of SQL
Hello
one of my databases has a large number of statements in the SQL box with zero executions. Some of them analyzed several times without a single run. Why the database stores these statements and how to avoid or reduce them?
My problem is that the only time or zero time sql statements take the largest part of the area of sql:
-sql statement and only once and without executing sql statements
Select
Count (1) num_sql_total,.
sum (decode (executions, 1, 1, 0)) num_one_use_sql,.
sum (decode (executions, 0, 1, 0)) num_no_use_sql,.
Sum (RUNTIME_MEM) / 1024/1024 mb_used,.
sum (decode (executions, sharable_mem, 1, 0)) / 1024/1024 mb_for_one_use_sql,.
sum (decode (executions, 0, sharable_mem, 0)) / 1024/1024 mb_for_no_use_sql
Of
GV$ sqlarea
where
RUNTIME_MEM > 0;
NUM_SQL_TOTAL | NUM_ONE_USE_SQL | NUM_NO_USE_SQL | MB_USED | MB_FOR_ONE_USE_SQL | MB_FOR_NO_USE_SQL |
---|---|---|---|---|---|
23318 | 8739 | 8027 | 1420,95619106293 | 381,41183757782 | 530,999855041504 |
Concerning
Thomas
This is not unusual. Another app could analyze for example hard the most often used SQLs in upstairs app - making benefit of further processing (in theory) of sweet analysis when you use these SQLs.
In fact, I remember reading something to this effect as a performance for some factor or another Oracle document or note?
So unless you have serious questions of shared pool, why bother with these sliders? What would be the problem?
Tags: Database
Similar Questions
-
Can I use an IF statement in a Source in the region
Hello, Im using Apex 3.x. I have a standard report page whose Source region is a simple select statement... SELECT xyz OF... WHERE
I need to add an IF statement to this Source in the region, but when I do I get an error - query cannot be parsed in the generator.
IF: P2_FILTER = 'A' THEN
SELECT FROM ABC... WHERE
ELSIF: P2_FILTER = 'B' THEN
SELECT FROM ABC... WHERE
END IF;
The selected columns are the same in both scenarios. Is it possible to add an IF statement to the source of the region?
Thank you
youYou can either:
(1) create several springs in the area with a query and set a condition to show only based on your health status.
(2) a function returning the pl/sql and return the generic as columns:
if a then return 'select 123 from dual' else return 'select 456 from dual' end if;
-
Variable setting wrong with dynamic action for the region of report
Hello
I can't setting a variable. Here are the details of connection:
Connection information:
TCARMY workspace
User Apex_dev
Password dev_apex
Application 88542
Page 11
If you run the page 11 and just click on submit, there will be two rows. If you click on one, the modal region won't say no data found. If you click on the button submit once again, the value is passed if you click on it now, the results arrive. If you click on the second row, it still shows the value of the first row. If you click on submit again after clicking on the second line, then it is displayed correctly. It seems that the value is set to submit it. I want this to work when clicked, and then for the sql to run with the value that is in this variable when clicks on the element. There is a bit of javascript page level and dynamic action. Something is not right to the installation.
The modal window should popup and run the sql at that time with the variable data and view the two columns. And if the user clicks on the second row, it would display the data in the row.
Thank youTim
TC-army wrote:
If you run the page 11 and just click on submit, there will be two rows. If you click on one, the modal region won't say no data found. If you click on the button submit once again, the value is passed if you click on it now, the results arrive. If you click on the second row, it still shows the value of the first row. If you click on submit again after clicking on the second line, then it is displayed correctly. It seems that the value is set to submit it. I want this to work when clicked, and then for the sql to run with the value that is in this variable when clicks on the element. There is a bit of javascript page level and dynamic action. Something is not right to the installation.
What has not been set up right, it's that the element of P11_NAICNUMD parameter was not specified in the source attribute of Page to go to the region, modal Discount. The current value in the browser page, therefore, was not defined in session state when the report has been updated by the dynamic action. When
-
Several SELECT statements with COUNTY with different WHERE clauses.
OK, so for a bit of background on what this is trying to accomplish...
I have a small group of people in my team and I will use GROUP BY for their names.
If each person will be on their own line. Next to their names, I want to be able to have several columns that use the ACCOUNT for the different search criteria (no duplicates)Overall, it should have their names, and I would like to add the number of tickets that each person has which meet certain criteria (all in different columns)
I have applications that can do each of these tasks, but is it possible that I can group together on a single table statements, or use subqueries for these results?Do you mean you want something like that?
SQL > ed
A written file afiedt.buf1 with the team (emp_id, emp_name)
2 (select 1, 'Fred' from dual union all
3. Select 2, 'Bob' Union double all the
4. Select 3, 'Jim' to double
5 )
6, tickets (emp_id, ticket_type, ticket_id, ticket_desc)
7 (select 1, 1, 'BUG', 'First billet Freds' double Union all)
8. Select 2, 1, 'CHANGE', "Freds second ticket" of all the double union
9 select 3, 1, 'BUG', ' Freds third ticket "of any double union
10. Select 4, 2, "CHANGE", "Bobs first ticket" of any double union
11. Select 5, 3, "CHANGE", "Jims first ticket" of any double union
12. Select 6, 3, "BUG", "Jims second ticket" of all the double union
13. Select 7, 1, 'BUG', ' Freds fourth ticket ' from dual
14 )
15-
16 END OF TEST DATA
17-
18 select emp_name
19, count (case when ticket_type = 'BUG' then 1 end to another null) and bugs
20, count (case when ticket_type = 'CHANGE' then 1 end to another null) as changes
21 of the team t
22 a left join external tickets tk (t.emp_id = tk.emp_id)
23 * emp_name group
SQL > /.EMP_ CHANGES OF BUGS
---- ---------- ----------
Bob 0 1
Fred 3 1
Jim 1 1 -
excessive use of the memory of cRIO with without execution of the VI...
I have a cRIO-9073 which seems to work with very high memory use, even when no VI is actually being run. For example, if I format the cRIO, install the standard cRIO WHAT RTF S/W set (without the analytical engine) and then open Distributed System Manager OR I get 85% (!) memory usage. I did the format and reinstall to ensure doubly as no VI is running. I have used several other cRIOs, but I do not remember the operating system that requires this amount of memory.
Attached pictures of the s/w installed and distributed system manager.
When I'm not running my VI, I am of course short of memory.
HI Brad,
I have a 9073, and Yes, the standard operating system uses about 80-90% memory. You must choose the custom installation and strip off as much as possible. I have been using 9074 controllers since this experience. I hope that you can run your application by following these tips.
Good luck
Michael
-
Insertion of several subforms instances with app.response on the click event.
I could use help untangle this click event. I can't make it work the way I need too. I tried a few different variations without success. The part I have a problem with is in the loop and inserting multiple copies based on the user input to the app.response event. I have a script version that works with no loop, but who will not allow the insertion of multiple instances of the subform feature. Would appreciate any help on how I can do this.
var cChoice = app.popUpMenu ("Add a blank section", "Copy this section", "-", "Delete this section");
If (cChoice == 'Add a blank section') {}
ACT.instanceManager.addInstance (1)
} Else if (cChoice == "Delete this section") {}
ACT.instanceManager.removeInstance (this.parent.instanceIndex)
} Else if (cChoice == "Copy this section") {}
var cResponse = app.response ("the number of instances of the section you want to insert?", ["copy current section"])
}
If (cResponse is nothing)
{
App.Alert ("no copy of this section was inserted because of a response zero.");
}
on the other
{
var i = ACT.instanceIndex
var j = 0
while(j<cResponse) do
{
_ACT.addInstance (1)
xfa.resolveNode ("form1. Subform1.Act ["+ (i + 1) +"]. . RawValue row1. TextField") = xfa.resolveNode (" form1.. ") RawValue Subform1.Act.row1.TextField")
Hello
You code got a little truncated, but maybe something like;
var cChoice = app.popUpMenu ("Add a blank section", "Copy this section", "-", "Delete this section");
If (cChoice is "Add a blank section")
{
ACT.instanceManager.addInstance (1)
}
on the other
If (cChoice is "Delete this section")
{
ACT.instanceManager.removeInstance (this.parent.instanceIndex)
}
Else if (cChoice == "Copy this section")
{
var cResponse = app.response ("the number of instances of the section you want to insert?", ["copy current section"])
If (cResponse is nothing)
{
App.Alert ("no copy of this section was inserted because of a response zero.");
}
on the other
{
var i = ACT.instanceIndex
var j = 0
While (j<>
{
Var _ACT.addInstance = Act (1)
Act. Row1.TextField.RawValue = xfa.resolveNode ("form1..") RawValue Subform1.Act.row1.TextField")
j ++ ;
}
}
}
-
problem with VI execution to the use of the structure of the event
I close with this sub - VI, but it reacts as expected. My logic was 1 tables initialized with sequence, then the structure of the event in many different cases. The goal is to read a 2D .cal file 1 2 tables. Cells can be modified manually by typing in the text box, then clicking on the load button. Slider determines with cell in the index. Certain sequences of events work either
(1) download the cal file
(2) move the cursor
Type 3) x input box
(4) load x value
Other sequences of events are the VI does not, i.e.
(1) type x entry box
(2) load x value
Can some kind soul tell me the error of my ways?
Walt Donovan
First glance only:
You need to connect the tables 1 d in any event, other that they clear.
-
I use Dreamweaver 20141. I do it literately tons of sites and each has hundreds of pages, so I need a way almost drag and then just change the links which would make things go a lot faster. Data or the body is going to be the same as the model data.
Use the SSI (SSI) to put the code of the repetitive content body in a separate include file.
Build your various pages with unique headers and footers, and then "call" content with a PHP link.
-
Select statement with single quotes in the insert statement
Dear Sir
What's the trick to cover this issue:
Insert into TEST_TABLE (SQL_SCRIPT_ID, SQL_SCRIPT)
values ("1", "select count (*) from the SOURCE where SOURCE.") VALID = 'Y')
because of the single quotes, I get an error and can not insert, the script works, is there a workaround somehow?
Thank you 1 million,
Erik
Published by: 845498 on June 13, 2012 04:15create table testsql(script_id number,sql_script varchar2(1000)); insert into testsql (script_id, SQL_SCRIPT) values (1, 'select count (*) from SOURCE where SOURCE.VALID = ''Y''');
-
Case statement with multiple queries to the THEN clause
Y at - it a syntax something like:
Case
When A = 1
Then B: = 2 and C: = 3
When A = 2
Then B: = 4 and C: = 5
Else B: = 6 and C: = 7
End case;
where clause can then have multiple assignments?
Also, how to mark entries as code on this forum?
TIA,
Extreme FarleyYou can simplify a bit:
SQL> declare 2 a number := 0; 3 b number := 0; 4 c number := 0; 5 begin 6 7 Case A 8 WHEN 1 Then 9 B := 2; 10 C := 3; 11 WHEN 2 Then 12 B := 4; 13 C := 5; 14 Else 15 B := 6; 16 C := 7; 17 End Case; 18 dbms_output.put_line('A=' || a); 19 dbms_output.put_line('B=' || b); 20 dbms_output.put_line('C=' || c); 21 end; 22 / A=0 B=6 C=7 PL/SQL procedure successfully completed.
-
Plans of multiple executions for the same SQL statement
Dear experts,
awrsqrpt. SQL shows several plans for a single SQL statement executions. How is it possible that a single SQL statement will be several Plans of executions within the AWR report.
Here is the output of the awrsqrpt for your reference.
Your contribution is very much appreciated.WORKLOAD REPOSITORY SQL Report Snapshot Period Summary DB Name DB Id Instance Inst Num Release RAC Host ------------ ----------- ------------ -------- ----------- --- ------------ TESTDB 2157605839 TESTDB1 1 10.2.0.3.0 YES testhost1 Snap Id Snap Time Sessions Curs/Sess --------- ------------------- -------- --------- Begin Snap: 32541 11-Oct-08 21:00:13 248 141.1 End Snap: 32542 11-Oct-08 21:15:06 245 143.4 Elapsed: 14.88 (mins) DB Time: 12.18 (mins) SQL Summary DB/Inst: TESTDB/TESTDB1 Snaps: 32541-32542 Elapsed SQL Id Time (ms) ------------- ---------- 51szt7b736bmg 25,131 Module: SQL*Plus UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL,0) + NVL(ACCT_DR_BAL, 0)) FROM ACCT WHERE ACCT_TRN_DT = (:B1 ) AND TEST_ACC_NB = ACCT_ACC_NB(+)) WHERE TEST_BATCH_DT = (:B1 ) ------------------------------------------------------------- SQL ID: 51szt7b736bmg DB/Inst: TESTDB/TESTDB1 Snaps: 32541-32542 -> 1st Capture and Last Capture Snap IDs refer to Snapshot IDs witin the snapshot range -> UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL,0) + NVL(AC... Plan Hash Total Elapsed 1st Capture Last Capture # Value Time(ms) Executions Snap ID Snap ID --- ---------------- ---------------- ------------- ------------- -------------- 1 2960830398 25,131 1 32542 32542 2 3834848140 0 0 32542 32542 ------------------------------------------------------------- Plan 1(PHV: 2960830398) ----------------------- Plan Statistics DB/Inst: TESTDB/TESTDB1 Snaps: 32541-32542 -> % Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100 Stat Name Statement Per Execution % Snap ---------------------------------------- ---------- -------------- ------- Elapsed Time (ms) 25,131 25,130.7 3.4 CPU Time (ms) 23,270 23,270.2 3.9 Executions 1 N/A N/A Buffer Gets 2,626,166 2,626,166.0 14.6 Disk Reads 305 305.0 0.3 Parse Calls 1 1.0 0.0 Rows 371,735 371,735.0 N/A User I/O Wait Time (ms) 564 N/A N/A Cluster Wait Time (ms) 0 N/A N/A Application Wait Time (ms) 0 N/A N/A Concurrency Wait Time (ms) 0 N/A N/A Invalidations 0 N/A N/A Version Count 2 N/A N/A Sharable Mem(KB) 26 N/A N/A ------------------------------------------------------------- Execution Plan ------------------------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------------ | 0 | UPDATE STATEMENT | | | | 1110 (100)| | | 1 | UPDATE | TEST | | | | | | 2 | TABLE ACCESS FULL | TEST | 116K| 2740K| 1110 (2)| 00:00:14 | | 3 | TABLE ACCESS BY INDEX ROWID| ACCT | 1 | 26 | 5 (0)| 00:00:01 | | 4 | INDEX RANGE SCAN | ACCT_DT_ACC_IDX | 1 | | 4 (0)| 00:00:01 | ------------------------------------------------------------------------------------------------ Plan 2(PHV: 3834848140) ----------------------- Plan Statistics DB/Inst: TESTDB/TESTDB1 Snaps: 32541-32542 -> % Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100 Stat Name Statement Per Execution % Snap ---------------------------------------- ---------- -------------- ------- Elapsed Time (ms) 0 N/A 0.0 CPU Time (ms) 0 N/A 0.0 Executions 0 N/A N/A Buffer Gets 0 N/A 0.0 Disk Reads 0 N/A 0.0 Parse Calls 0 N/A 0.0 Rows 0 N/A N/A User I/O Wait Time (ms) 0 N/A N/A Cluster Wait Time (ms) 0 N/A N/A Application Wait Time (ms) 0 N/A N/A Concurrency Wait Time (ms) 0 N/A N/A Invalidations 0 N/A N/A Version Count 2 N/A N/A Sharable Mem(KB) 26 N/A N/A ------------------------------------------------------------- Execution Plan --------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | --------------------------------------------------------------------------------------------- | 0 | UPDATE STATEMENT | | | | 2 (100)| | | 1 | UPDATE | TEST | | | | | | 2 | TABLE ACCESS BY INDEX ROWID| TEST | 1 | 28 | 2 (0)| 00:00:01 | | 3 | INDEX RANGE SCAN | TEST_DT_IND | 1 | | 1 (0)| 00:00:01 | | 4 | TABLE ACCESS BY INDEX ROWID| ACCT | 1 | 26 | 4 (0)| 00:00:01 | | 5 | INDEX RANGE SCAN | INDX_ACCT_DT | 1 | | 3 (0)| 00:00:01 | --------------------------------------------------------------------------------------------- Full SQL Text SQL ID SQL Text ------------ ----------------------------------------------------------------- 51szt7b736bm UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL, 0) + NVL(ACCT_DR_BAL, 0)) FROM ACCT WHERE ACCT_TRN_DT = (:B1 ) AND PB RN_ACC_NB = ACCT_ACC_NB(+)) WHERE TEST_BATCH_DT = (:B1 )
Thank you for taking your time to answer my question.
ConcerningOracle Lover3 wrote:
How will I know (from Plan 1 and Plan 2) whose execution plan chose for the current run?Since you're already on 10.2, you can identify the actual execution plan by checking in V$ SESSION SQL_ID and SQL_CHILD_NUMBER column. This can be used to identify the plan in V$ SQL_PLAN (columns SQL_ID and CHILD_NUMBER) and in 10g, you can use the convenient DBMS_XPLAN. Function DISPLAY_CURSOR for the information of the real plan using these two parameters.
Kind regards
RandolfOracle related blog stuff:
http://Oracle-Randolf.blogspot.com/SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676 /.
http://sourceforge.NET/projects/SQLT-pp/ -
Changing table via the package with immediate execution (problem)
Hello
I have a unusual problem. I have a package that contains the procedure that via execute immediate statement, creates a table on which he performs different actions for example:
-alter table some_owner.dummy_table noparallel
-create index some_owner.idx_name on some_owner.dummy_table (column)...
But I only managed to run move and create synonym table/public via execute immediate statement. Actions as alter table and create index fails with error ORA-01031: insufficient privileges.
Note If call these commands outside the package (a simple script) this all done OK.
I found a way, where I set the AUTHID CURRENT_USER command create package statement. In this way all the actions executed OK.
I wonder why I can't change the table via the package with immediate execution on a table that is in the tablespace "SOME_TABLESPACE" and the title of owner "SOME_OWNER", without putting the AUTHID command on the package.
There must be a problem why a package cannot change the table which is owned by the user 'SOME_OWNER '.
All useful responses would be appreciated.
I have a unusual problem.
No - you don't have. This question has been answered SEVERAL times on this forum and others.
But I only managed to run move and create synonym table/public via execute immediate statement. Actions as alter table and create index fails with error ORA-01031: insufficient privileges.
OK - your username doesn't have privileges to do these operations or only received privileges through roles.
Roles are DISABLED in named PL/SQL blocks that use of the AUTHOR's rights.
Note If call these commands outside the package (a simple script) this all done OK.
I found a way, where I set the AUTHID CURRENT_USER command create package statement. In this way all the actions executed OK.
Of course - the roles are NOT disabled in named PL/SQL blocks that use the rights of the APPELLANT or in anonymous blocks.
I wonder why I can't change the table via the package with immediate execution on a table that is in the tablespace "SOME_TABLESPACE" and the title of owner "SOME_OWNER", without putting the AUTHID command on the package.
Well now you know!
-
Concerned by several users, reading files interfering with write access to the files
I have a LV MY application that will run in several places/computers. Each will create a single HTML report and update frequently. These HTML files will be accessed and combined by another application of LV in a new HTML file that will be updated frequently. All HTML files could be opened by a user at any time in a web browser.
What concerns me, it's HTML reports could be avoided by a user, or the application of the combination to be written by the app MY? If the user or application combining a box open report she always written by the app MY? It goes the same for the app combining prevented to be written if a user has his open output HTML code?
Each HTML file can only be written by an application but read by many potential users and/or an app.
All programs run independently and asynchronously. Each application runs on its own computer and files all exist in a network location.
Can I do this by controlling all users file privileges? If anyone has read only permissions except the written computer the HTML file that will be enough?
MES Manufacturing Execution System is
Thank you
Judd
I guess as long users see the reports with a web browser, it should be no problem.
Browsers Web do not "lock" a file when they open it like Word or Excel because web browsers are not and should not modify or change the file somehow.
If only one person could display a web page to internet time would not work as we know it.
But if you're worried about it use LabView to lock files during execution of the program. Only in this way, users can open the file as read-only if they use something that can change the files. If you use the standard LabView open file read/write vi passing a file reference, then this will be done automatically.
-
Question about several popular vm with the same kernel version
So, I have been informed that ESX is smart enough for to run several virtual machines with the exact same kernel that it loads only one instance of the kernel in memory for all of them so that it saves space in RAM. This seems quite remarkable to me, and I'd like to see if VMWare has any white papers or other documents on this. I'd like to believe it's true, but it seems incredible to believe.
Is this really how ESX functions? If I have 10 XP SP3 machines with the same level and exact same version of the kernel patch, VMWware won't really load only one instance of the core XP in RAM to separate the 10 machines? If he does that, how handles when 10 machines all want access to the same statement in kernel mode at the same time separate?
Welcoem to the Forums - ESX will actually 10 instances of the core of the customer even if they are the same OS - but once loaded using Transparent Page Sharing the vmkernel (the o/s of the ESX Server) can recognize identical pages and store them a time-read only memory - if the virtual machine tries to write to that page a copy and writing is done - if this new page is another page in memory that one instance is maintained. This saves a TON of memory-
If you find this or any other answer useful please consider awarding points marking the answer correct or useful
-
Merger of statement: with several Update statement.
Hello
I'm trying under the merge statement. However to get the error "not correctly completed 0ra-00933 sql command.
In fact, my join conditions are the same, but I wanted to update the different columns based on the different places where clause in the update statement.
for example.
FUSION
IN abc3 tgt
With the HELP of abc CBC
WE (src.cust = tgt.cust)
WHEN MATCHED
THEN
UPDATE
SET tgt.sales = src.sales
where tgt.cust = 'Cust3'
UPDATE
SET tgt.sales1 = src.sales
where tgt.cust = 'Cust2';
Please let me know if there is no work around for this.Hi, pm
You can try this please.
MERGE INTO ABC3 TGT USING ABC SRC ON (src.cust = tgt.cust) WHEN MATCHED THEN UPDATE SET TGT.SALES = DECODE(TGT.CUST,'Cust3',SRC.SALES,TGT.SALES), TGT.SALES1 = DECODE(TGT.CUST,'Cust2',SRC.SALES,TGT.SALES1) WHERE TGT.CUST='Cust3' OR tgt.cust='Cust2';
Maybe you are looking for
-
How to change from'Mark for deletion "To"Delete immediately"
Is it possible to change this without doing a uninstall and reinstallation of Thunderbird from scratch? I can't find anything in the options, but I know that it gives a choice during installation. Is there an equivalent of the Firefox about:config wh
-
does not load the pages of the last session - 2015 Mac Book pro
Hello You just bought a new Mac Book Pro 13. Safari and Chrome using for navigation. My user account is admin and in both browsers the classified are marked 'open the pages of last session', but it does not work. need help. Thank you
-
My Satellite U400-100 overheating?
Hello everyone. Toshiba Satellite U400-10o, I bought in August and I was very happy.I liked a lot, but he doesn't have that one problem that is the place that is used instead of the mouse to overheating.At first I thought that the heat is normal, but
-
Visible property node tab Page work does not correctly
I do a vi in which we have a tab with 6 pages control and to move from one page to the next there is control of ring with option for each page to page 1 (page 1 is the default value), at the same time only a single page is visible, so that we can mov
-
Help instructions searching for files and folders said to click on START and then click on SEARCH - the problem is that I can't find NO SEARCH when I after I click START