create b-tree indexes in SSD
Helloin the Data Warehouse database, can I create tree b index on the customer_id in the table customers-> very high cardinality
or because it is MAS is much better as the Bitmap index (even if it's high cardinality)
Thank you very much
Yes, you can create an index b-tree normal, on any column in your table, regardless of the cardinality. If it will be used by the optimizer for a given SQL query is another problem. It will probably not be used in the usual way, you wait, but could be used to Index the Fast scan in some queries if it was cheaper than alternatives.
Instead, you can create a bitmap index as you say, but know that bitmap indexes be locked during inserts. So they should not be used in environments OLTP concurrent transactions, or where you want to bulk load with the parallel flow data.
Anyway if I were in your shoes I would experiment with both. What problem are you trying to solve anyway? Just creating indexes for the good of them is not that constructive. A bitmap index is not very useful in itself. Bitmap indexes are intended to be used in combination with other clues bitmap on the same table, to determine which rows of data meet several conditions in a complex query. While you have the other index bitmap on this table? Already using part index bitmap of your strategy?
I find it always better to work forward to a problem to a solution. That's why I asked if you had a problem that you tried to resolve with this index. Working backward is literally invent a solution and there is a problem it needs hope. And often, this can be a waste of your time, that is, there is no problem that must be solved.
John
Tags: Database
Similar Questions
-
DM 3.1 how to create a Bitmap Index?
How to create a bitmap with SQL Developer Data Modeler 3.1 index? In the relational model, the properties of the General table allows to enumerate the indexes of a table and to clarify some of their attributes as such as columns and uniqueness. In addition, the properties of the plain index allows more options to set the properties of the index. Unfortunately, I'm unable to find the right place to specify that an index is an index of bitmap.
However, maker of data tend to support bitmap indexes because the generated DDL statements for a table with bitmap indices, which was initially imported into the data dictionary, have correct index bitmap creation instructions. However, when I compare all B tree index with bitmap index in Data Modeler I can't find an option that specifies the index type as bitmap. So, I would be very happy if someone could tell me how to create bitmap with Data Modeler 3.1 indices.
Best regards
MiikkaHey Miikka,
physical model is the place where you can define the specifications of database objects created in the relational model. So you open the physical model and you can find the node index under the node for the related table - use dialog for index set to the index of the bitmap image.
Philippe
-
Create a tree of a single object View table
Hi all
I use Jdeveloper 11 g PS2
Can someone tell me how to create a table of tree of a single VO?
Looks like Frank Nimphius has posted an article on this entitled 'how-to create a picture of the tree to a single object View and how to get access backstage for the data lines' but all links to it repoint towards http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html. I couldn't find it on Connotea, nor was it explained in the book the Oracle Fusion developer's Guide.
I have no problem, creating a tree with two table, but it is redundant in my case, because the tree is based on a car that references the table. My association of entity is already created that binds the parent_id column column id. And I have a link to view based on the association of the entity. I also create a view for my VO that filters the parent (parent_id = null) records and criteria applied to the instance of VO in the data model. I also have a detail THAT VO from my view link.
I drag the object instance view my page of the data control panel and select create table tree. In the Edit Connection dialog tree, I press the icon ' green more "to create the level rule tree to the child nodes, and then select the accessor to display the child records and he applies it my rule of high level (normally with two your I get a rule of the child based on the accessor). When I run the page it seems to work a certain number of records but I get duplicate at the end lines and page crashes.
I'm sure it's something simple, I am on here. Any help will be appreciated.
Thank youHello
OTN has got a new infrastructure and ADF Code corner had to be rebuild. I'm working on this week (looks good so far). The URL will change to
http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html
The sample should be back this week
Frank
-
How to find duplicate keys found when error ORA-01452: cannot CREATE a UNIQUE INDEX.
Hi gurus,
I fall for this stupid error
"cannot CREATE a UNIQUE INDEX; duplicate keys found.
It is that the Unique Index key is composed of multiple columns
CREATE A UNIQUE KEY001AUTORISATIONS_APPORT ON TFT_AUTORISATIONS_APPORT INDEX
(AUT_APPORTEUR, AUT_AGENCE, AUT_PRODUIT, AUT_OPTION, AUT_TARIF, AUT_DATE_AUTORISATION)
TABLESPACE KEYS_TFT NOPARALLEL NOLOGGING
Now,.
My question is, how to find duplicates keys blocking Index creation?
Thanks if you can help
Run this query to display the list of the duplicates already existing.
Select AUT_APPORTEUR, AUT_AGENCE, AUT_PRODUIT, AUT_OPTION, AUT_TARIF, AUT_DATE_AUTORISATION, count (1) as cnt
of TFT_AUTORISATIONS_APPORT
Group
AUT_APPORTEUR, AUT_AGENCE, AUT_PRODUIT, AUT_OPTION, AUT_TARIF, AUT_DATE_AUTORISATION
view count (1) > 1
Concerning
NJ
-
Create or replace Index supported?
I could type "create or replace index...". "and found that it worked. Then I went looking for it or not "or replace" is supported the option for 'create index' and can't find anything that tells me that it is. I don't want to use it if it is not supported. Anyone know? I'm using Oracle Database 11 g Release 11.2.0.3.0.
Thank you
Meredith
There are some RDBMS that support certain types of
logic for the index - but Oracle is not among them. CREATE or REPLACE can be used for certain types of objects, but not for the index. -
Privileges to demand for a user to create a CONTEXT index
Hi all
RDBMS: 11.2.0.3
THEN...: OEL 6.3
What are the necessary privileges that must be granted to a user to be able to create a CONTEXT index, for example. I gave the CTXAPP my user, but when I tryied to create the CONTEXT Index with the command below, I got an error message "insufficient privilege.
CREATE INDEXES USR_DOCS. IDX_CTX_TAB_DOCUMENTOS_01 ON USR_DOCS. TAB_DOCUMENTOS (DOCUMENT) INDEXTYPE IS CTXSYS. CONTEXT PARAMETERS ("SYNC (ON COMMIT)");
It depends on whether the user tries to create the index on its own table in its own schema or on someone else table in the schema of someone else. The following table shows the minimal privileges (quota could be smaller) for the user usr_docs create the index on its own table in its own schema and password create the index on the usr_docs table in the usr_docs schema.
Scott@ORCL >-version:
Scott@ORCL > SELECT version banner $ v
2.
BANNER
--------------------------------------------------------------------------------
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
AMT for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
5 selected lines.
Scott@ORCL >-usr_docs privileges:
Scott@ORCL > usr_docs CREATE USER IDENTIFIED BY usr_docs
2.
Created by the user.
Scott@ORCL > users QUOTA UNLIMITED ON ALTER USER usr_docs
2.
Modified user.
Scott@ORCL > GRANT CREATE SESSION, CREATE the usr_docs TABLE
2.
Grant succeeded.
Scott@ORCL >-password privileges:
Scott@ORCL > CREATE USER IDENTIFIED BY password password
2.
Created by the user.
Scott@ORCL > GRANT CREATE SESSION, CREATE ANY INDEX TO password
2.
Grant succeeded.
Scott@ORCL >-user_docs:
Scott@ORCL > CONNECT usr_docs/usr_docs
Connected.
USR_DOCS@ORCL > tab_documentos CREATE TABLE (documento CLOB)
2.
Table created.
USR_DOCS@ORCL > INSERT ALL
2 INTO tab_documentos VALUES ('test data')
3 INTO tab_documentos VALUES ('other things')
4 SELECT * FROM DUAL
5.
2 rows created.
USR_DOCS@ORCL > CREATE INDEX USR_DOCS. IDX_CTX_TAB_DOCUMENTOS_01
2 ON USR_DOCS. TAB_DOCUMENTOS (DOCUMENT)
3 INDEXTYPE IS CTXSYS. FRAMEWORK
4 SETTINGS ("SYNC (ON COMMIT)")
5.
The index is created.
USR_DOCS@ORCL > usr_docs.idx_ctx_tab_documentos_01 DROP INDEX
2.
The index is deleted.
USR_DOCS@ORCL >-password:
USR_DOCS@ORCL > CONNECT password/password
Connected.
MY_USER@ORCL > CREATE INDEX USR_DOCS. IDX_CTX_TAB_DOCUMENTOS_01
2 ON USR_DOCS. TAB_DOCUMENTOS (DOCUMENT)
3 INDEXTYPE IS CTXSYS. FRAMEWORK
4 SETTINGS ("SYNC (ON COMMIT)")
5.
The index is created.
-
Creating a unique index frame on a one-to-many table and search
Hello
I was properly put in place of the full text index on multiple columns on the same table (using the MULTI_COLUMN_DATASTORE preferences), but now I have a situation with a table of one-to-many data collection (with a CF of a lookup table), and I need to get columns through two of these tables. Code example below, several of my chatter after the code block:
I want to be able to create a text index to group these fields:CREATE TABLE SUBMISSION ( SUBMISSION_ID NUMBER(10) NOT NULL, SUBMISSION_NAME VARCHAR2(100) NOT NULL ); CREATE TABLE ADVISOR_TYPE ( ADVISOR_TYPE_ID NUMBER(10) NOT NULL, ADVISOR_TYPE_NAME VARCHAR2(50) NOT NULL ); CREATE TABLE SUBMISSION_ADVISORS ( SUBMISSION_ADVISORS_ID NUMBER(10) NOT NULL, SUBMISSION_ID NUMBER(10) NOT NULL, ADVISOR_TYPE_ID NUMBER(10) NOT NULL, FIRST_NAME VARCHAR(50) NULL, LAST_NAME VARCHAR(50) NULL, SUFFIX VARCHAR(20) NULL ); INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (1, 'Some Research Paper'); INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (2, 'Thesis on 17th Century Weather Patterns'); INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (3, 'Statistical Analysis on Sunny Days in March'); INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (1, 'Department Chair'); INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (2, 'Department Co-Chair'); INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (3, 'Professor'); INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (4, 'Associate Professor'); INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (5, 'Scientist'); INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (1,1,2,'John', 'Doe', 'PhD'); INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (2,1,2,'Jane', 'Doe', 'PhD'); INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (3,2,3,'Johan', 'Smith', NULL); INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (4,2,4,'Magnus', 'Jackson', 'MS'); INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (5,3,5,'Williard', 'Forsberg', 'AMS'); COMMIT;
SUBMISSION_ADVISORS. FIRST NAME
SUBMISSION_ADVISORS. LAST_NAME
SUBMISSION_ADVISORS. SUFFIX
ADVISOR_TYPE. ADVISOR_TYPE_NAME
I looked at DETAIL_DATASTORE and USER_DATASTORE, but examples of Oracle Docs for DETAIL_DATASTORE leave me a little confused. It seems that this should be fairly simple.
Ideally, I try to avoid creating new columns and keeping a minimum shutter adjustments. But I'm open to any suggestion. Thanks for your time and your thoughts.
-JamieI would create a procedure that creates a virtual with labels document, what is the multi_column_datatstore behind the scenes. Then I would like to use this procedure in a user_datastore, so the result is the same for several tables as a multi_column_datastore for a table. I would use auto_section_group or another type of Group of sections, so that you can search from WITHIN as with the multi_column_datastore. Please see the demo below.
SCOTT@orcl_11gR2> -- tables and data that you provided: SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION 2 ( SUBMISSION_ID NUMBER(10) NOT NULL, 3 SUBMISSION_NAME VARCHAR2(100) NOT NULL 4 ) 5 / Table created. SCOTT@orcl_11gR2> CREATE TABLE ADVISOR_TYPE 2 ( ADVISOR_TYPE_ID NUMBER(10) NOT NULL, 3 ADVISOR_TYPE_NAME VARCHAR2(50) NOT NULL 4 ) 5 / Table created. SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION_ADVISORS 2 ( SUBMISSION_ADVISORS_ID NUMBER(10) NOT NULL, 3 SUBMISSION_ID NUMBER(10) NOT NULL, 4 ADVISOR_TYPE_ID NUMBER(10) NOT NULL, 5 FIRST_NAME VARCHAR(50) NULL, 6 LAST_NAME VARCHAR(50) NULL, 7 SUFFIX VARCHAR(20) NULL 8 ) 9 / Table created. SCOTT@orcl_11gR2> INSERT ALL 2 INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) 3 VALUES (1, 'Some Research Paper') 4 INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) 5 VALUES (2, 'Thesis on 17th Century Weather Patterns') 6 INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) 7 VALUES (3, 'Statistical Analysis on Sunny Days in March') 8 SELECT * FROM DUAL 9 / 3 rows created. SCOTT@orcl_11gR2> INSERT ALL 2 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) 3 VALUES (1, 'Department Chair') 4 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) 5 VALUES (2, 'Department Co-Chair') 6 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) 7 VALUES (3, 'Professor') 8 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) 9 VALUES (4, 'Associate Professor') 10 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) 11 VALUES (5, 'Scientist') 12 SELECT * FROM DUAL 13 / 5 rows created. SCOTT@orcl_11gR2> INSERT ALL 2 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) 3 VALUES (1,1,2,'John', 'Doe', 'PhD') 4 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) 5 VALUES (2,1,2,'Jane', 'Doe', 'PhD') 6 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) 7 VALUES (3,2,3,'Johan', 'Smith', NULL) 8 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) 9 VALUES (4,2,4,'Magnus', 'Jackson', 'MS') 10 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) 11 VALUES (5,3,5,'Williard', 'Forsberg', 'AMS') 12 SELECT * FROM DUAL 13 / 5 rows created. SCOTT@orcl_11gR2> -- constraints presumed based on your description: SCOTT@orcl_11gR2> ALTER TABLE submission ADD CONSTRAINT submission_id_pk 2 PRIMARY KEY (submission_id) 3 / Table altered. SCOTT@orcl_11gR2> ALTER TABLE advisor_type ADD CONSTRAINT advisor_type_id_pk 2 PRIMARY KEY (advisor_type_id) 3 / Table altered. SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_advisors_id_pk 2 PRIMARY KEY (submission_advisors_id) 3 / Table altered. SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_id_fk 2 FOREIGN KEY (submission_id) REFERENCES submission (submission_id) 3 / Table altered. SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT advisor_type_id_fk 2 FOREIGN KEY (advisor_type_id) REFERENCES advisor_type (advisor_type_id) 3 / Table altered. SCOTT@orcl_11gR2> -- resulting data: SCOTT@orcl_11gR2> COLUMN submission_name FORMAT A45 SCOTT@orcl_11gR2> COLUMN advisor FORMAT A40 SCOTT@orcl_11gR2> SELECT s.submission_name, 2 a.advisor_type_name || ' ' || 3 sa.first_name || ' ' || 4 sa.last_name || ' ' || 5 sa.suffix AS advisor 6 FROM submission_advisors sa, 7 submission s, 8 advisor_type a 9 WHERE sa.advisor_type_id = a.advisor_type_id 10 AND sa.submission_id = s.submission_id 11 / SUBMISSION_NAME ADVISOR --------------------------------------------- ---------------------------------------- Some Research Paper Department Co-Chair John Doe PhD Some Research Paper Department Co-Chair Jane Doe PhD Thesis on 17th Century Weather Patterns Professor Johan Smith Thesis on 17th Century Weather Patterns Associate Professor Magnus Jackson MS Statistical Analysis on Sunny Days in March Scientist Williard Forsberg AMS 5 rows selected. SCOTT@orcl_11gR2> -- procedure to create virtual documents: SCOTT@orcl_11gR2> CREATE OR REPLACE PROCEDURE submission_advisors_proc 2 (p_rowid IN ROWID, 3 p_clob IN OUT NOCOPY CLOB) 4 AS 5 BEGIN 6 FOR r1 IN 7 (SELECT * 8 FROM submission_advisors 9 WHERE ROWID = p_rowid) 10 LOOP 11 IF r1.first_name IS NOT NULL THEN 12 DBMS_LOB.WRITEAPPEND (p_clob, 12, '
'); 13 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.first_name), r1.first_name); 14 DBMS_LOB.WRITEAPPEND (p_clob, 13, ' '); 15 END IF; 16 IF r1.last_name IS NOT NULL THEN 17 DBMS_LOB.WRITEAPPEND (p_clob, 11, ''); 18 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.last_name), r1.last_name); 19 DBMS_LOB.WRITEAPPEND (p_clob, 12, ' '); 20 END IF; 21 IF r1.suffix IS NOT NULL THEN 22 DBMS_LOB.WRITEAPPEND (p_clob, 8, ''); 23 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.suffix), r1.suffix); 24 DBMS_LOB.WRITEAPPEND (p_clob, 9, ' '); 25 END IF; 26 FOR r2 IN 27 (SELECT * 28 FROM submission 29 WHERE submission_id = r1.submission_id) 30 LOOP 31 DBMS_LOB.WRITEAPPEND (p_clob, 17, ''); 32 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r2.submission_name), r2.submission_name); 33 DBMS_LOB.WRITEAPPEND (p_clob, 18, ' '); 34 END LOOP; 35 FOR r3 IN 36 (SELECT * 37 FROM advisor_type 38 WHERE advisor_type_id = r1.advisor_type_id) 39 LOOP 40 DBMS_LOB.WRITEAPPEND (p_clob, 19, ''); 41 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r3.advisor_type_name), r3.advisor_type_name); 42 DBMS_LOB.WRITEAPPEND (p_clob, 20, ' '); 43 END LOOP; 44 END LOOP; 45 END submission_advisors_proc; 46 / Procedure created. SCOTT@orcl_11gR2> SHOW ERRORS No errors. SCOTT@orcl_11gR2> -- examples of virtual documents that procedure creates: SCOTT@orcl_11gR2> DECLARE 2 v_clob CLOB := EMPTY_CLOB(); 3 BEGIN 4 FOR r IN 5 (SELECT ROWID rid FROM submission_advisors) 6 LOOP 7 DBMS_LOB.CREATETEMPORARY (v_clob, TRUE); 8 submission_advisors_proc (r.rid, v_clob); 9 DBMS_OUTPUT.PUT_LINE (v_clob); 10 DBMS_LOB.FREETEMPORARY (v_clob); 11 END LOOP; 12 END; 13 /John Doe PhD Some Research Paper Department Co-Chair Jane Doe PhD Some Research Paper Department Co-Chair Johan Smith Thesis on 17th Century Weather Patterns Professor Magnus Jackson MS The sis on 17th Century Weather Patterns Associate Professor Williard Forsberg AMS Statistical Analysis on Sunny Days in
March
Scientist PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> -- user_datastore that uses procedure: SCOTT@orcl_11gR2> BEGIN 2 CTX_DDL.CREATE_PREFERENCE ('sa_datastore', 'USER_DATASTORE'); 3 CTX_DDL.SET_ATTRIBUTE ('sa_datastore', 'PROCEDURE', 'submission_advisors_proc'); 4 END; 5 / PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> -- index (on optional extra column) that uses user_datastore and section group: SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD (any_column VARCHAR2(1)) 2 / Table altered. SCOTT@orcl_11gR2> CREATE INDEX submission_advisors_idx 2 ON submission_advisors (any_column) 3 INDEXTYPE IS CTXSYS.CONTEXT 4 PARAMETERS 5 ('DATASTORE sa_datastore 6 SECTION GROUP CTXSYS.AUTO_SECTION_GROUP') 7 / Index created. SCOTT@orcl_11gR2> -- what is tokenized, indexed, and searchable: SCOTT@orcl_11gR2> SELECT token_text FROM dr$submission_advisors_idx$i 2 / TOKEN_TEXT ---------------------------------------------------------------- 17TH ADVISOR_TYPE_NAME AMS ANALYSIS ASSOCIATE CENTURY CHAIR CO DAYS DEPARTMENT DOE FIRST_NAME FORSBERG JACKSON JANE JOHAN JOHN LAST_NAME MAGNUS MARCH PAPER PATTERNS PHD PROFESSOR RESEARCH SCIENTIST SMITH STATISTICAL SUBMISSION_NAME SUFFIX SUNNY THESIS WEATHER WILLIARD 34 rows selected. SCOTT@orcl_11gR2> -- sample searches across all data: SCOTT@orcl_11gR2> VARIABLE search_string VARCHAR2(100) SCOTT@orcl_11gR2> EXEC :search_string := 'professor' PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> SELECT s.submission_name, 2 a.advisor_type_name || ' ' || 3 sa.first_name || ' ' || 4 sa.last_name || ' ' || 5 sa.suffix AS advisor 6 FROM submission_advisors sa, 7 submission s, 8 advisor_type a 9 WHERE CONTAINS (sa.any_column, :search_string) > 0 10 AND sa.advisor_type_id = a.advisor_type_id 11 AND sa.submission_id = s.submission_id 12 / SUBMISSION_NAME ADVISOR --------------------------------------------- ---------------------------------------- Thesis on 17th Century Weather Patterns Professor Johan Smith Thesis on 17th Century Weather Patterns Associate Professor Magnus Jackson MS 2 rows selected. SCOTT@orcl_11gR2> EXEC :search_string := 'doe' PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> / SUBMISSION_NAME ADVISOR --------------------------------------------- ---------------------------------------- Some Research Paper Department Co-Chair John Doe PhD Some Research Paper Department Co-Chair Jane Doe PhD 2 rows selected. SCOTT@orcl_11gR2> EXEC :search_string := 'paper' PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> / SUBMISSION_NAME ADVISOR --------------------------------------------- ---------------------------------------- Some Research Paper Department Co-Chair John Doe PhD Some Research Paper Department Co-Chair Jane Doe PhD 2 rows selected. SCOTT@orcl_11gR2> -- sample searches within specific columns: SCOTT@orcl_11gR2> EXEC :search_string := 'chair' PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> SELECT s.submission_name, 2 a.advisor_type_name || ' ' || 3 sa.first_name || ' ' || 4 sa.last_name || ' ' || 5 sa.suffix AS advisor 6 FROM submission_advisors sa, 7 submission s, 8 advisor_type a 9 WHERE CONTAINS (sa.any_column, :search_string || ' WITHIN advisor_type_name') > 0 10 AND sa.advisor_type_id = a.advisor_type_id 11 AND sa.submission_id = s.submission_id 12 / SUBMISSION_NAME ADVISOR --------------------------------------------- ---------------------------------------- Some Research Paper Department Co-Chair John Doe PhD Some Research Paper Department Co-Chair Jane Doe PhD 2 rows selected. SCOTT@orcl_11gR2> EXEC :search_string := 'phd' PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> SELECT s.submission_name, 2 a.advisor_type_name || ' ' || 3 sa.first_name || ' ' || 4 sa.last_name || ' ' || 5 sa.suffix AS advisor 6 FROM submission_advisors sa, 7 submission s, 8 advisor_type a 9 WHERE CONTAINS (sa.any_column, :search_string || ' WITHIN suffix') > 0 10 AND sa.advisor_type_id = a.advisor_type_id 11 AND sa.submission_id = s.submission_id 12 / SUBMISSION_NAME ADVISOR --------------------------------------------- ---------------------------------------- Some Research Paper Department Co-Chair John Doe PhD Some Research Paper Department Co-Chair Jane Doe PhD 2 rows selected. SCOTT@orcl_11gR2> EXEC :search_string := 'weather' PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> SELECT s.submission_name, 2 a.advisor_type_name || ' ' || 3 sa.first_name || ' ' || 4 sa.last_name || ' ' || 5 sa.suffix AS advisor 6 FROM submission_advisors sa, 7 submission s, 8 advisor_type a 9 WHERE CONTAINS (sa.any_column, :search_string || ' WITHIN submission_name') > 0 10 AND sa.advisor_type_id = a.advisor_type_id 11 AND sa.submission_id = s.submission_id 12 / SUBMISSION_NAME ADVISOR --------------------------------------------- ---------------------------------------- Thesis on 17th Century Weather Patterns Professor Johan Smith Thesis on 17th Century Weather Patterns Associate Professor Magnus Jackson MS 2 rows selected. -
Neat application to create a tree?
Hi all
If I'm in a table:
Step Dependent_Step
100 0
140 100
200 100
200 140
250 100
Can someone suggest a query that would create a nice tree showing the dependencies? (not sure if this is possible)
In this example:
100 is not dependent on the measures
140 depends on 100
200 depends on 100 and 140
250 depends on 100create table tree ( father integer , son integer 4 ); Table created. insert into tree values (100, NULL); 1 row created. insert into tree values (100, 140); 1 row created. insert into tree values (100, 200); 1 row created. insert into tree values (140, 200); 1 row created. SQL> insert into tree values (100, 250); 1 row created. SQL> SQL> SQL> commit; Commit complete. SQL> SQL> select son||' is dependent on '|| father from tree 2 connect by prior father = son; SON||'ISDEPENDENTON'||FATHER -------------------------------------------------------------------------------- 140 is dependent on 100 200 is dependent on 100 200 is dependent on 140 140 is dependent on 100 250 is dependent on 100 is dependent on 100 6 rows selected. SQL>
-
Instructions on creating a tree at apex4
Anyone know where I can find some really good instructions on creating a tree in the apex 4? I have 3 tables (projects, tasks, subtasks) that I try to do in a tree on an apex application.See this link for the information you are looking for: http://hitext.ru/i/doc/tree_query_create.htm#BABJAGJJ
Thank you
Tony Miller
Webster, TXA lady came up to me on the street, pointed at my suede jacket and said: "do you not know that a cow was murdered for that jacket?
' I didn't know there are witnesses ', I replied: "now, I'll have to kill you too. ' -
Data Modeler - cannot create a spatial index
Good day, colleagues!
I have a version 584 of the Modeler of Dala.
Here is her quote Guide of Modeler of Oracle SQL Developer data:
"Properties of spatial definition 3.82.
...
Benchmark ID: Value Oracle Spatial SRID. ...
+ Create Spatial Index: Determines if a spatial index is created. +
Name of the spatial Index: name of the spatial index.
..."
I have a SDO_GEOMETRY column in my table and want to create the spatial index.
The problem is that there is no option "Create Spatial Index" in my space definition properties window. There is only 'The Spatial Index name' option. When I am creating the spatial index manually, I can't, because the option 'Space' for index creation is not active. I checked the table option 'Save as space Table', but it also did not help.
So, I have no way to create a spatial index. How can I do?Hello usamytch,
create spatial index is confusing. We will improve it in future releases. Here are the steps:
(1) creation of index - no need to add columns
(2) create the spatial column definition ('space properties' in the dialog table)
(3) in the definition of the spatial column, you can select the size of the spatial column, coordinate ID system, and you can select one of the existing indexes to be used as a space.
(4) after this index appear as space and you can define the spatial properties in the index dialog box
(5) you must check 'Save as space Table' in order to get meta-space data generated by DDLThere are additional space properties, that you can set in the physical model.
Philippe
-
creating a unique index of instaed of using the primary key index
Hello
I heard in a debate sometimes it is better to create a unique index on a column and use it instead of using the primary key index in oracle. I did not understand what that the reason propely.
Can someone please help me in this topic if it is valid.
Thanks in advanceOn the surface, which does not seem reasonable... Volume of the DML is irrelevent to determine which column is the primary key for a table.
My wild speculation a bit at a reasonable time could someone do...
If you use synthetic primary keys (i.e. the keys generated by sequence) and that your tables are subject to large volumes of inserts such as there is a danger that the block "to the right" will be the source of contention block and worry not about analysis of beach on the column, you can create a reverse on this column (unique or non-unique) key index before creating the primary key constraint and to indicate Oracle to use this existing index to respect the primary key constraint.
Obviously, however, this involves a lot of assumptions to arrive at a reasonable point. There may well be another set of assumptions that could also lead to a valid argument. Or it could be a myth that someone has heard and just repeats.
Justin
-
Creating partitioned local index
Hi all
Planing to run the range-partitioned on a table and creating Local partitioned index, but in the table is seen forced composite primary key thought to previously create Composite Unique Local partitioned index.
Problem is when creating index its error ORA-14039 giving, of course it is not possible as partitioning column is not a subset of columns in a UNIQUE index key.
Is there no workaround solution to create Local partitioned indexes... otherwise I'll be forced to create the overall index part?
Y at - it no drawback if I create Composite Unique Local partitioned indexes including the columns of partitioning on purpose?
There will be no impact if I create the index Composite Unique Local partitioned by including the columns voluntarily on the SQL QUERIES, access this table partitioning?
Please suggest me a workaround solution.
Thank youCREATE TABLE YASIR.CS_RESEARCH (ORDER_NBR NUMBER NOT NULL, ORDER_DETAIL_NBR NUMBER NOT NULL, SESSION_ID VARCHAR2(40), PRODUCT_GROUP VARCHAR2(16) NOT NULL, PRODUCT_SUBGROUP VARCHAR2(16) DEFAULT 'N/A', FORMAT_TYPE VARCHAR2(10) NOT NULL, CONTRIBUTOR VARCHAR2(60) NOT NULL, DOCUMENT_NUMBER VARCHAR2(15) NOT NULL, DOCUMENT_DATE DATE, BILLABLE_PAGES NUMBER, NON_BILLABLE_PAGES VARCHAR2(512), PURCHASED_UNITS VARCHAR2(2000), DELIVERY_METHOD VARCHAR2(6) DEFAULT 'ONLINE', COMPANY_NAME VARCHAR2(120), STATUS VARCHAR2(10) DEFAULT 'NEW', CONTENT_CODE VARCHAR2(15) NOT NULL, CONTENT_CODE_DESC VARCHAR2(60), ITEM_PRICE NUMBER NOT NULL, PAGES_ORDERED NUMBER, LAST_MNT_DATE_TIME DATE NOT NULL, LAST_MNT_OPID VARCHAR2(120) NOT NULL, CREATE_DATE DATE NOT NULL, DML_FLAG CHAR(1) NOT NULL) PARTITION BY RANGE (CREATE_DATE) (PARTITION CS_RESEARCH_2009_Q2 VALUES LESS THAN (MAXVALUE)); ###Split partitions: ALTER TABLE YASIR.cs_research SPLIT PARTITION CS_RESEARCH_2009_Q2 AT (TO_DATE('30-SEP-2007 23:59:59', 'DD-MON-YYYY HH24:MI:SS')) INTO (PARTITION CS_RESEARCH_2007_Q3, PARTITION CS_RESEARCH_2009_Q2); ALTER TABLE YASIR.cs_research SPLIT PARTITION CS_RESEARCH_2009_Q2 AT (TO_DATE('31-DEC-2007 23:59:59', 'DD-MON-YYYY HH24:MI:SS')) INTO (PARTITION CS_RESEARCH_2007_Q4, PARTITION CS_RESEARCH_2009_Q2); ALTER TABLE YASIR.cs_research SPLIT PARTITION CS_RESEARCH_2009_Q2 AT (TO_DATE('31-MAR-2008 23:59:59', 'DD-MON-YYYY HH24:MI:SS')) INTO (PARTITION CS_RESEARCH_2008_Q1, PARTITION CS_RESEARCH_2009_Q2); ALTER TABLE YASIR.cs_research SPLIT PARTITION CS_RESEARCH_2009_Q2 AT (TO_DATE('30-JUN-2008 23:59:59', 'DD-MON-YYYY HH24:MI:SS')) INTO (PARTITION CS_RESEARCH_2008_Q2, PARTITION CS_RESEARCH_2009_Q2); ALTER TABLE YASIR.cs_research SPLIT PARTITION CS_RESEARCH_2009_Q2 AT (TO_DATE('30-SEP-2008 23:59:59', 'DD-MON-YYYY HH24:MI:SS')) INTO (PARTITION CS_RESEARCH_2008_Q3, PARTITION CS_RESEARCH_2009_Q2); ALTER TABLE YASIR.cs_research SPLIT PARTITION CS_RESEARCH_2009_Q2 AT (TO_DATE('31-DEC-2008 23:59:59', 'DD-MON-YYYY HH24:MI:SS')) INTO (PARTITION CS_RESEARCH_2008_Q4, PARTITION CS_RESEARCH_2009_Q2); ALTER TABLE YASIR.cs_research SPLIT PARTITION CS_RESEARCH_2009_Q2 AT (TO_DATE('31-MAR-2009 23:59:59', 'DD-MON-YYYY HH24:MI:SS')) INTO (PARTITION CS_RESEARCH_2009_Q1, PARTITION CS_RESEARCH_2009_Q2); ###Create indexes on cs_research except primary key index CSR_PKEY: alter session set sort_area_size=262144000; -----(250MB Total will be 1GB for 4 parallel process) create index YASIR.CSR_DETAIL_NBR on YASIR.CS_RESEARCH(TO_NUMBER(REPLACE(TO_CHAR(ORDER_NBR,'999999999')||TO_CHAR(ORDER_DETAIL_NBR,'999999999'),' ',''),'999999999999')) LOCAL (PARTITION CS_RESEARCH_2007_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2007_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q2 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q2 TABLESPACE USERS) nologging parallel (degree 4); Index created. create index YASIR.CSR_SESSION on YASIR.CS_RESEARCH(SESSION_ID,ORDER_NBR) LOCAL (PARTITION CS_RESEARCH_2007_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2007_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q2 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q2 TABLESPACE USERS) nologging parallel (degree 4); Index created. create index YASIR.CSR_CREATED on YASIR.CS_RESEARCH(CREATE_DATE) LOCAL (PARTITION CS_RESEARCH_2007_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2007_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q2 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q2 TABLESPACE USERS) nologging parallel (degree 4); Index created. create index YASIR.CSR_DOCUMENT_NUMBER on YASIR.CS_RESEARCH(DOCUMENT_NUMBER) LOCAL (PARTITION CS_RESEARCH_2007_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2007_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q2 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q2 TABLESPACE USERS) nologging parallel (degree 4); Index created. create index YASIR.CSR_STATUS on YASIR.CS_RESEARCH(STATUS) LOCAL (PARTITION CS_RESEARCH_2007_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2007_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q2 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q2 TABLESPACE USERS) nologging parallel (degree 4); Index created. create unique index CSR_PRKEY_IND on YASIR.CS_RESEARCH(ORDER_NBR,ORDER_DETAIL_NBR) LOCAL (PARTITION CS_RESEARCH_2007_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2007_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q2 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q3 TABLESPACE USERS, PARTITION CS_RESEARCH_2008_Q4 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q1 TABLESPACE USERS, PARTITION CS_RESEARCH_2009_Q2 TABLESPACE USERS) nologging parallel (degree 4); ERROR at line 1: ORA-14039: partitioning columns must form a subset of key columns of a UNIQUE index
YasserYasserRACDBA wrote:
I want to create a unique partitioned index Local and use this primary key index.But my main question is if this create_date column will affect all sql queries that are not used in where clause?
Yasser,
your main question should not be about performance queries, but the consequence of adding the CREATE_DATE to the local unique index:
1. you change the meaning of the primary key: adding the CREATE_DATE means that the unique character of ORDER_NBR, ORDER_DETAIL_NBR is only applied by CREATE_DATE. I guess that does not match the business experience that this primary key is supposed to enforce and defeated the original purpose of the uniqueness that is unique values of ORDER_NBR, ORDER_DETAIL_NBR across the table.
2. If you want to use as a key in other tables you must add the CREATE_DATE to all child tables, because you need to refer to the primary key complete a relationship of key foreign primary key.
So the only 'right' way to do this is to use a unique comprehensive index on ORDER_NBR, ORDER_DETAIL_NBR. Of course, this means you must rebuild whenever a partition maintenance is carried out which invalidates the overall index since you use 8i and you cannot use the UPDATE GLOBAL INDEXES clause.
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/ -
Creating a tree in the Apex. I want that the link to an external Site.
I created a tree in the Apex. I want to link to an external site, but the URL is concatenated with the address of the server, is it possible to remove that?
Example: Want to link to google.com on a node. Click the node trying to get to Http://servernameofApexserver//google.comHello
Did you put http:// in your URL? Otherwise, it is considered a relative link.
Hope this helps,
John.
--------------------------------------------
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd -
Hi guys,.
When you look at a b-tree index, Oracle does not make any behind the scenes cached information on the leaf and the branch nodes (node e.g.branch x leads to records between MI and PA, is leaf node has records between NA and NI etc.), so that we don't have to go down the whole tree every time? And if yes, is not it means that the height of the index might not really matter too?
Thank youHello
Although the article posted by Raja is very good but its internal and in accordance with your latest messages, somewhere you mentioned, you start with oracle so maybe a little 'too' I suggest you to read this article that clearly explains the heights of the Index.
http://richardfoote.WordPress.com/category/index-height/
HTH
Aman... -
Portege Z30 - how to create the new partition on SSD
Hello
I have a Toshiba Portege Z30 with a 512 MB SSD. In addition to the C partition, I would D for the work and E for personal stuff.By default, the laptop came with only C, but the disc already has 4 partitions:
-a healthy active recovery of 1.46 GB partition
-c a partition
-a 16 GB Hibernation partition
-a healthy 11.55 GB primary partition called drive HARD recovery when I use MiniTool Partition WizzardI managed to get 300 GB of unallocated space, but I can not use this space to create D and E, apparently because the MBR does not support more than 4 partitions.
Question: should I have all these partitions Toshiba? Is there a workaround for D and E? Can I create a USB drive recovery system and get rid of the recovery partition?
Thank you
Before starting any discussion, I hope you didn t screwed up something. Why?
When you get laptop it has the factory settings and just with the factory settings, you will be able to create a media recovery (DVD or USB depending on the model). I hope this isn't too late now.
Try to create a recovery media as soon as possible please.
Post it please comment how it works. I hope that everything will be OK.
Maybe you are looking for
-
menu bookmarks invisible on the personal bar
My drop down bookmarks menu has disappeard in the bookmarks toolbar. When I try to customize the toolbar, the icon is visible on the toolbar. However, when I press "Done" it disappears again. The bookmarks toolbar items visible. Does anyone have idea
-
S400u - CustomEventMonitor.dll error - Ultrabook Lenovo ideapad S400u
Hello, when I start my lenovo (10 windows), it always send the following error message:Error CustomEventMonitor.dll I have a ultrabook Lenovo ideapad S400u running windows 10 Help, please Thank you Alex Mod edit: System model added to the front of th
-
adding and positioning of the sliders with crslist
Hello I always write my program and having difficluties with the graphic thing and especially with the sliders. I use the cursorlist to add cursors executing according to certain events in my data file, because I have a lot of ugly data, I charge onl
-
Stopped printing in the middle of a big job with ink tanks full, then when turned back on, gave the dreaded U052 printhead error message. I have tried everything given by Canon to restart the printer, nothing works. It throws on me that maybe my ink
-
Enumeration e = FileSystemRegistry.listRoots(); while (e.hasMoreElements()) { root = (String) e.nextElement(); Logger.logEventInfo("File System Registry: " + root); if (root.equalsIgnoreCase("sdcard/")) { sdCardPresent = true; break; } } If I put a b