Oracle - Questions on indexing

If i have order by/group by clauses in my SQL then is it a good idea to crete indexes on the tables?
if in a SQL, there are two tables. both are being joined. One of which is being used in LIKE clause filter. then should i create index on the other table?
if i have a SQL with three tables. table A is getting joined to table B and C. then should i create two indexes (one for each join) or one index only?

Here is a test case that proves you wrong.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> drop table t
  2  /
Table dropped.
SQL> create table t
  2  as
  3  select * from all_objects
  4  /
Table created.
SQL> create index t_idx on t(object_id)
  2  /
Index created.
SQL> exec dbms_stats.gather_table_stats(user, 'T', cascade=>true)
PL/SQL procedure successfully completed.
SQL>  explain plan
  2   for
  3   select owner         ,
  4     object_name   ,
  5     subobject_name,
  6     data_object_id,
  7     object_type   ,
  8     created       ,
  9     last_ddl_time ,
10     timestamp
11     from t
12    order by object_id
13  /
Explained.
SQL> select * from table(dbms_xplan.display)
  2  /
PLAN_TABLE_OUTPUT
Plan hash value: 3778778741
| Id  | Operation                   | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT            |       |   116K|  9339K|  2542   (1)| 00:00:31 |
|   1 |  TABLE ACCESS BY INDEX ROWID| T     |   116K|  9339K|  2542   (1)| 00:00:31 |
|   2 |   INDEX FULL SCAN           | T_IDX |   116K|       |   264   (2)| 00:00:04 |
-------------------------------------------------------------------------------------The selection criteria between Sort or index scan depends on lots of other factors and not as that of what you have mentioned. May be this could be of your interest.
http://www.dba-oracle.com/oracle_news/2004_12_3_webb_oracle_sorting_index_access.htm
Thanks,
Karthick.

