Use of nologging clause
Hi, I was trying to use nologging clause to improve performance of DML on one of the table. however I observed that table with nologging option actually decreases the performance :(
please refer to following log.
SQL> create table test_log(id int, name char(40))
2 /
Table created.
Elapsed: 00:00:00.03
SQL> create table test_nolog(id int, name char(40)) nologging
2 /
Table created.
Elapsed: 00:00:00.00
SQL> insert into test_log select ROWNUM*-1,DBMS_RANDOM.STRING('A',1) FROM DUAL CONNECT BY LEVEL <=1000000
2 /
1000000 rows created.
Elapsed: 00:00:13.46
SQL> insert into test_nolog select ROWNUM*-1,DBMS_RANDOM.STRING('A',1) FROM DUAL CONNECT BY LEVEL <=1000000
2 /
1000000 rows created.
Elapsed: 00:00:16.95
SQL> update test_log set id=100
2 /
1000000 rows updated.
Elapsed: 00:00:46.35
SQL> update test_nolog set id=100
2 /
1000000 rows updated.
Elapsed: 00:00:49.43
Insert and update have no impacts whether the tables are created with NOLOGGING or LOGGING clause
It generates the same amount of redo for insert stmts as well as UPDATE stmts
NOLOGGING can help only for the following things
1.CTAS
2.SQL*Loader in direct mode
3.INSERT /*+APPEND*/ ...
SYSTEM@rman 15/12/2008> truncate table test_log;
Table truncated.
Elapsed: 00:00:01.49
SYSTEM@rman 15/12/2008> truncate table test_nolog;
Table truncated.
Elapsed: 00:00:00.67
SYSTEM@rman 15/12/2008> insert into test_nolog select ROWNUM*-1,DBMS_RANDOM.STRING('A',1) FROM DUAL CONNECT BY LEVEL <=1000000;
1000000 rows created.
Elapsed: 00:00:39.80
Execution Plan
Plan hash value: 1731520519
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
| 0 | INSERT STATEMENT | | 1 | 2 (0)| 00:00:01 |
| 1 | COUNT | | | | |
|* 2 | CONNECT BY WITHOUT FILTERING| | | | |
| 3 | FAST DUAL | | 1 | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter(LEVEL<=1000000)
Statistics
3081 recursive calls
41111 db block gets
8182 consistent gets
0 physical reads
60983504 _redo size_
674 bytes sent via SQL*Net to client
638 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
1000000 rows processed
SYSTEM@rman 15/12/2008> commit;
Commit complete.
Elapsed: 00:00:00.03
SYSTEM@rman 15/12/2008> insert into test_log select ROWNUM*-1,DBMS_RANDOM.STRING('A',1) FROM DUAL CONNECT BY LEVEL <=1000000;
1000000 rows created.
Elapsed: 00:00:38.79
Execution Plan
Plan hash value: 1731520519
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
| 0 | INSERT STATEMENT | | 1 | 2 (0)| 00:00:01 |
| 1 | COUNT | | | | |
|* 2 | CONNECT BY WITHOUT FILTERING| | | | |
| 3 | FAST DUAL | | 1 | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter(LEVEL<=1000000)
Statistics
3213 recursive calls
41323 db block gets
8261 consistent gets
2 physical reads
60993120 _redo_ size
674 bytes sent via SQL*Net to client
636 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
1000000 rows processed
SYSTEM@rman 15/12/2008> commit;They simply generate the same anount of redo
If you use APPEND hint you can reduce the INSERT stmt timings
SYSTEM@rman 15/12/2008> truncate table test_nolog;
Table truncated.
Elapsed: 00:00:00.28
SYSTEM@rman 15/12/2008> INSERT /*+ APPEND */ into test_nolog select ROWNUM*-1,DBMS_RANDOM.STRING('A',1) FROM DUAL CONNECT BY LEVEL <=100
1000000 rows created.
Elapsed: 00:00:28.19
Execution Plan
ERROR:
ORA-12838: cannot read/modify an object after modifying it in parallel
SP2-0612: Error generating AUTOTRACE EXPLAIN report
Statistics
3125 recursive calls
8198 db block gets
929 consistent gets
0 physical reads
161400 redo size
660 bytes sent via SQL*Net to client
652 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
1000000 rows processed
SYSTEM@rman 15/12/2008> You can aslo notice significant time difference/redo generated between INSERT and INSERT with append on a NOLOGGING table
Similar Messages
-
Hi,
I would like to know that if we have our database in FORCE LOGGING mode with standby databases,could cause some kind of conflicts if we create then objects with the NOLOGGING clause?? , something like corrupt the standby databases??
The objects that we would like to create with NOLOGGING clause are temporary tables for example, which ones, we don't need a log for they. And it seems it could help to the performance if we set it in NOLOGGING those objects.
But we are not sure if this clause will be ignored or if it could cause confusion??
Thanks in advance,>
CREATE TABLE TABLE_NAME (column_name varchar(2)...) NOLOGGING
Now, using this, the table will be populated, it will be used and then the information will be deleted.
It doesn't matter if the information is not logged and recovered in a recovery database, due to that for us is like a temporary table.
So, the question is: There will be some impact in the database or in the db recovery if we use the object above using NOLOGGING clause??
>
As the table that you are creating is a permanent table, and the database is in logging mode, as written by you in your very first post , the redo will be generated.As the database is in FORCE LOGGING mode, the information will be logged into the redo.So, this information will also be archived and applied to the DR.The NOLOGGING clause won't be having any effect.
Secondly, if the table is going to be populated and then the whole table is going to be deleted then why not use TEMPORARY TABLE.
Refer to [http://download.oracle.com/docs/cd/B14117_01/server.101/b10739/tables.htm#sthref1862]
Anand -
OPEN CURSOR using a WITH clause in the select query
Hi,
I am using Oracle 9i. I have a requirement where I have a REFCURSOR as an OUT parameter for my procedure. I have declared the TYPE and created the procedure.
In the procedure, I am using OPEN <cursor_name> FOR <query>;
Ideally this works in most of the cases that I have tried earlier. However, in the current case I am using a WITH clause in my query to get the results.
I need help in understanding if the above mentioned syntax would not allow me to use the WITH clause in the query.What error do you get , seems to work ok for me on 10g
SQL> begin
2 open :cv for 'with x as (select * from emp) select * from x';
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> print :cv
EMPNO
ENAME
JOB MGR HIREDATE SAL COMM DEPTNO
7521
WARD
SALESMAN 7698 22-FEB-81 1250 500 30
7566
JONES
MANAGER 7839 02-APR-81 2975 20
EMPNO -
How to write a SQL Query without using group by clause
Hi,
Can anyone help me to find out if there is a approach to build a SQL Query without using group by clause.
Please site an example if is it so,
RegardsI hope this example could illuminate danepc on is problem.
CREATE or replace TYPE MY_ARRAY AS TABLE OF INTEGER
CREATE OR REPLACE FUNCTION GET_ARR return my_array
as
arr my_array;
begin
arr := my_array();
for i in 1..10 loop
arr.extend;
arr(i) := i mod 7;
end loop;
return arr;
end;
select column_value
from table(get_arr)
order by column_value;
select column_value,count(*) occurences
from table(get_arr)
group by column_value
order by column_value;And the output should be something like this:
SQL> CREATE or replace TYPE MY_ARRAY AS TABLE OF INTEGER
2 /
Tipo creato.
SQL>
SQL> CREATE OR REPLACE FUNCTION GET_ARR return my_array
2 as
3 arr my_array;
4 begin
5 arr := my_array();
6 for i in 1..10 loop
7 arr.extend;
8 arr(i) := i mod 7;
9 end loop;
10 return arr;
11 end;
12 /
Funzione creata.
SQL>
SQL>
SQL> select column_value
2 from table(get_arr)
3 order by column_value;
COLUMN_VALUE
0
1
1
2
2
3
3
4
5
6
Selezionate 10 righe.
SQL>
SQL> select column_value,count(*) occurences
2 from table(get_arr)
3 group by column_value
4 order by column_value;
COLUMN_VALUE OCCURENCES
0 1
1 2
2 2
3 2
4 1
5 1
6 1
Selezionate 7 righe.
SQL> Bye Alessandro -
How do you use 3 Where Clauses in a query
Hi, i am trying to figure out how to use 3 Where Clauses in a Query where 2 of the Where Clauses uses a Sub query.
Display the OrderID of all orders that where placed after all orders placed by “Bottom-Dollar Markets”.
Order the result by OrderID in ascending order.
First WHERE clause checks for OrderDate and uses a sub query with ALL keyword.
Second WHERE clause use equals and sub query.
Third WHERE clause uses equal and company name.
This is what i have so far but i am pretty confused on how to do this.
My Code for NorthWind:
Select OrderID
From Orders o
Where o.OrderID IN (Select OrderDate From Orders Where Orders.OrderID > ALL
(Select CompanyName From Customers Where CompanyName = 'Bottom-Dollar Markets'));
The book shows how to use the ALL Keyword but not in a Sub query with Multiple Where Clauses.
Select VenderName, InvoiceNumber, InvoiceTotal
FROM Invoices JOIN Vendors ON Invoices.VendorID = Vendors.VendorID
WHERE InvoiceTotal > ALL (Select InvoiceTotal From Invoices Where VendorID = 34)
ORDER BY VendorName;>Where Orders.OrderDate
> ALL (Select
CompanyName
The comparison operator (>) requires compatible data types.
DATETIME is not compatible with VARCHAR string for comparison.
Here is your homework:
SELECT orderid
FROM orders o
WHERE o.orderdate > ALL (SELECT orderdate
FROM orders
WHERE shipvia = (SELECT Max(shipvia)
FROM orders o
INNER JOIN customers c
ON c.customerid =
o.customerid
WHERE
c.companyname = 'Bottom-Dollar Markets'));
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014 -
How to use the Output clause for the updated statment
How to use the output clause for the below update stament,
DECLARE @MyTableVar table(
sname int NOT NULL)
update A set stat ='USED'
from (select top 1 * from #A
where stat='AVAILABLE' order by sno)A
Output inserted.sname
INTO @MyTableVar;
SELECT sname
FROM @MyTableVar;
Here am getting one error incorrect syntax near Output
i want to return the updated value from output clausesee
http://blogs.msdn.com/b/sqltips/archive/2005/06/13/output-clause.aspx
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Need to seek advice on the use of EXISTS clause.
What is this statement trying to do? What is the '1' in the inner SELECT statement means?
DELETE FROM a
WHERE NOT EXISTS (SELECT 1
FROM b
WHERE a.a_id = b.a_id);
What about these 2 statements doing??
SELECT * FROM a WHERE EXISTS (SELECT 1 FROM b WHERE a.a_id = b.a_id);
DELETE FROM a
WHERE EXISTS (SELECT 1 FROM b WHERE a.a_id = b.a_id);have a look at http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:953229842074 for a complete explanation of how an "exists" and an "in" is executed. For "not in" and "not exists", look here: http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:442029737684
greetings
Freek D
Freek and Mona are correct in that the 1 is just a place holder, because you need to SELECT something. However, the EXISTS clause actually returns TRUE or FALSE depending on whether the SELECT statement finds a row.
EXISTS is similar to IN using a SELECT statement. The advantage of EXISTS, particularly when you can use a correlated sub-query, is that it stops looking as soon as it finds a single row that matches the criteria in the SELECT statement, where an IN clause will return all the rows that match, including duplicates -
Use of EXISTS clause in Interface
I want to build an interface from one table but using an exist clause to check the data change in the same table.
In SQL statement it can be expressed as follows
SELECT PB.PROJECT_KEY, COUNT (DISTINCT DW_PROJECT_BUILDING_KEY)
FROM DW_PROJECT_BUILDING PB
WHERE EXISTS
(SELECT 1
FROM DW_PROJECT_BUILDING PB1
WHERE PB1.PROJECT_KEY = PB.PROJECT_KEY
AND PB1.RECORD_STATUS_ID = 1)
AND PB.RECORD_STATUS_ID = 1
AND TRUNC (PB.LOAD_DT) >= '03-OCT-2013'
GROUP BY PB.PROJECT_KEY;
How can I build this SQL with exists clause in the interface ?
ThanksCreate the interface with DW_PROJECT_BUILDING table and give this table a name PB.
Now put one filter on the table with the conditions that you have just mentioned in the query above, with the exist statement.
I assume data from this table is targeted into one more aggregated table: here is the definition for the table:
CREATE TABLE PROJECT_BUILDING_AGGR
(PROJ_BUILD_KEY VARCHAR2(20),
PROJECT_KEY varchar2(20));
perform mapping like :
PROJECT_KEY=PB.PROJECT_KEY
PROJ_BUILD_KEY=count(distinct PB.DW_PROJECT_BUILDING_KEY)
Select IKM as IKM SQL control append.
FLOW control as false.
run the interface, it is giving something like this for me, I hope this is according to your requirement:
insert into
ORACLE_SOURCE.PROJECT_BUILDING_AGGR
PROJ_BUILD_KEY,
PROJECT_KEY
select
PROJ_BUILD_KEY,
PROJECT_KEY
FROM (
select
count(distinct PB.DW_PROJECT_BUILDING_KEY) PROJ_BUILD_KEY,
PB.PROJECT_KEY PROJECT_KEY
from
ORACLE_SOURCE.DW_PROJECT_BUILDING PB
where
(1=1)
And (EXISTS
(SELECT 1
FROM DW_PROJECT_BUILDING PB1
WHERE PB1.PROJECT_KEY = PB.PROJECT_KEY
AND PB1.RECORD_STATUS_ID = 1)
AND PB.RECORD_STATUS_ID = 1
AND TRUNC (PB.LOAD_DT) >= '03-OCT-2013')
Group By PB.PROJECT_KEY
) ODI_GET_FROM -
ORA-32034: unsupported use of WITH clause-issue
hello all,
i am facing some issue when i use with clause and union all operator.
i have created a dummy code to solve this problem..
my code is ----------
with dept_1 as
(select deptno d1 from detp9 where deptno = 20)
select empno from emp9 e,dept_d1 where e.empno = dept_1.d1
UNION ALL
with dept_1 as
(select deptno d2 from detp9 where deptno = 30)
select empno from emp9 e,dept_d2 where e.empno = dept_2.d2.
when i ran this i gort a message-
ORA-32034: unsupported use of WITH clause.
please help me to solve this iisue..
when i ran it separatly without using union/union all it ran sucessfully..
thanks in advance..923315 wrote:
hello all,
i am facing some issue when i use with clause and union all operator.
i have created a dummy code to solve this problem..
my code is ----------
with dept_1 as
(select deptno d1 from detp9 where deptno = 20)
select empno from emp9 e,dept_d1 where e.empno = dept_1.d1
UNION ALL
with dept_1 as
(select deptno d2 from detp9 where deptno = 30)
select empno from emp9 e,dept_d2 where e.empno = dept_2.d2.
when i ran this i gort a message-
ORA-32034: unsupported use of WITH clause.
please help me to solve this iisue..
when i ran it separatly without using union/union all it ran sucessfully..
thanks in advance..Well, i don't see anything about these queries that makes sense.
You are essentially joining emp and dept on EMPNO to DEPTNO ... that doesn't usually make any sense.
How about you step back from the query which is almost certainly incorrect, and explain your tables, their data and what you need as output?
Cheers, -
How to unlock a row if i use FOR UPDATE clause
In procedure if we use FOR UPDATE clause, it will lock particular row and allow only one client to update whereas other client can only fetch data in the same row at that time.
My question is when will it unlock the row, what should we do to unlock the row while writing procedure. Take this example here im using FOR UPDATE clause for client_count, when ll it unlock that particular row in this procedure.
create or replace PROCEDURE newprocedur(inMerid IN VARCHAR2,outCount OUT NUMBER) AS
CURSOR c1 IS
select CLIENT_COUNT from OP_TMER_CONF_PARENT where MER_ID = inMerid FOR UPDATE OF CLIENT_COUNT;
BEGIN
Open c1;
loop
fetch c1 into outCount;
exit when c1%NOTFOUND;
outCount:=outCount+1;
update OP_TMER_CONF_PARENT set CLIENT_COUNT = outCount where current of c1;
end loop;
close c1;
END;Hi,
Basically you are incrementing client_count by 1 , Why you have to fetch row one by one and update? you could just finish that in a single update
UPDATE OP_TMER_CONF_PARENT
SET CLIENT_COUNT = CLIENT_COUNT+1
WHERE MER_ID = inMerid This will increment client_count of all rows by one for the given mer_id;
After updating you have to make the changes permanent so that other users will see the changes you have made.
To lock the row before update you can use same select statement in you cursor
SELECT CLIENT_COUNT
FROM OP_TMER_CONF_PARENT
WHERE MER_ID = inMerid FOR UPDATE OF CLIENT_COUNT;You can further modify the procedure to let other users know if the row is being updated.
Regards
Yoonas -
Why Scalar Subquery expression cannot be used in HAVING clauses?
Hi All,
I'm new to SQL. I'm confused with Scalar Subquery.
Is there anyone who can answer me why Scalar Subquery expression cannot be used in HAVING clauses.
Can you show me a example?
Thanks very much,
Xianyi.Ye
Edited by: 908428 on 2012-1-16 下午7:24Hi,
908428 wrote:
Hi Frank,
Thank you for your quick reply. I also agree with your point.
But when I read the book, "OCA Oracle Database SQL Certified Expert Exam Guide",( link to illegal copies of book removed by moderator )
on Page 359, it said that
Scalar subquery expressions cannot be used in the following locations:
1. In CHECK constraints
2. In GROUP BY clauses
3. In HAVING clauses
4. In a function-based index (which is coming up in Chapter 11)
5. As a DEFAULT value for a column
6. In the RETURNING clause of any DML statement
7. In the WHEN conditions of CASE
8. In the START WITH and CONNECT BY clauses, which we discuss in
Chapter 16.7 and 8 are wrong. Scalar sub-queries can be used in WHEN conditions and START WITH and CONNECT BY clauses. (At least in Oracle 10.2. Is the book based on some earlier version?)
Edited by: BluShadow on 17-Jan-2012 09:08 -
hi,
can we use output of a function in where clause directly ?
i.e
select node(condition1) clause from dual;
clause
occupation='SALARY'
then i want to use this output i.e clause string directly in select stmt.
select * from abc_table where clause
more strictly
select * from abc_table where (select node(condition1) clause from dual)
which is interpreted as
select * from abc_table where occupation='SALARY'
Is there any way to use functions in clause area ???
I tried CURSOR but not workd for this
Thanks in advance,
RupI cant really understand your problem
--fn1 is a function
sql>
select fn1
from dual;
FN1
CLERK
sql>
select * from emp
where job = fn1;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7934 MILLER CLERK 7782 23-JAN-82 1300 10
Message was edited by:
jeneesh -
In Oracle, Can i use if exits clause in a query?
In Oracle, Can i use if exits clause in a query?
For example, "Drop table if exists tablename"
Is the above command valid in oracle?
If not then is there any equivalent for if exists clause?Here is the SP code code that might help you to Drop a table if it exisit, whith out throwing an error if the table is not present.
create or replace PROCEDURE DROP_TABLE(TabName in Varchar2)
IS
temp number:=0;
tes VARCHAR2 (200) := TabName;
drp_stmt VARCHAR2 (200):=null;
BEGIN
select count(*) into temp from user_tables where TABLE_NAME = tes ;
if temp =1 then
drp_stmt := 'Drop Table '||tes;
EXECUTE IMMEDIATE drp_stmt;
end if;
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
END DROP_TABLE;
Call this SP in your Scripts by : CALL DROP_TABLE ('<Table Name>')
Hope this Helps!
Regards,
Kaarthiik -
We have tables that are interval range partitioned on a DATE column, with a partition for each day - all very standard and straight out of Oracle doc.
A 3rd party application queries the tables to find number of rows based on date range that is on the column used for the partition key.
This application uses date range specified relative to current date - i.e. for last two days would be "..startdate > SYSDATE -2 " - but partition pruning does not take place and the explain plan shows that every partition is included.
By presenting the query using the date in a variable partition pruning does table place, and query obviously performs much better.
DB is 11.2.0.3 on RHEL6, and default parameters set - i.e. nothing changed that would influence optimizer behavior to something unusual.
I can't work out why this would be so. It very easy to reproduce with simple test case below.
I'd be very interested to hear any thoughts on why it is this way and whether anything can be done to permit the partition pruning to work with a query including SYSDATE as it would be difficult to get the application code changed.
Furthermore to make a case to change the code I would need an explanation of why querying using SYSDATE is not good practice, and I don't know of any such information.
1) Create simple partitioned table
CREATETABLE part_test
(id NUMBER NOT NULL,
starttime DATE NOT NULL,
CONSTRAINT pk_part_test PRIMARY KEY (id))
PARTITION BY RANGE (starttime) INTERVAL (NUMTODSINTERVAL(1,'day')) (PARTITION p0 VALUES LESS THAN (TO_DATE('01-01-2013','DD-MM-YYYY')));
2) Populate table 1million rows spread between 10 partitions
BEGIN
FOR i IN 1..1000000
LOOP
INSERT INTO part_test (id, starttime) VALUES (i, SYSDATE - DBMS_RANDOM.value(low => 1, high => 10));
END LOOP;
END;
EXEC dbms_stats.gather_table_stats('SUPER_CONF','PART_TEST');
3) Query the Table for data from last 2 days using SYSDATE in clause
EXPLAIN PLAN FOR
SELECT count(*)
FROM part_test
WHERE starttime >= SYSDATE - 2;
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 8 | 7895 (1)| 00:00:01 | | |
| 1 | SORT AGGREGATE | | 1 | 8 | | | | |
| 2 | PARTITION RANGE ITERATOR| | 111K| 867K| 7895 (1)| 00:00:01 | KEY |1048575|
|* 3 | TABLE ACCESS FULL | PART_TEST | 111K| 867K| 7895 (1)| 00:00:01 | KEY |1048575|
Predicate Information (identified by operation id):
3 - filter("STARTTIME">=SYSDATE@!-2)
4) Now do the same query but with SYSDATE - 2 presented as a literal value.
This query returns the same answer but very different cost.
EXPLAIN PLAN FOR
SELECT count(*)
FROM part_test
WHERE starttime >= (to_date('23122013:0950','DDMMYYYY:HH24MI'))-2;
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 8 | 131 (0)| 00:00:01 | | |
| 1 | SORT AGGREGATE | | 1 | 8 | | | | |
| 2 | PARTITION RANGE ITERATOR| | 111K| 867K| 131 (0)| 00:00:01 | 356 |1048575|
|* 3 | TABLE ACCESS FULL | PART_TEST | 111K| 867K| 131 (0)| 00:00:01 | 356 |1048575|
Predicate Information (identified by operation id):
3 - filter("STARTTIME">=TO_DATE(' 2013-12-21 09:50:00', 'syyyy-mm-dd hh24:mi:ss'))
thanks in anticipation
JimAs Jonathan has already pointed out there are situations where the CBO knows that partition pruning will occur but is unable to identify those partitions at parse time. The CBO will then use a dynamic pruning which means determine the partitions to eliminate dynamically at run time. This is why you see the KEY information instead of a known partition number. This is to occur mainly when you compare a function to your partition key i.e. where partition_key = function. And SYSDATE is a function. For the other bizarre PSTOP number (1048575) see this blog
http://hourim.wordpress.com/2013/11/08/interval-partitioning-and-pstop-in-execution-plan/
Best regards
Mohamed Houri -
Using for update clause in VPD(Virtual Private Databases)
Hi,
We are using for update clause in our procedure to explicitly lock rows in a particular table as shown below:
SELECT AMOUNT FROM INTERFACE_TABLE
INTO T_Amount
WHERE ROWID = :B1
FOR UPDATE OF BANK_ACCOUNT_NUM NOWAIT;
But this statement is giving the following error in VPD:
ORACLE error 1733 in FDPSTP
Cause: FDPSTP failed due to ORA-01733: virtual column not allowed here.
We need to lock rows in that particular table until the commit is issued,so as to prevent the updation of the rows which are being processed.
Is there any other way in which this can be achieved.
Thanks & Regards,
Brahmendra KashyapFrom the docs, which you didn't read:
ORA-01733 virtual column not allowed here
Cause: An attempt was made to use an INSERT, UPDATE, or DELETE statement on an expression in a view.
Action: INSERT, UPDATE, or DELETE data in the base tables, instead of the view.
Can you explain why you didn't read the docs? I'm just curious why so many people do absolutely nothing to resolve their problem (they would learn Oracle by doing so) and request to be spoon fed.
Sybrand Bakker
Senior Oracle DBA
Experts: those who did read the documentation.
Maybe you are looking for
-
Applet not running Jama Package.
Hello! I am trying to create an applet which at some point should solve a linear system. I tried using the Jama Package. I have written a program which does exactly the same thing as the applet and everything works fine.However when i try to run the
-
GROUP_CONCAT()
Hi All, Is there an Oracle equivalent of the GROUP_CONCAT function? My problem: Table A: ========= ID NAME ========= 1 Test 1 2 Test 2 Table B: ======= B_ID A_ID PERCENT DESCRIPTION =============================== 1 1 30 Desc1 2 1 70 Desc2 3 2 20 Des
-
Web Services for E-Business Suite 11.5.10.2
Hello, I am trying to enable Web Services based integration for Oracle E-Business Suite 11.5.10.2. Has anyone done this? Would it be possible to share some experience here? Thanks. Rahul
-
G550 stop error 0x0000000a - One Key Recovery don't work
I am getting this IRQ_NOT_LESS_OR EQUAL - BSOD Stop: 0x000000A (0x00000030, 0x00000002, 0x00000000, 0x82F39D46) I can't get into regular or safe mode, startup repair don't work either. When I push the ONEKEY recovery it won't boot into the recove
-
I can't launch any downloaded applications!!! Don't ask for permission
Normally/Before, when i download an app, i click to open, it will pop up a windows to ask me if i want to open it, for it's downloaded from the internet, i will allow it. But now, nothing pop up, and if i launch no matter which app downloaded from th