When does MaxDB use Index strategy?

Hello,
I want to improve the performance of my MaxDB. So I tried to create indexes and now I want to check if these indexes are used or not!
1st: Is there a possibility to force MaxDB to use the index, if the sql statement consists e.g. LIKE '%N600%'?
2nd: Exist a list or something else where I can see which sql statements in MaxDB dont support index strategy?
Thx for help and kind regards,
Frank

Hello Frank,
A1: You could force MaxDB to use an index - but this wouldn't help much. The index could not be used efficiently with a like condition which starts with %.
Q2: Please check out the tuning section in the Wiki:
https://wiki.sdn.sap.com/wiki/x/jRI
Especially this section might be of interest for you:
https://wiki.sdn.sap.com/wiki/x/GXE
In General: if you want to check the execution plan for a specific SQL statement, use the EXPLAIN statement (just add EXPLAIN before the SELECT and execute it in SQLStudio).
HTH,
Melanie

Similar Messages

  • When will i use index organization table.

    when will i use index organization table.
    what is the advantage of these.

    See the sit
    http://www.dba-oracle.com/t_index_organized_tables.htm

  • Generally when does optimizer use nested loop and Hash joins  ?

    Version: 11.2.0.3, 10.2
    Lets say I have a table called ORDER and ORDER_DETAIL.
    ORDER_DETAIL is the child table of ORDERS .
    This is what I understand about Nested Loop:
    When we join ORDER AND ORDER_DETAIL tables oracle will form a 'nested loop' in which for each order_ID in ORDER table (outer loop), oracle will look for corresponding multiple ORDER_IDs in the ORDER_DETAIL table.
    Is nested loop used when the driving table (ORDER in this case) is smaller than the child table (ORDER_DETAIL) ?
    Is nested loop more likely to use Indexes in general ?
    How will these two tables be joined using Hash joins ?
    When is it ideal to use hash joins  ?

    Your description of a nested loop is correct.
    The overall rule is that Oracle will use the plan that it calculates to be, in general, fastest. That mostly means fewest I/O's, but there are various factors that adjust its calculation - e.g. it expects index blocks to be cached, multiple reads entries in an index may reference the same block, full scans get multiple blocks per I/O. It also has CPU cost calculations, but they generally only become significant with function / package calls or domain indexes (spatial, text, ...).
    Nested loop with an index will require one indexed read of the child table per outer table row, so its I/O cost is roughly twice the number of rows expected to match the where clause conditions on the outer table.
    A hash join reads the of the smaller table into a hash table then matches the rows from the larger table against the hash table, so its I/O cost is the cost of a full scan of each table (unless the smaller table is too big to fit in a single in-memory hash table). Hash joins generally don't use indexes - it doesn't use the index to look up each result. It can use an index as a data source, as a narrow version of the table or a way to identify the rows satisfying the other where clause conditions.
    If you are processing the whole of both tables, Oracle is likely to use a hash join, and be very fast and efficient about it.
    If your where clause restricts it to a just few rows from the parent table and a few corresponding rows from the child table, and you have an index Oracle is likely to use a nested loops solution.
    If the tables are very small, either plan is efficient - you may be surprised by its choice.
    Don't be worry about plans with full scans and hash joins - they are usually very fast and efficient. Often bad performance comes from having to do nested loop lookups for lots of rows.

  • When does Crystal use the Webi Server?

    I have a Crystal 2008 off a R3.0 Universe.  When does the Webi server get accessed?
    Question is only for Crystal Designer
    When I open the report in Crystal Designer?  Or when I run the report?

    Hi Brian,
    When creating a report based of a Universe, Crystal Reports will communicate with the Webi Report Server to get the following information:
    - SQL Query
    - Database information
    When you open a report based of a Universe in Crystal Reports, it needs to communicate with the Webi Report server to verify the security set in the Universe, as well as to see if there were any change, then the information is passed to Crystal Reports.
    When refreshing the report, it will  then use the SQL Query and database information sent from the Webi Report Server to communicate directly with the data source to retreive the data.
    Note that the above are general information on how a report based of a Universe semantic layer works.
    Hope this answer your question.
    Patrick

  • View with renamed column does not use index

    Is there any reason why a view that renames the columns presented to the users would ignore an index?
    For example:
    CREATE OR REPLACE VIEW ENROLLMENT
    (ENROLLMENT_ID, ENROLLMENT_DATE, FIRST_NAME)
    AS
    select distinct
    a.col1 as enrollment_id,
    a.col2 as enrollment_date,
    a.col3 as first_name
    from t1 a
    When a user queries the view, with a WHERE FIRST_NAME = 'TOM", it results in a FTS. However, if you run the query against the base table (using col1, col2, and col3), it uses the index against t1 on (col3, col2, col1).

    Well, I tried to create the supporting evidence afterwards (sigh, why do I keep doing that ...), it seems that Oracle has addressed this problem already:
    SQL> create table t1
      2  as
      3  select l col1, sysdate - l/86400 col2, decode(l,1,'TOM',to_char(l)) col3
      4    from (select level l from dual connect by level <= 100000)
      5  /
    Tabel is aangemaakt.
    SQL> create index i1 on t1 (col3, col2, col1)
      2  /
    Index is aangemaakt.
    SQL> exec dbms_stats.gather_table_stats(user,'T1',method_opt=>'FOR ALL INDEXED COLUMNS')
    PL/SQL-procedure is geslaagd.
    SQL> create view enrollment
      2  (enrollment_id, enrollment_date, first_name)
      3  as
      4  select distinct
      5  a.col1 as enrollment_id,
      6  a.col2 as enrollment_date,
      7  a.col3 as first_name
      8  from t1 a
      9  /
    View is aangemaakt.
    SQL> set autotrace on explain
    SQL> select * from enrollment where first_name = 'TOM'
      2  /
                             ENROLLMENT_ID ENROLLMENT_DATE     FIRST_NAME
                                         1 16-01-2007 14:41:25 TOM
    1 rij is geselecteerd.
    Uitvoeringspan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=3 Card=1 Bytes=44)
       1    0   VIEW OF 'ENROLLMENT' (Cost=3 Card=1 Bytes=44)
       2    1     SORT (UNIQUE NOSORT) (Cost=3 Card=1 Bytes=18)
       3    2       INDEX (RANGE SCAN) OF 'I1' (NON-UNIQUE) (Cost=3 Card=1
               Bytes=18)I'm on 9.2.0.7.0 here, what's your version ?
    Regards,
    Rob.

  • Query does not use index

    Hi,
    We have a production environment that uses oracle 10GR2.
    We have two schemas A and B
    A has two tables test1 and test2.
    test1 has three columns id, name, add and has an index IDX on id1. This table has close to 500 million rows.
    test2 has an column id. this is generally a small table holding 50k rows.
    B has the same set of tables and indexes.
    Now the question here is:
    When I run a join query as
    select
    t1.id
    from
    test1 t1, test t2
    where t1.id = t2.id
    on schema A, the explain plan uses the index IDX
    However when I run the same on schema B, the explain plan does not make use of the index.
    Any Thoughts?
    Karthik

    Here is the execution plans:
    Schema A:     
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 571 | 7423 | 37 (0)| | | |
    | 1 | PX COORDINATOR | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10000 | 571 | 7423 | 37 (0)| Q1,00 | P->S | QC (RAND) |
    | 3 | NESTED LOOPS | | 571 | 7423 | 37 (0)| Q1,00 | PCWP | |
    | 4 | PX BLOCK ITERATOR | | | | | Q1,00 | PCWC | |
    | 5 | TABLE ACCESS FULL| TEST2               | 153 | 918 | 6 (0)| Q1,00 | PCWP | |
    |* 6 | INDEX RANGE SCAN | IDX                    | 4 | 28 | 0 (0)| Q1,00 | PCWP | |
    Predicate Information (identified by operation id):
    access("TEST1"."ID"="TEST2"."ID")
    Schema B:
    Plan hash value: 2574051690
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 3108K| 38M| 5581 (3)| 00:01:07 | | | |
    | 1 | PX COORDINATOR | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10001 | 3108K| 38M| 5581 (3)| 00:01:07 | Q1,01 | P->S | QC (RAND) |
    |* 3 | HASH JOIN | | 3108K| 38M| 5581 (3)| 00:01:07 | Q1,01 | PCWP | |
    | 4 | PX RECEIVE | | 196K| 1149K| 50 (4)| 00:00:01 | Q1,01 | PCWP | |
    | 5 | PX SEND BROADCAST | :TQ10000 | 196K| 1149K| 50 (4)| 00:00:01 | Q1,00 | P->P | BROADCAST |
    | 6 | PX BLOCK ITERATOR | | 196K| 1149K| 50 (4)| 00:00:01 | Q1,00 | PCWC | |
    | 7 | TABLE ACCESS FULL | TEST2          | 196K| 1149K| 50 (4)| 00:00:01 | Q1,00 | PCWP | |
    | 8 | PX BLOCK ITERATOR | | 121M| 809M| 5472 (2)| 00:01:06 | Q1,01 | PCWC | |
    | 9 | INDEX FAST FULL SCAN| IDX               | 121M| 809M| 5472 (2)| 00:01:06 | Q1,01 | PCWP | |
    Predicate Information (identified by operation id):
    access("TEST1"."ID"="TEST2"."ID")

  • When does oracle use a complete nested loop join?

    Hi!
    Does Oracle Database use a complete nested loop join? I mean, imagine 2 tables without any indexes.. is there any case where for each row in the outer table Oracle does a complete scan in the inner table? I know that this is the original algorithm for the nested loop join, but some data bases prefer to make a temp table to autoindex the inner table and never makes the complete scan in the inner table..
    thanks!!

    user12040235 wrote:
    If the table do not have indexes.. some data bases prefer to scan one time the inner table, to index all values, and than, for every row in the outter loop table, it will do a index search.
    I just like to know oracle does the same thing, or it does the complete scan..If you have two tables without indexes, Oracle may consider scanning one table, extracting the smallest data set it can get away with, and then building a hash table of that data set (rather than creating an in-memory copy with index). At this point Oracle can then do a nested loop join into the in-memory hash table.
    However, this is called a hash join, and the order of tables will appear to be reversed, viz:
    nested loop
        table scan full ABC
        table scan full XYZ
    {code]
    becomeshash join
    table scan full XYZ
    table scan full ABC
    See: http://jonathanlewis.wordpress.com/2010/08/02/joins/ as a starting point if you want to read more on this topic.
    Regards
    Jonathan Lewis                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • RFC Communication error when doing initial indexing

    Hello Everyone,
    I have a quick question, when doing the initial index rollup for a BIA index the job is failing with RFC communication error.
    We currently have the setting related to " TREXRfcServer threads" set to "Automatic Changes" in order to avoid the RFC Communication errors when loading big loads in BI system.
    We currently are on Revision 49.
    I also have referred to OSS Note 1138603.
    The issue is when I am rolling up the BIA Index the rollup job is failing with RFC Communication errors.
    The Global parameters within BIA are:
    BATCHPARA - 2
    NUMPROC - 5
    PKGSIZE - 10000000
    SUBPKGSIZE - 20000
    We have two app servers with 52 Dialog processes and 25 Background processes.
    Any help would be really appreciated.
    Thanks
    Dharma.

    Removing references to systems and ports
    Issue:
    When the initial indexing is being carried out for an InfoCube to
    create the BIA Index and there is more than one application server in
    the system the job is failing with the http error.
    Hello Everyone,
    Thanks for the input, after the automatic changes was configured for concurrent requests the error is different right now.
    The error message is,
    "Remote communication failure with partner http://<Removed>:<removed>/indexCellTable"
    Overview/Background:
    When the indexing job is triggered as a background job the failure happens when the S table index is being filled.
    In our system where we are trying to do the stress testing we currently have two app servers and one central instance.
    When I limit the RFCGROUP in RSDDTREXADMIN table to one App server in terms of logon group the job finishes fine.
    Whereas, when I do not limit the RFCGROUP and all app servers are open for access the background job finishes with the error message
    Remote communication failure with partner http://<Removed>:<removed>/indexCellTable.
    We have looked into the OSS Note 1102652 and our BASIS team confirmed that they were able to ping from BI App servers into BIA blades and vice versa.
    We also confirmed if the local gateway was used for connectivity.
    The above issue was not in other systems where we only had one server.
    We currently are at Revision 49 and SP 13 in BI.
    We have E5345 Clowertown blades (2 x 4) 16GB blades.
    Please let us know if you need additional information.
    Thanks in advance for the input.
    Dharma.
    Edited by: Arun Varadarajan on Apr 24, 2009 1:36 AM

  • How does ORDBMS use table indexes?

    Until now, I thinked I've understanded how does ORDBMS
    uses indexes, but after this I don't think so....
    I'm using a query like this(There is and index[INDX_01] in
    ID_FIELD on t2):
    SELECT t1.*, t2.*
    FROM table1 t1, table2 t2
    WHERE t1.id_field = t2.id_field
    explain tables says that INDX_01 is used... (great)--------
    but if I issue this:
    SELECT t1.DATE_FIELD, t2.*
    FROM table1 t1, table2 t2
    WHERE t1.id_field = t2.id_field
    explain table says TABLE_ACCESS_FULL and INDX_01 index is NOT used....--------
    what's wrong?... references, help ....
    thanks...

    Ah, very sorry about that. I was confused at to where this would be fit to go.

  • CBO calculates un acceptable cost while using index.

    Hi,
    I was wondering to see the execution plan for both the case using index/without index.
    We are using oracle 10G(10.2.0.3.0) with RAC in production at O/S:- sun solaris 10.
    Java based application is running in this database. One of the sql query is taking long time to fetch the records. I analyzed the sql plan and noticed the FTS. I created indexes to the column(s) which is refering in where clauses. I noticed a strage behavior. Execution plan shows that the CBO is using right path but its not acceptable as application is time outs while return the rows.
    first execution plan with/without index (not using the index).
    PLAN_TABLE_OUTPUT
    Plan hash value: 419342726
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 196 | 3332 | 67845 (3)| 00:13:35 |
    |* 1 | TABLE ACCESS FULL | CWDBENUMDESCRIPTIONS | 1 | 35 | 3 (0)| 00:00:01 |
    | 2 | SORT GROUP BY | | 196 | 3332 | 67845 (3)| 00:13:35 |
    |* 3 | TABLE ACCESS FULL| CWORDERINSTANCE | 51466 | 854K| 67837 (3)| 00:13:35 |
    Predicate Information (identified by operation id):
    1 - filter("ERR"."CODE"=:B1)
    3 - filter("OI"."ERROR_CODE" IS NOT NULL AND "OI"."DIVISION"='OR9' AND
    "OI"."ACTIVE"=TO_NUMBER(:1) AND "OI"."ORDER_STATE"<>'O_NR_NS' AND
    "OI"."ORDER_STATE"<>'C_C_QR' AND "OI"."ORDER_STATE"<>'O_NR_NS_D')
    SQl query was modified to force the index to use /*+ index(oi oi_div) */ the execution is as below:-
    PLAN_TABLE_OUTPUT
    Plan hash value: 1157277132
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 196 | 3332 | 394K (1)| 01:18:52 |
    |* 1 | TABLE ACCESS FULL | CWDBENUMDESCRIPTIONS | 1 | 35 | 3 (0)| 00:00:01 |
    | 2 | SORT GROUP BY | | 196 | 3332 | 394K (1)| 01:18:52 |
    |* 3 | TABLE ACCESS BY INDEX ROWID| CWORDERINSTANCE | 51466 | 854K| 394K (1)| 01:18:52 |
    |* 4 | INDEX RANGE SCAN | OI_DIV | 3025K| | 14226 (1)| 00:02:51 |
    Predicate Information (identified by operation id):
    1 - filter("ERR"."CODE"=:B1)
    3 - filter("OI"."ERROR_CODE" IS NOT NULL AND "OI"."ACTIVE"=TO_NUMBER(:1) AND
    "OI"."ORDER_STATE"<>'O_NR_NS' AND "OI"."ORDER_STATE"<>'C_C_QR' AND
    "OI"."ORDER_STATE"<>'O_NR_NS_D')
    My questions are here:-
    1). why FTS is less costly comparing index scan where there are 15000000 rows in the table.
    2). while forcing index to use cost increase drastically (the statistics is latest one analyzed on 6th of feb 2009)
    3). what should i suppose to change to get the performance benefit.
    Thanks,
    Pradeep

    user587112 wrote:
    select null, oi.division, oi.METADATATYPE, oi.ERROR_CODE,
           (  select err.DESCRIPTION
    FROM   CWDBENUMDESCRIPTIONS err
    WHERE  oi.ERROR_CODE = err.CODE
    count(*)
    from CWORDERINSTANCE oi
    where
         oi.ERROR_CODE is not null
          and oi.division in ('BK9')
         and oi.order_state not in ('O_NR_NS_D', 'C_C_QR', 'O_NR_NS')
          and oi.metadatatype = :1
         and oi.duedate>=:2
         and oi.active = :3
    group by oi.division, oi.metadatatype, oi.error_code
    order by oi.division, oi.metadatatype, oi.error_code
    In this query, if we use as it is how its being displayed, it runs like a rocket, but if we change division in ('OR9') instead of 'BK9' it does not use index and leads to time out the application.
    Number of records   division
    1964690                             ---------------- why this field is null ?
    3090666              OR9
    3468                 BA9
    1242                 EL9
    2702                 IN9
    258                  EU9
    196198               DT9
    1268                 PA9
    8                    BK9
    2332                 BH9
    1405009              TP9
    According to the stats in your original execution plan, it looks like you have a histogram on this column, and the index you want to use is on just the division column.
    Oracle estimate for 'OR9' is 3M rowids from the index, resulting in 50,000+ rows from the table - that's a lot of work - it's not surprising that the optimizer chose a tablescan for 'OR9' - but chose to use the index for 'BK9' which has only 8 rows.
    How often do you want to run this query ? And how accurate does the answer have to be ?
    If you want this query to run faster even when it's processing a huge number of rows, one option would be to create a materialized view over the data that could supply the result set much more efficiently (possibly getting your front-end code to call a materialized view refresh before running the query).
    The only other altenative is probably to create an index that covers all the columns in the query so that you don't have to visit the table - and if you order them correctly you won't have to do a sort group by. I think this index should do the trick: (division, metadatatype, error_code,active, duedate,orderstate). You could also compress this index on at least the first column, but possibly on far more columns, to minimise the size,
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."
    Stephen Hawking
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • When I am using the browser for a while and try to use ANY search bar and hit the "search" button it does a whopping NOTHING is there anyway of keeping this from happening?

    Whenever I am using Firefox mobile - either regular, beta or aurora and go to search for something like through the Google search page and attempt to search for something the search bar does nothing and hitting the enter button instead doesn't do anything either. Is there a way to keep this from happening?

    Hi and thanks to not leaving the firefox user alone.
    Cor-el your answer is right as the madperson is and I already knew all these
    answer and I said that before I don’t use any antivirus and I always turn off my firewall from the moment I installed my Windows.
    I even turn off any automatic update for any of my software and I never let any unknown plugins or any thing like that be install without informing me. And if you know some things like Offline Storage and cookies must be to much more than usual and you have to clear them and delete them and I know so much more
    And if you want to know it fixed now. But I don’t know how?
    For understanding my problem read and research about Ixplorer.exe virus it is the same problem about the speed but the different is it doesn’t show any process in task manager like Ixplorer.exe virus
    Bt I have done some things but still I don’t know that’s why it is fixed or not
    First: I searched my system and removed any files have been crated on my system from two days ago since the problem happened.
    And then I used to go about the article in this page and did like this:
    http://answers.yahoo.com/question/index?qid=20080910101846AAazxN5
    but still I don’t know any thing about the problem.
    I can do so many things to fix but I am just curios if that is a virus why it just cut the speed when I am using the browser.
    Please if any one found the reason send me your information I like to know it will improve my knowledge however my problem is solved fro now.

  • Not Using Index on File Server When Accessing User Files Directly on Server

    It appears to me that on a server with an indexed network share (Desktop Experience and Search Indexing roles/features installed), if you access the share directly on the server using its drive path, you can search the folders using the index, which
    is much faster and supports finding words inside of the files in seconds). However, if you access the same shared folder via its network path from the server itself, the server ignores the index. I have this experience/problem across all shared folders on
    the Windows 2012 R2 Server. Details and my most specific goal follows.
    In addition to a laptop, I frequently work directly on a Windows Server 2012 R2 computer. We have Redirected Folders set up on DFS (for failover redundancy) so that my Documents folder is in:
    \\network\redirections\user\documents. This all works fine on Windows 7 and 8 client computers connected to the network via Offline Files.
    The problem is on the server itself. The server has Desktop Experience enabled and Windows Search is installed. If I navigate manually through the DFS root folder to my documents folder, I can search and it properly uses the index. This proves the location
    is properly indexed. However, if I access the folders through the official "Documents" folder from the Folder Redirection (a network share pointing to the same server computer I'm working on), it performs an un-indexed search (slow and ignores file
    contents, but does find files eventually if the search term is in their filename). Is there a way to force the server to use the indexed search on the Redirected Folders (my Documents folder in particular) when working on that server when logged in locally
    on that server?
    I suspect a workaround would be to go into the Registry and manually change the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders to point to the local DFS folder instead of the network share name, but at least one problem
    with this is then if I save files with links to other files (e.g., a linked Excel table in a PowerPoint, a mail merge to Access database in Word, etc.) on the server computer, those links will point to d:\DFSroot\... (a physical drive on the computer) instead
    of \\network\redirections\user\... (a universally accessible network path) and so none of the other computers will be able to find the linked files, defeating one of the
    major benefits of using Redirected Folders.
    I can't believe that I need to choose between indexed searching and proper path names in saved files. Surely there is a way to use an indexed search on the server itself?
    If you need any more info to help me troubleshoot, please let me know.
    Thanks for any help,
    Colin

    Hi Colin,
    It seems that we can not use indexed search on DFS shares. Windows Search works well when users directly access the server. That is, the server is not made available through Distributed File System (DFS).
    For more detailed information, you could refer to the links below:
    Windows Search Service, Clustered File Services, DFS, Win7 Libraries
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/31ac4c16-948b-4ca4-b18f-3a339cdfd5b9/windows-search-service-clustered-file-services-dfs-win7-libraries?forum=winserverfiles
    Windows Browse and Organize Features
    https://technet.microsoft.com/en-us/library/dd744693(WS.10).aspx
    Best Regards,
    Mandy 
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Actual Column Name for Index when Function is used?

    Hi,
    We have some indeces where the column in oracle is actually a function in the form UPPER('column-name'). When I query user_ind_columns I get something like SYS_NC0012$ for the column name. Where would I be able to actually query the actual column it's using in the index? So that I can query the exact column name if need be. Don't ask why cause this is a developer asking me this and they are doing some sort of a comparison between indexes between two application.
    Here is the SQL for the Index and the Table associated with it
    create table BATCH_HEADER2
    PAYMENT_TYPE VARCHAR2(17),
    BATCH_TYPE VARCHAR2(40) not null,
    BATCHNUM NUMBER not null,
    BRANCH VARCHAR2(16),
    BATCH_TIME NUMBER,
    USER_LOB VARCHAR2(16),
    PAYEE_TYPE VARCHAR2(40),
    PROGRESS_RECID NUMBER,
    CHEQUE_TYPE VARCHAR2(60),
    SCANNERBATCHNO NUMBER,
    RECEIPTCOUNT NUMBER
    alter table BATCH_HEADER2
    add constraint PK_BATCH_HEADER2 primary key (BATCH_TYPE, BATCHNUM)
    using index
    tablespace FT1_DATA;
    --Inxes
    create unique index FT1DSTINT.BATCH_HEADER2##BYNUM on FT1DSTINT.BATCH_HEADER2 (UPPER(BATCH_TYPE), BATCHNUM)
    tablespace FT1_DATA
    pctfree 10
    initrans 2
    maxtrans 255
    storage (initial 64K
    minextents 1
    maxextents unlimited);

    From Oracle's standpoint, though, it isn't indexing BATCH_TYPE. It's indexing an arbitrary function that happens to take BATCH_TYPE as an input. As far as Oracle is concerned, you might just as easily be indexing an expression that took a dozen column names as parameters, so it doesn't really make sense for Oracle to try to break down anything beyond the function.
    Of course, you could always parse the expression and extract the column name, but I would be dubious that's the right answer... If a developer is comparing indexes between columns, there is a heck of a lot of difference between an index on BATCH_TYPE, and index on UPPER(BATCH_TYPE) and an index on SOME_OTHER_FUNCTION( BATCH_TYPE ).
    Justin

  • Does rebuild of indexes uses temp tablespace or system tablespace?

    Does rebuild of indexes uses temp tablespace or system tablespace?
    If so why?

    If you combine the answers from Aman and Burleson, they cover most of the picture.
    When rebuilding an index, you may end up sorting a large amount of information. The sort may spill into the temporary tablespace - if you haven't configured your database and users properly, it is possible that the SYSTEM tablespace may be used for the temporary tablespace.
    As the new copy of the index is built, it has to be built in the right place (tablespace), and the space used to build it will be marked as a temporary segment as the build takes place. When the build is complete, this temporary segment will take on the name of the origrinal index, and the original index will be re-badged as a temporary segment and dropped. (Again, you might see temporary segments in the SYSTEM tablespace if the index was originally in, or was rebuilt into, the SYSTEM tablespace).
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • PPDS Optimizer does it use strategy settings at all

    Hi. Does the PPDS optimizer use the strategy settings at all? in foreground DS planning board or background?
    I am thinking not as changing any of the settings does not seem to make any difference.
    eg block use or block ignore, it still puts orders into block.
    Thanks
    j

    ron_bigman wrote:
    Hi Sven,
    Thank you for your answer.
    The logic behind using bitmap index in the dimension table is the ability to use several indexes together.This is also possible with normal indexes. in fact the CBO might decide to change aon or more normal b*tree indexes into a bitmap index on the fly and combine both, if this is a sensible/fast way.
    >
    So if I run such a query
    select *
    from dim_tab1 d1 on d1.id1 = fd.id1
    where d1.dim_col1='value1'
    and d1.dim_col2='value2'
    It will use both indexes, the one on dim_col1 and the one on dim_col2.
    I noticed now that this query doesn't work as expected as well, which confirm my belief that the problem is not in the query it self but in the DB configuration.
    Thanks
    RonI doubt that it is a configuration issue. But possible is everything.
    The problem is often that it is very difficult to predict how many values are returned for two different filter criteria. And especially not if these filter criteria are on another (dimension) table. Also for your tests it might be important whether the query gets the 'value1' literally as it is written or as a bind parameter ( dim_col1 = :1).

Maybe you are looking for