Similar Messages

  • Bunch of oracle questions

    Hi Guys,
    I have some oracle questions. What does generating statistics for a table or index
    actually do? And what is the difference between estimate statistics and compute
    statistics 10% or any other percentage?
    How does creating new statistics improve performance?Also, what is brconnect
    used for? i saw it being used for statistics as well as some other things.
    what are the various uses for it?
    And coming to a different topic, can someone tell me the difference between
    the rollback segments concept of oracle 8 and the undo tablespace concepts
    of oracle 9. 
    Thanks in advance.
    Cyrus

    Hi Cyrus,
    Q1: What does generating statistics for a table or index ..
    A1: The generated statistics are used by the cost based optimizer to compute the optimal execution plan for your Sql statements
    Q2: How does creating new statistics improve performance?
    A2: Data in your tables change over time. So, not up to date statistics about this data would mean sub optimal results, computing the optimal exec plan for your Sql statements. That is, why your statistics should be up to date.
    Q3: And coming to a different topic, can someone tell me the  ..
    A3: see http://otn.oracle.com/documentation
    Regards
    Gregor

  • Question: create index indextype is ctxsys.context whith NOLOGGING

    Dear All,
    I would like to ask a question about
    CREATE INDEX <index_name> ON <table_name> ( <index_col> ) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ( ... )maybe you experienced that ctxsys.context index creation takes long time.
    When you create a ctxsys.context index it is obvious to reduce the workload of the RDBMS. In this case I would like to reduce the I/O load with NOLOGGING option.
    Firstly, I try to put the index into a tablespace with no logging option. I don't know why but it is not working. Watching the alert.log file I diagnose that redo log generated simultaneously while index generated (there are no other activity on RDBMS).
    Q1 (optional): Why generating redo on object of NOLOGGING tablaspace ?
    I think there are better solution: use the NOLOGGIN option of the create index command which is very simple to use at column indexes.
    Which unclear to me how should I use in CREATE INDEX .. INDEXTYPE IS CTXSYS.CONTEXT command.
    Fllowing the CREATE INDEX command syntax seems oubvious - but it provides sytax error.
    Maybe this is why CREATE INDEX .. INDEXTYPE IS CTXSYS.CONTEXT needs something different for options: PL/SQL
    example captured (for options):
    begin
    ctx_ddl.create_preference ('mystore', 'BASIC_STORAGE');
    ctx_ddl.set_attribute ('mystore', 'I_INDEX_CLAUSE', 'tablespace users storage (initial 32k) compress 2');
    end;
    CREATE INDEX docs_idx ON my_docs(doc) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('STORAGE mystore');Q: How can I specify NOLOGGING option? In the index command? In the attribute? What is the exact syntax if NOLOGGING is allowed at ctxsys.context?
    Oracle version: 11.1.0.6.0
    Any advice, highly appreciated.
    Istvan

    You have to specify nologging in  storage preference.
    See Avoiding Redo Logging for an Oracle Text Domain Index (Doc ID 432762.1)
    Example:
    begin
    ctx_ddl.drop_preference('my_storage');
    end;
    begin
    ctx_ddl.create_preference('my_storage','BASIC_STORAGE');
    end;
    begin
    ctx_ddl.set_attribute('my_storage', 'i_table_clause','tablespace foo1 storage (initial 5M next 10M pctincrease 0 freelists 24 freelist groups 24) nologging');
    ctx_ddl.set_attribute('my_storage', 'k_table_clause','tablespace foo2 storage (initial 5M next 10M pctincrease 0) nologging');
    ctx_ddl.set_attribute('my_storage', 'r_table_clause','tablespace foo3 storage (initial 5M next 10M pctincrease 0) lob(DATA) store as (nocache nologging) nologging');
    ctx_ddl.set_attribute('my_storage', 'n_table_clause','tablespace foo4 storage (initial 5M next 10M pctincrease 0) nologging');
    ctx_ddl.set_attribute('my_storage', 'p_table_clause','tablespace foo5 storage (initial 5M next 10M pctincrease 0) nologging');
    ctx_ddl.set_attribute('my_storage', 'i_index_clause','tablespace foo6 storage (initial 5M next 10M pctincrease 0) compress 2 nologging');
    end;

  • Embedded SQL against Oracle Question

    Software: Forte 3.0.J.
    Server Platform: HPUX 10.2
    Database: Oracle
    Problem Description: During the course of development, I ran into a
    problem using multiple columns in an sql UPDATE/SET statement. I was trying
    to update a.COLUMN_1 and a.COLUMN_2, which constitute part of the primary
    key of associative TABLE_A (a). In order for me to make the update, I
    needed to use the existing value of a.COLUMN_1 to lookup the new b.COLUMN_1
    in TABLE_B (b). Where a.COLUMN_1 = b.RELATED_COLUMN_1, I am able to find
    each b.COLUMN_2 that correspond to each a.COLUMN_2.
    I was able to resolve the issue by separating the two columns so
    that each had it's own select statement. Theoretically, it appears that
    this shouldn't work, because the SET statement for a.COLUMN_1 would cause
    the a.COLUMN_1 reference in the select statement of a.COLUMN_2 to be
    overwritten.
    In spite of this, I tried it, and it worked. I would like to
    understand why the sql works, and how sql actually executes the statement.
    Here is the sql:
    UPDATE TABLE_A a
    SET a.COLUMN_1 =
    (SELECT DISTINCT b1.COLUMN_1
    FROM TABLE_B b1
    WHERE b1.RELATED_CASE_ID =
    a.COLUMN_1 AND
    b1.RELATED_COLUMN_TYPE_CD = 'NEPHI'),
    a.COLUMN_2=
    (SELECT DISTINCT b2.COLUMN_2
    FROM TABLE_B b2
    WHERE b2.RELATED_COLUMN_1=
    a.COLUMN_1 AND
    b2.RELATED_COLUMN_TYPE_CD = 'NEPHI' AND
    b2.RELATED_COLUMN_2= a.COLUMN_2)
    WHERE a.COLUMN_1 = 100
    The table structure is as follows:
    TABLE_A: (primary keys are bolded) This is an associative table.
    Column_1 and Column_2 comprise the pk of one table; Column_3 and Column_4
    comprise the pk of another table. Assume that the Column_1 and Column_2
    values replacing the original values already exist in the parent table of
    which they form the pk).
    COLUMN_1
    COLUMN_2
    COLUMN_3
    COLUMN_4
    COLUMN_5
    TABLE_B: (primary keys are bolded) This is a reference table.
    COLUMN_1
    COLUMN_2
    RELATED_COLUMN_1
    RELATED_COLUMN_2
    RELATED_COLUMN_TYPE_CD
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    If you do an explain plan or set autotrace on against this update statement,
    you'll find that the select operations are actually executed first by Oracle
    - I believe because of the nature of the transaction. Thus, no problem.
    Brian Wilson
    U.S. Bancorp Piper Jaffray
    [email protected]
    Phone (612) 342-5682
    From: David Pettit[SMTP:[email protected]]
    Reply To: David Pettit
    Sent: Friday, April 30, 1999 1:58 PM
    To: '[email protected]'
    Subject: Embedded SQL against Oracle Question
    Software: Forte 3.0.J.
    Server Platform: HPUX 10.2
    Database: Oracle
    Problem Description: During the course of development, I ran into a
    problem using multiple columns in an sql UPDATE/SET statement. I was
    trying
    to update a.COLUMN_1 and a.COLUMN_2, which constitute part of the primary
    key of associative TABLE_A (a). In order for me to make the update, I
    needed to use the existing value of a.COLUMN_1 to lookup the new
    b.COLUMN_1
    in TABLE_B (b). Where a.COLUMN_1 = b.RELATED_COLUMN_1, I am able to find
    each b.COLUMN_2 that correspond to each a.COLUMN_2.
    I was able to resolve the issue by separating the two columns so
    that each had it's own select statement. Theoretically, it appears that
    this shouldn't work, because the SET statement for a.COLUMN_1 would cause
    the a.COLUMN_1 reference in the select statement of a.COLUMN_2 to be
    overwritten.
    In spite of this, I tried it, and it worked. I would like to
    understand why the sql works, and how sql actually executes the statement.
    Here is the sql:
    UPDATE TABLE_A a
    SET a.COLUMN_1 =
    (SELECT DISTINCT b1.COLUMN_1
    FROM TABLE_B b1
    WHERE b1.RELATED_CASE_ID =
    a.COLUMN_1 AND
    b1.RELATED_COLUMN_TYPE_CD = 'NEPHI'),
    a.COLUMN_2=
    (SELECT DISTINCT b2.COLUMN_2
    FROM TABLE_B b2
    WHERE b2.RELATED_COLUMN_1=
    a.COLUMN_1 AND
    b2.RELATED_COLUMN_TYPE_CD = 'NEPHI' AND
    b2.RELATED_COLUMN_2= a.COLUMN_2)
    WHERE a.COLUMN_1 = 100
    The table structure is as follows:
    TABLE_A: (primary keys are bolded) This is an associative table.
    Column_1 and Column_2 comprise the pk of one table; Column_3 and Column_4
    comprise the pk of another table. Assume that the Column_1 and Column_2
    values replacing the original values already exist in the parent table of
    which they form the pk).
    COLUMN_1
    COLUMN_2
    COLUMN_3
    COLUMN_4
    COLUMN_5
    TABLE_B: (primary keys are bolded) This is a reference table.
    COLUMN_1
    COLUMN_2
    RELATED_COLUMN_1
    RELATED_COLUMN_2
    RELATED_COLUMN_TYPE_CD
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    Nondeposit investment products are not insured by the FDIC, are
    not deposits or other obligations of or guaranteed by U.S. Bank
    National Association or its affiliates, and involve investment
    risks, including possible loss of the principal amount invested.
    Past performance does not guarantee future results. We consider
    our sources reliable. Accuracy and completeness are not guaranteed.
    Information is subject to change. Transactional details should not
    be relied on for tax purposes and do not supersede normal trade
    confirmations or statements. Messaging outside U.S. jurisdictions
    from U.S. Bancorp Piper Jaffray to non-institutional parties is not
    intended for solicitation purposes.
    Electronic mail sent through the Internet is not secure. We will
    not accept time-sensitive, action-oriented messages, transaction
    orders, fund transfer instructions or check stop payments
    electronically.
    If you are not the intended recipient, notify the Sender. This
    information is intended only for the person named above and for
    the purposes indicated. Do not distribute this message without
    written consent of the author. Non-business opinions may not
    reflect opinions of U.S. Bancorp Piper Jaffray and its affiliates.
    U.S. Bancorp Piper Jaffray and its affiliates reserve the right to
    monitor all e-mail.
    Securities products and services are offered through
    U.S. Bancorp Piper Jaffray Inc., member SIPC and NYSE, Inc.,
    a subsidiary of U.S. Bancorp.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Oracle 9i ignores INDEX hint

    Hello,
    I try to convince Oracle to do a index scan rather then a full table scan in a query. To
    do this I created a view on top of the table which simply adds this hint:
    CREATE OR REPLACE VIEW V_FHDDSC3_FACT_DATA_4WEEK AS
    SELECT /*+ INDEX(T P_FHDDSC3_FACT_DATA_4WEEK) */
    T.*
    FROM T_FHDDSC3_FACT_DATA_4WEEK T
    The whole query is here:
    SELECT v_fhddsc3_geography_dim.geog_tag, v_fhddsc3_product_dim.prod_tag,
    v_fhddsc3_time_4week_dim.time_tag, v_fhddsc3_fact_data_4week.m001,
    v_fhddsc3_fact_data_4week.m002, v_fhddsc3_fact_data_4week.m003,
    v_fhddsc3_fact_data_4week.m004, v_fhddsc3_fact_data_4week.m005,
    v_fhddsc3_fact_data_4week.m006, v_fhddsc3_fact_data_4week.m007,
    v_fhddsc3_fact_data_4week.m008, v_fhddsc3_fact_data_4week.m009,
    v_fhddsc3_fact_data_4week.m010
    FROM v_fhddsc3_geography_dim,
    v_fhddsc3_time_4week_dim,
    v_fhddsc3_fact_data_4week,
    v_fhddsc3_product_dim
    WHERE ( v_fhddsc3_geography_dim.geog_key =
    v_fhddsc3_fact_data_4week.geog_key
    AND v_fhddsc3_product_dim.prod_key =
    v_fhddsc3_fact_data_4week.prod_key
    AND v_fhddsc3_time_4week_dim.time_key =
    v_fhddsc3_fact_data_4week.time_key
    AND ( v_fhddsc3_geography_dim.geog_tag IN
    (:"SYS_B_00",
    :"SYS_B_01",
    :"SYS_B_02",
    :"SYS_B_03",
    :"SYS_B_04",
    :"SYS_B_05",
    :"SYS_B_06",
    :"SYS_B_07",
    :"SYS_B_08"
    AND v_fhddsc3_product_dim.hierarchy_level IN (:"SYS_B_09")
    AND v_fhddsc3_time_4week_dim.time_tag IN
    (:"SYS_B_10",
    :"SYS_B_11",
    :"SYS_B_12",
    :"SYS_B_13",
    :"SYS_B_14",
    :"SYS_B_15",
    :"SYS_B_16",
    :"SYS_B_17",
    :"SYS_B_18",
    :"SYS_B_19",
    :"SYS_B_20",
    :"SYS_B_21",
    :"SYS_B_22",
    :"SYS_B_23",
    :"SYS_B_24",
    :"SYS_B_25",
    :"SYS_B_26",
    :"SYS_B_27",
    :"SYS_B_28",
    :"SYS_B_29",
    :"SYS_B_30",
    :"SYS_B_31",
    :"SYS_B_32",
    :"SYS_B_33",
    :"SYS_B_34",
    :"SYS_B_35",
    :"SYS_B_36"
    The execution plan shows a full table scan on T_FHDDSC3_FACT_DATA_4WEEK.
    The index is the primary key of the table containing PROD_KEY, GEOG_KEY and TIME_KEY.
    Why is Oracle 9i ignoring index hints?
    I came across the same problem some months ago, when we migrated one database from 8i to 9i. After that an INDEX_ASC hint was suddenly ignored. We used an index + and INDEX_ASC hint to sort a hierarchical query.
    We had to change the algorithmn and use a Database function to get it sorted right. This is painfull and slow.
    Any ideas?
    Kai

    Kai,
    Remember a hint is just that, a hint to the optimizer, it does not override the execution plan created by the optimizer. Possibilities are that the statistics in the database are out of date, which will affect the Cost based optimizer. Indexes on views are tricky as they would rely on the indexes on the underlying tables.
    Few AskTom links which may help:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1705043::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:313416745628,%7Bhint%7D%20and%20%7Bindex%7D
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1705043::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:641623836427,%7Bhint%7D%20and%20%7Bindex%7D
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1705043::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1197786003246,%7Bhint%7D%20and%20%7Bindex%7D
    Sometimes the full scan can be quicker, than the index depending on the query.
    Regds
    Dave

  • I hate oracle support - transporting index tablespaces

    i exported 9 index tablespaces and ran the import into a database created as a duplicate of the original database (duplicated using RMAN). None of the indexes got created...yes I checked dba_segments.
    I am using 9iR2.
    Any suggestions?

    the intent was to bring over the 9 data tablespaces and the 9 index tablespaces using transportable tablespace -- the amount of data here is 2.5+ Tb. we exported the metadata for all 18 tablespaces and then tried to import that metadata to the new instance. the data came over fine but the indexes are non-existent. oracle support says this should have worked, but surprise, it didn't. it will take 72 hours or more to rebuild the indexes if we have to do it manually, which is why we trying to use transport to begin with. just copying all the files over took 20 hours.
    oracle says my indexes should be there. anyone else try to do this and what did they do to make it happen?

  • APEX app using Oracle Text  to index pages that require authorzation

    Hi Gurus and APEX Dev team
    My team need to develop an APEX App that will index all our documents spread across various servers. Some of the documents require Single sign on access (e.g. KIX.oraclecorp.com) and some require other authorization methods (e.g. Metalink) . The Question is , Is it possible to index the pages that require authorization using Oracle text. If yes How? I have implemented the demo app which can index pages that do not require authorization.
    Thanks a million
    regards
    Bala

    Hello,
    Unless I misunderstand you, the fact that the pages require authentication doesn't really matter, it is the underlying data you want to index correct? If so then you would index them in exactly the same way that you would index any table data using Oracle Text/interMedia.
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Simple Oracle Questions

    Hello All
    I have a simple qusetion.
    I have been developing a .Net application which uses SQL Server 2005 Database.
    Now I am trying to convert it to use Oracle Database.
    I am trying to use the using System.Data.OracleClient namespace so that I can use the OracleConnection and such
    However when I type System.Data. I only get the SQLClient by default.
    Are ther any additional libraries or references that I need to insert into my project in order to access the the System.Data.OracleClient namespace?
    I am using VS 2005 Academic Edition.
    Thanks very mcuh in advance.
    Suzi

    You'll probably have better luck getting answers to .Net questions in this forum:
    ODP.NET
    There are lots of articles and examples here:
    http://www.oracle.com/technology/tech/dotnet/index.html

  • Detail questions about indexes?

    We are trying to reduce coherence index heap use in our application using partitioned cache (we use near but it is the partitioned back tier that holds the indexes) and therefore needs to better understandand some details (we are right now using version 3.6 but will eventually change to 3.7 so if any of the answer are different for the two please indivcate that):
    1. Are any indexes (or some part of them) maintained per partition (would be my guess since it is possible to efficiently apply PartitionFilter) or are they all per node?
    2. Are any part of the indexes in binary form or are both the keys and values in the form of "java objects"?
    Best Regards
    Magnus

    MagnusE wrote:
    Thanks for the info.
    I got a bit confused about your description of the forward and reverse indexes - I would have assumed that what is referred to as "forward index" would map keys to values provided by the extractor and the "reverse index" map values returned by extractors to possibly multiple keys that have extractors returning this value but it seems like it is the other way around or?!
    Hi Magnus,
    what you wrote first is correct.
    The forward index is a map of internal (binary) keys to extracted values. This has the could be stored in the backing map entry, but I don't think it is done as that would make plugging in index implementation with IndexAwareExtractor much more problematic. Too bad, as it would have been a nice optimization.
    The reverse index is a map of extracted values as keys to values of a collection or array (logically a set) of internal (binary) keys of entries the extracted value was extracted from.
    So if you have a NamedCache<K,V> and extracted value type is X, then forward index is Map<Binary<K>,X> and reverse index is a Map<X,Set<Binary<K>>> for unsorted indexes and SortedMap<X,Set<Binary<K>>> in case of sorted indexes.
    The map and set implementations may differ from implementation version to implementation version.
    I don't know what you refer to which would describe it the other way round.
    In our case the indexes seem to occupy a lot more heap than the data itself(!!!). That is quite conceivable if you have attributes which can take lots of different values, as in that case the reverse index will also have many entries, each entry value being a set which is not exactly a lean thing either.
    It is in particular an index containing information about what cache objects that reference what other cache objects (we use this to answer "where used" questions i.e. what objects contains references to object X) that seem to occupy LOTS of space...
    Again, that is lots of different values thus lots of entries in reverse index.
    Do you think that your analysis can be easily extended to extractors returning a collection (as is the case for our "gigantic" index) or do they require more investigation?A collection is just a value. If two collections do not equal by the equals() method, then they will have different reverse index entries. It is quite feasible to implement a forward-only index in case you don't need to filter for equality, but you just want to avoid deserialization.
    >
    With 3.6.1.4 we have done some preliminary tests with different number of partitions and it seems (not fully verified) that it makes a significant difference (fewer partitions = lower index size) so maybe they something has changed from 3.5 (with your analysis I do not see any indication that number of partitions should affect index size or have I missed something to that effect)...
    Number of partitions do not affect index size at the moment, indexes are not partitioned in 3.6. (Probably not even in 3.7). The only case when they would influence index size would be if you had partitioned reverse index (and that would make reverse index footprint possibly worse, but definitely not better) analogously to having more nodes causes higher total index footprint.
    It is a pity that Oracle don't provide this kind of technical information in the documentation - for a this kind of product it is often essential for developers / architects to have as detailed info as possible...
    I don't see what documentation you are really missing. Coherence indexes are instances of SimpleMapIndex which class has a Javadoc. Alexey and I have several times described the structure of indexes on the forum and in the blog. The Coherence book quite aptly describes it. All those descriptions are still valid as index strutures have not significantly changed since 3.0 except that starting with 3.6 you can plug in your own implementation of MapIndex instead of SimpleMapIndex. There was an optimization around 3.5-3.6 time (as far as I remember in one of the 3.5.x patch releases and 3.6) which ensured that you don't have multiple references to the equaling extracted objects (after a request Alexey submitted after one of his blog entries describing index usage), but really that is all, and even that was not a structural change. Semantically, having sparse indexes and forward-only indexes became possible with 3.6 (by plugging in your own implementation), and I don't remember which version introduced not indexing null values which cuts down on size a bit if nulls are frequent and not interesting.
    Best regards,
    Robert

  • Questions about Indexing and Using an Indexing POA

    Although I have only about 50 users, at least 15 of them have in excess of 100,000 messages in their accounts and the POA (version 7.0.2) is regularly slowing to a crawl. (I just know that plans for revolution are fomenting!) I have embarked on a campaign to reduce these accounts by archiving everything off to get mail accounts down to 3000 or fewer pieces. I have achieved user buy-in, but have worked on only a few users so far.
    In another closely related thread, it was suggested to me that the PO speed issues relate to broken indexes. And I suspect that given so many messages, the indexes were never getting fully rebuilt with the default QF POA settings. I am trying to fix that situation in addition to reducing mail account sizes. So, I have set up a second POA on another server and dedicated it to the indexing task. The /qfinterval is set for 1 hour, other /qf switches at default. The POA-QF does no mail delivery, but it does do nightly user upkeep.
    The POA-QF seems to be steadily working away and making progress at reducing the number of unindexed messages. However, I have questions about what I am seeing and what more I can do:
    1. Is the progress I am seeing real progress? For example I have a user with over 100,000 messages to be indexed and every time I check the logs, the count drops by about 500 messages per hourly QF cycle. I assume that if I just let it keep running, it will eventually get caught up and fixed. Not only with this user, but with all the others as well. Will my patience (and theirs) be rewarded? Are there any gotchas I need to prepare for?
    2. One user has recently had virtually all of her messages successfully moved to archive. I can see them in the Archive, and do not see them in the online account. However, now over a week later, QF still shows >130,000 items still left to index for that user. The POA-QF is making slow, steady progress reducing that number, but why is this user's QF count still so high? Does it just need more time, or is there something amiss for this user?
    3. I may want to rebuild indexes for single users from scratch. I have seen the TID 3105742 which tells how to do this: Essentially you turn off mail delivery functions, and make some other switch changes to dedicate the POA to indexing for just a single user, and then you let the POA rebuild the indexes. The implication of that scenario is that the POA is now enjoying exclusive access to the user's databases.
    If I want to use my secondary POA-QF to rebuild a user's index from scratch, does the main POA have to be offline and the user out of GWise? That is, Does the QF process require exclusive access in order to rebuild indexes from scratch?
    Thanks for any thoughts or suggestions.
    Peter Smick

    pgsmick wrote:
    > 1. Is the progress I am seeing real progress? For example I have a user with
    > over 100,000 messages to be indexed and every time I check the logs, the count
    > drops by about 500 messages per hourly QF cycle. I assume that if I just let
    > it keep running, it will eventually get caught up and fixed. Not only with
    > this user, but with all the others as well. Will my patience (and theirs) be
    > rewarded? Are there any gotchas I need to prepare for?
    Set this switch for this indexing POA - /qflevel=999 - this will index
    everything in one run. It will take a long time, but with no qflevel switch you
    are indeed only indexing 500 messages at a time, and if the user has that much
    mail, it might never really catch up.
    >
    > 2. One user has recently had virtually all of her messages successfully moved
    > to archive. I can see them in the Archive, and do not see them in the online
    > account. However, now over a week later, QF still shows >130,000 items still
    > left to index for that user. The POA-QF is making slow, steady progress
    > reducing that number, but why is this user's QF count still so high? Does it
    > just need more time, or is there something amiss for this user?
    >
    This is odd, because really the index count should drop to nothing, but with the
    above switch this might get resolved as well.
    > 3. I may want to rebuild indexes for single users from scratch. I have seen
    > the TID 3105742 which tells how to do this: Essentially you turn off mail
    > delivery functions, and make some other switch changes to dedicate the POA to
    > indexing for just a single user, and then you let the POA rebuild the indexes.
    > The implication of that scenario is that the POA is now enjoying exclusive
    > access to the user's databases.
    Not really - the POA is not enjoying exclusive access to the user's database,
    the indexer is just avoiding an attempt to index anything else.
    > If I want to use my secondary POA-QF to rebuild a user's index from scratch,
    > does the main POA have to be offline and the user out of GWise? That is, Does
    > the QF process require exclusive access in order to rebuild indexes from
    > scratch?
    No - QF never requires exclusive access. That said, you may find that an
    extremely vigorous QF can cause slowdowns for the user.
    Danita
    Novell Knowledge Partner
    Moving GroupWise to Linux?
    http://www.caledonia.net/gwmove.html

  • How do I get Oracle Text to index files on a file server?

    I am new to Oracle (I'm a MS-SQL DBA looking for a Full-Text Search solution that is better than linking to a MS index server.)
    So - Here's the objective:
    I have Oracle Server(Express) installed on a Windows server.
    I would like for Oracle to build a Full-Text Catalog of the files on a separate file server based on file paths in a table in the database.
    (No desire to store terabytes of images and documents inside the database)
    I can get Oracle text up and running, using the URL_Datastore:
    CREATE TABLE files (id NUMBER PRIMARY KEY, issue_id NUMBER, path VARCHAR(255) UNIQUE, ot_format VARCHAR(6), ot_version VARCHAR(10));
    The Compaq server is a remote windows server on my local workgroup, so the fully qualified path is just "compaq" and the URL is valid:
    INSERT INTO files VALUES (9,9,'file://Compaq/FTQ/00000003.pdf',NULL,NULL);
    INSERT INTO files VALUES (13,13,'file://Compaq/FTQ/01.txt',NULL,NULL);
    CREATE INDEX file_index ON files(path) INDEXTYPE IS ctxsys.context
    PARAMETERS ('datastore ctxsys.URL_DATASTORE format column ot_format');
    but when I enter:
    Select * from CTX_User_Index_errors, I see the following errors:
    DRG-11609: URL store: unable to open local file specified by file://Compaq/FTQ/00000003.pdf
    DRG-11609: URL store: unable to open local file specified by file://Compaq/FTQ/01.txt
    Did I miss something?
    Do I need to install anything on the file server?
    I would like to convince my company that Oracle can be much quicker than Microsoft's Indexing Service because it can avoid joining two large result sets (one result set from Full_text (indexing service) and one for specific data contained in fields in the MS-SQL database.) Full Text Searches commonly take 40 - 60 seconds where there are 1.5 million multi-page PDF files for a particular set that I sample search on. Without this massive join, I believe I can get the search to run in under 10 seconds.

    Thank you!
    File_Datastore worked fine.
    I was staying away from File_Datastore because the information I gathered from googling suggested that file_datastore would only work locally.
    Now I just have to get Oracle to pull data out of tables in a MS-SQL database on the local network (don't have a clue yet), and then have it index compiled file paths.
    Then MS-SQL can query Oracle with index and full-text criteria and Oracle can send back a result set
    It may sound like a bad way of performing Full-Text Queries, but anything will be better than the way things are currently running. We are currently performing Full Text Searches on a table that is rebuilt nightly, so the table containing millions of file paths is not live..
    It would be so much better if we just migrated to Oracle, but we currently do not have the resources.

  • Error while running the Oracle Text optimize index procedure (even as a dba user too)

    Hi Experts,
    I am on Oracle on 11.2.0.2  on Linux. I have implemented Oracle Text. My Oracle Text indexes are fragmented but I am getting an error while running the optimize_index error. Following is the error:
    begin
      ctx_ddl.optimize_index(idx_name=>'ACCESS_T1',optlevel=>'FULL');
    end;
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CTX_DDL", line 941
    ORA-06512: at line 1
    Now I tried then to run this as DBA user too and it failed the same way!
    begin
      ctx_ddl.optimize_index(idx_name=>'BVSCH1.ACCESS_T1',optlevel=>'FULL');
    end;
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CTX_DDL", line 941
    ORA-06512: at line 1
    Now CTXAPP role is granted to my schema and still I am getting this error. I will be thankful for the suggestions.
    Also one other important observation: We have this issue ONLY in one database and in the other two databases, I don't see any problem at all.
    I am unable to figure out what the issue is with this one database!
    Thanks,
    OrauserN

    How about check the following?
    Bug 10626728 - CTX_DDL.optimize_index "full" fails with an empty ORA-20000 since 11.2.0.2 upgrade (DOCID 10626728.8)

  • Suggestion: Oracle text CONTEXT index on one or more columns ?

    Hi,
    I'm implementing Oracle text using CONTEXT ..... and would like to ask you for performance suggestion ...
    I have a table of Articles .... with columns .. TITLE, SUBTITLE , BODY ...
    Now is it better from performance point of view to move all three columns into one dummy column ... with name like FULLTEXT ... and put index on this single column,
    and then use CONTAINS(FULLTEXT,'...')>0
    Or is it almost the same for oracle if i put indexes on all three columns and then call:
    CONTAINS(TITLE,'...')>0 OR CONTAINS(SUBTITLE,'...')>0 OR CONTAINS(BODY,'...')>0
    I actually don't care if the result is a match in TITLE OR SUBTITLE OR BODY ....
    So if i move into some FULLTEXT column, then i have duplicate data in a article row ... but if i create indexes for each column, than oracle has 2x more to index,optimize and search ... am I wright ?
    Table has 1.8mil records ...
    Thank you.
    Kris

    mackrispi wrote:
    Now is it better from performance point of view to move all three columns into one dummy column ... with name like FULLTEXT ... and put index on this single column,
    and then use CONTAINS(FULLTEXT,'...')>0What version of Oracle are you on? If 11 then you could use a virtual column to do this, otherwise you'd have to write code to maintain the column which can get messy.
    mackrispi wrote:
    Or is it almost the same for oracle if i put indexes on all three columns and then call:
    CONTAINS(TITLE,'...')>0 OR CONTAINS(SUBTITLE,'...')>0 OR CONTAINS(BODY,'...')>0Benchmark it and find out :)
    Another option would be something like this.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9455353124561
    Were i you, i would try out those 3 approaches and see which meet your performance requirements and weigh that with the ease of implementation and administration.

  • Question about Index in data selection

    Hi experts,
    I am reading the documents about index today and find there are some questions confused me. Plz help, thx!
    1 What is the technical structure of index?
    For example, I have a table ztable with 5 fields, F1(key), F2(key). F3. F4.F5. If I create a index on F3,F4, the system will create a copy of this table. Is the structure of this copy as follow?
    F3, F4, pointer(for the lineno of the recorder)
    So this copy will have fewer lines than the ZTABLE and is sorted. If the DB optimizer choose this index in selection, it will be fast for the 2 reasons?
    2 By what is the sequence of the fields in the index determined? I read a BLOG about permance, the author make a example with DB05, and say if the distinct values of certain field is between 1-1000 lines, it is good to set a secondary index for the field.
    I wonder, if the F3 has only 5 distinct value for all the data in the ZTABLE, and the F4 has 100 distinct value. Which one should be the first field in the index and why?
    Thx!!~

    Hi,
    1 What is the technical structure of index?
    For example, I have a table ztable with 5 fields, F1(key), F2(key). F3. F4.F5. If I create a index on F3,F4, the system will create a copy of this table. Is the structure of this copy as follow?
    F3, F4, pointer(for the lineno of the recorder)
    So this copy will have fewer lines than the ZTABLE and is sorted. If the DB optimizer choose this index in selection, it will be fast for the 2 reasons?
    2 By what is the sequence of the fields in the index determined? I read a BLOG about permance, the author make a example with DB05, and say if the distinct values of certain field is between 1-1000 lines, it is good to set a secondary index for the field.
    I wonder, if the F3 has only 5 distinct value for all the data in the ZTABLE, and the F4 has 100 distinct value. Which one should be the first field in the index and why?
    You seem to be correct for some but not all.
    Struture of index will
    for unique key index F3, F4, row id of database
    it could have only one row id when your where condition match with the index then it goes to only index table first and read the row id and read record directly from the row id.
    But for non unique key table store all the F3, F4, row id of record which math value of F1 and F4. It can have multiple value.
    When your where condition math with condition partially ie left part of the key or whole part key then read all match record from the index table and then read the database physical table and check for addation where condition if any.
    Index is determine on basis of the where condtion which is most left part of index will match.
    if your where condition F4 and in your index has f3 f4 then index will not consider, It create gap between index condition and read whole table database. But if you consider f3 then only it consider the index to read because it match the left most part with index fields.
    For more details How to create secondary index ? Search for blog in sdn I reply many time.

  • Queries on oracle hang after index creation

    Hi,
    I have a problem where queries issued on an oracle database hang after I create indexes on some of the tables used by these queries.
    I have a script where I drop indexes :
    DROP INDEX EVP_PCON00_CDSITC_IX;
    DROP INDEX EVP_PCS202_STIMP1_IX;
    DROP INDEX EVP_PECT00_ONAECT_IX;
    DROP INDEX EVP_PVAL01_ONAVAL_IX;
    After this script I load data into those tables.
    Then I launch another script where I recreate the indexes I just dropped :
    CREATE INDEX EVP_PCON00_CDSITC_IX  ON EVP_PCON00(CDSITC) TABLESPACE TS_ODS_INDEX;
    COMMIT;
    CREATE INDEX EVP_PCS202_STIMP1_IX  ON EVP_PCS202(STIMP1) TABLESPACE TS_ODS_INDEX;
    COMMIT;
    CREATE INDEX EVP_PVAL01_CDORIV_IX  ON EVP_PVAL01(CDORIV) TABLESPACE TS_ODS_INDEX;
    COMMIT;
    When the script ends, I try to execute a query using some of the tables I created indexes on :
    SELECT ...
    FROM ....
    WHERE ....
    The query never return a result set, it just hangs, I look at the session browser in toad and the scan of the first table used in the query hangs.
    When I drop those indexes and re execute the query everything works fine.
    Thanks
    Edited by: 946359 on Jul 13, 2012 9:20 AM

    This is the result I get :
    Execution Plan
    Plan hash value: 1198043594
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 1343 | 12 (17)| 00:00:01 |
    | 1 | HASH UNIQUE | | 1 | 1343 | 12 (17)| 00:00:01 |
    |* 2 | HASH JOIN OUTER | | 1 | 1343 | 11 (10)| 00:00:01 |
    | 3 | NESTED LOOPS OUTER | | 1 | 1257 | 9 (12)| 00:00:01 |
    | 4 | NESTED LOOPS OUTER | | 1 | 1033 | 8 (13)| 00:00:01 |
    | 5 | NESTED LOOPS OUTER | | 1 | 809 | 7 (15)| 00:00:01 |
    |* 6 | HASH JOIN | | 1 | 585 | 6 (17)| 00:00:01 |
    | 7 | NESTED LOOPS | | | | | |
    | 8 | NESTED LOOPS | | 1 | 490 | 3 (0)| 00:00:01 |
    | 9 | TABLE ACCESS FULL | EVP_PTIP00 | 1 | 452 | 2 (0)| 00:00:01 |
    |* 10 | INDEX RANGE SCAN | EVP_PTIC00_CDROLE_IX | 1 | | 1 (0)| 00:00:01 |
    |* 11 | TABLE ACCESS BY INDEX ROWID| EVP_PTIC00 | 1 | 38 | 1 (0)| 00:00:01 |
    | 12 | TABLE ACCESS FULL | EVP_PTIF00 | 1 | 95 | 2 (0)| 00:00:01 |
    |* 13 | TABLE ACCESS BY INDEX ROWID | EVP_PTAB00 | 1 | 224 | 1 (0)| 00:00:01 |
    |* 14 | INDEX RANGE SCAN | EVP_PTAB00_CLTABL_IX | 1 | | 1 (0)| 00:00:01 |
    |* 15 | TABLE ACCESS BY INDEX ROWID | EVP_PTAB00 | 1 | 224 | 1 (0)| 00:00:01 |
    |* 16 | INDEX RANGE SCAN | EVP_PTAB00_CLTABL_IX | 1 | | 1 (0)| 00:00:01 |
    |* 17 | TABLE ACCESS BY INDEX ROWID | EVP_PTAB00 | 1 | 224 | 1 (0)| 00:00:01 |
    |* 18 | INDEX RANGE SCAN | EVP_PTAB00_CLTABL_IX | 1 | | 1 (0)| 00:00:01 |
    | 19 | TABLE ACCESS FULL | EVP_PRIB00 | 1 | 86 | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - access("EVP_PRIB00"."NOTIER"(+)="EVP_PTIP00"."NOTIER")
    6 - access("EVP_PTIF00"."NOTIER"="EVP_PTIP00"."NOTIER")
    10 - access("EVP_PTIC00"."CDROLE"='EMP')
    11 - filter("EVP_PTIC00"."CDDDRX"='CL' AND "EVP_PTIP00"."NOTIER"="EVP_PTIC00"."NOTIER")
    13 - filter("EVP_PTAB00_SITF"."CDTABL"(+)="EVP_PTIP00"."CDSITF")
    14 - access("EVP_PTAB00_SITF"."CLTABL"(+)='SITF')
    15 - filter("EVP_PTAB00_TITR"."CDTABL"(+)="EVP_PTIP00"."CDTITR")
    16 - access("EVP_PTAB00_TITR"."CLTABL"(+)='TITR')
    17 - filter("EVP_PTAB00_RMAT"."CDTABL"(+)="EVP_PTIP00"."CDRMAT")
    18 - access("EVP_PTAB00_RMAT"."CLTABL"(+)='RMAT')

Maybe you are looking for

  • How to add pictures in CCM for items in SRM_EXTRAXTED_CATLG

    Hi guys (and girls of course), Best wishes for 2007 for all of you. I've got following issue I've been struggling with: I'm trying to add a picture to items in CCM, but for items coming from R3 (replicated to SRM). I want to use the standard PICTURE/

  • IPhone 4 won't turn on! Help

    My iPhone was working just an hour ago and I went for a nap for 15 minutes and woke up to my phone not working. It's happened before but I just kept pushing the menu and lock button and it worked but this time it won't! Help?!

  • BI SQL Tuning

    Hi Everybody, Our developer is facing problem tuning a BI Report Query. It is running in less than 30 mins on TEST server without any hint and within 2-3 mins with parallel hint. Unfortunately, it is taking 3 hrs 20 min on PROD server after a monthly

  • Problem in FOR ALL ENTRIES IN statement

    Hi Abaper, I have a problem in FOR ALL ENTRIES IN statement. I have a table /ccsht/na_estadi in this table for the particulat date there are 14 records, but my internal table read only 5 record. Below is my code: SELECT sociedad          xhotel_id   

  • Error while enabling  forien key constraint

    HI forum, I am facing a problem while enabling constraint..pls see the statement below. SQL> alter table EVENT enable validate constraint EVENT_4FK; alter table EVENT enable validate constraint EVENT_4FK ERROR at line 1: ORA-02298: cannot validate (A