My Question is, since this 3 indexes has two columns "Bus_unit and Md_code", which index can i delete. Will they effect on database performance, if i delete one of them?
I have to write a procedure that accepts schema name, table name and column value as parameters....I knew that i need to use metadata to do that deleting manually.
I am on 11.2.0.3 Enterprise Edition. We are using the new feature "Composite Domain Index" for a Domain index on a very large table (>250.000.000 rows). It really works with mixed queries. We added two number columns using FILTER BY.We have lots of DML on this table. Therefore, we are executing synchronize and optimize once the week. The synch behaves pretty normal. But "optimize_index" takes a very very long time to complete. I have switsched on 'logging' for the optimize process. The $I table takes some time but is finished normally. But the optimization of the $S table (that is the table created for the CDI feature) is running over 12 hours now - and far from being finished. From the logfile, I can see that it optimizes 1000 rows every 20 minutes. Here is the output of the logfile:
Oracle Text, 11.2.0.3.0 14:33:05 06/26/12 begin logging 14:33:05 06/26/12 event 14:33:05 06/26/12 process $N for optimize: SEQDEV.GEN_GES_DESCRIPTION_CTX_I 14:33:16 06/26/12 14:33:16 06/26/12 [code]....
I haven't found a recommendation from Oracle not to use "optimize_index" for Domain Indexes with CDI. But in my case, it would be much faster just to drop and recreate the Domain Index in question.
I have a huge table (about 60 gb) partition over range. The index on this table is global index created on 4 columns together. I have a query which is running very slowly. The explain plan is showing the use of this global index.Explain plan is not showing pstart and pend because the index is global.
I am facing the error "ORA-01502: index or partition of such index is in unusable state " while loading the text data using sql loader with direct path (direct = Y ,rows = 10000) option. Table consists an composite non unique index. If I query the dba indexes for the effected index it shows the index status as VALID. There was no maintaince done on the effected table or index. I have tried loading the same data using conventional path but didn't found any issues for the same.
where @var is user supplied input at runtime...We had a index on a.c2 . The CBO would use this index to generate an opitimised query plan.We found some records from table "b" were dropping due to inner join. So we made a change in join. It'd be like
a.c1(+)=b.c1 and nvl(a.c2,@var)=@var
This query is no longer using the index, instead its doing a full table scan causing the query to slowdown.I have tried creating index on nvl(a.c2,'31-dec-9999')
But the CBO won't use it.Anyway to create index on this col so that full table scan can be avoided?
We have occurrences of enq : TX - index contentions in the database. Using the SQL ID, we have identified the INSERT statement and the table which they are trying to insert.
This table has almost 25 different indexes, some of which are unique as well.I am wondering how to identify the actual index causing issue, out of these 25 indexes.
Is there any way to pin point to the name of index which is causing the lock?My plan is, once the index is identified, I would like to check the extents and inittrans and other attributes of this index to fix.
Let's consider such table that all rows fit into single block:
SQL> create table test as select rownum id, '$'||rownum name from dual connect by level <= 530; Table created. SQL> create index i_test on test(id); Index created. SQL> SQL> begin
[code].....
why does approach with full scan take longer even if table occupies only one data block? PS. 11gR2
We have a bunch of tables with FKs but we do not have the 'on delete cascade' option on these FKs. If I want to delete records in the database do I have to write delete statements for each table starting with the lowest child or is there a cascade option I can use with the delete statement?
what is the error in this procedure.I am getting error where s.msg_id = Tbl_Repo_Salo (i.msg_id));
Create or replace Procedure Proc_Stg_Clear(P_Err_Code OUT NOCOPY number, P_err_msg OUT NOCOPY varchar2) as v_count number; Type Repo_Salo is table of Tbl_Tml_msg_Salo_Stg%ROWTYPE; Type Repo_Smb is table of Tbl_Tml_msg_SMB_Stg%ROWTYPE;
i have one question that why oracle not set high water mark when we delete data from a table and commit it, on the other hand it set in case of truncate.both of these statement release physical structure(in case of delete after commiting)
i have a problem that i have created a table named PROJECT and structure is like- CREATE TABLE PROJECT ( id VARCHAR2(250 BYTE) NOT NULL, NAME VARCHAR2(250 BYTE) NOT NULL, COMPID NUMBER NOT NULL,
[code]...
and this table is created in some number of different database then i want to delete the not null constraint of "id" column and there is 3 not null constraint in my table and i didnot gave name at the time of creation, so we cant delete it by its name in the script because there will be different name in another database for the same constraint. i want to make a script to delete the not null constraint because it is the part of my script.
how should i get proper information for deleting the constraint. and i used "user_constraints" but it shows same information for the all three "not null" constraint.
this is my trigger..SQL> create or replace trigger drop_trigger
2 before drop on database 3 declare 4 PRAGMA AUTONOMOUS_TRANSACTION; 5 BEGIN 6 INSERT INTO ddl_log 7 SELECT ora_sysevent,ora_dict_obj_type, ora_dict_obj_owner, 8 ora_dict_obj_name,USER,SYSDATE,to_char(sysdate,'hh24:mi:ss') 9 FROM dual; 10 commit; 11 raise_application_error(-20090,'you can not drop'); 12 end; 13 /
DÚclencheur crÚÚ. when a user enter a "drop table" for exemple, the trigger is run but we have this error message
SQL> drop table fg; drop table fg * ERREUR Ó la ligne 1 : ORA-00604: une erreur s'est produite au niveau SQL rÚcursif 1 ORA-20090: you can not drop ORA-06512: Ó ligne 9
From plan I would expect the delete command to be processed very quickly, however it does huge amounts of db block gets. I assume this is because of deleting the row from other structures (indexes, foreign keys in tables etc.) How can I find out which object scan caused the db block gets ?
SQL> delete from messages2 where id = 11004240718; 1 row deleted. Elapsed: 00:00:03.79 Execution Plan ---------------------------------------------------------- Plan hash value: 140582024
, we have used alter table to change the constraint in on delete cascade. there is two option. what is different between both ofthem. Example:1)Alter table t3 add constraint t2_F foreign key (id) references t2(id,column2,column3) on delete cascade ;or2)Alter table t3 add constraint t2_F foreign key (id) references t2 on delete cascade ;
know first one that particular column will set to on delete cascade.What is the use of second one in this case we are not using column name in "foreign key (id) references t2 on delete cascade ;"
I can delete the old archives with extension arc. Today, when I consult V$RECOVERY_FILE_DEST, there are files with today date. Can I delete these files, without danger the database?
I'm attempting to write some SQL to delete a record where it doesn't exist in one of three other tables. My SQL is below:
SELECT COUNT(*) FROM GAZETTEER_ADDRESSES WHERE NOT EXISTS ( SELECT MEDICALS.*, REVIEWS.*, ADDRESS_HISTORIES.* FROM MEDICALS INNER JOIN REVIEWS ON MEDICALS.GADDRE_IDENTIFIER = REVIEWS.GADDRE_IDENTIFIER JOIN ADDRESS_HISTORIES ON REVIEWS.GADDRE_IDENTIFIER = ADDRESS_HISTORIES.GADDRE_IDENTIFIER WHERE GAZETTEER_ADDRESSES.IDENTIFIER = MEDICALS.GADDRE_IDENTIFIER);
When I attempt to run this I receive the following error: ORA-00600: internal error code, arguments: [qcopcovm2], [0], [], [], [], [], [], []
I know it's not generally a good idea to delete records but in this case a large number of cases are incorrect and need to be reinserted and this is the quickest way of doing it.
I am trying to run following sql query,but it is throwing following error.
SQL> delete from b$gc_count_temp a INNER JOIN COMPLEMENTS ON b$gc_count_temp.CON NECTION_ID_TEMP=COMPLEMENTS.feature_conn_id 2 WHERE a.current_designation is null and a.current_low is null and a.current _high is null;
delete from b$gc_count_temp a INNER JOIN COMPLEMENTS ON b$gc_count_temp.CONNECTI ON_ID_TEMP=COMPLEMENTS.feature_conn_id * ERROR at line 1: ORA-00933: SQL command not properly ended
2)select client_id, count(*) from TCLIENT_NOTIFICATION_PACK where client_id=1620560178 group by client_id having count(*) > 40 order by 2 desc client_id count(*) ----------- --------- 16205601785128
3) select client_id,clnt_notification_pack_tid -- bulk collect into v_client_id,v_notif_tid from (select clnt_notification_pack_tid, client_id, clnt_notification_pack_typ_tid, crte_dt,
[code]....
4) Iam using the below proc to delete the rows from table, except the 4 rows returned above
declare v_clnt_notification_pack_tid TCLIENT_NOTIFICATION_PACK.CLNT_NOTIFICATION_PACK_TID%type; tYPE t_client_id is table of TCLIENT_NOTIFICATION_PACK.client_id%type; tYPE t_notif_tid is table of TCLIENT_NOTIFICATION_PACK.clnt_notification_pack_tid%type; v_client_id t_client_id; v_notif_tid t_notif_tid;
[code]....
5) After running this procedure, i shud see 5124 records, but i see zero records.
i have a flat file with fixed positions.Records of this file are having like empid empname deptname typeEx:
100 AAAA ADEPT I 101 BBBB BDEPT I 102 CCCC CDEPT U 103 DDDD DDEPT I 104 EEEE EDEPT D
Here value of type would be like I or U or D I have to load this file into oracle table in such a way that
if type value is I then i have to insert into table if type value is U then i have to update this record in table if type value is D then i have to delete this record from table.