Num_rows = null for Domain Index

Hello!
SQL> SELECT index_name, index_type, status, num_rows FROM user_indexes WHERE table_name = 'STUFF';
INDEX_NAME                     INDEX_TYPE                  STATUS     NUM_ROWS
IDX_STUFF_ATTR1               NORMAL                      VALID       3004176
IDX_GEOM_STUFF                DOMAIN                      VALID
PK_STUFF                      NORMAL                      VALID       3268049
SYS_IL0000091928C00016$$       LOB                         VALID
SYS_IL0000091928C00017$$       LOB                         VALIDIs it normal that the data dictionary has no num_rows for a domain index? I googled and searched the forums but couldn't find anything relating specifically to domain indexes. There was a post mentioning that bitmap indexes will not show a correct num_rows, so I suspect it might be the same for domain indexes?
Regards,
Christian

Hi Christian,
I forgot the comma between last_analyzed and num_rows in my previous post.
Well.... a detail called my attention, and it is the name of the index itself: IDX_GEOM_STUFF.
I would not consider any issue on the fact that it is a Domain Index.... but most likely a Spatial Index (since i see GEOM)!
I googled, and found a few links that you should investigate (to start with), and maybe, you could tune your question so that expert with Spatial can help you further if needed:
http://forums.esri.com/Thread.asp?c=2&f=1720&t=233552
http://forums.esri.com/Thread.asp?c=158&f=2291&t=230495&mc=8#msgid700335
http://www.dbasupport.com/forums/archive/index.php/t-23029.html
From discussion: http://forums.esri.com/Thread.asp?c=2&f=1720&t=202266
You can read:
SDO_GEOMETRY layers do not have spatial index statistics. Only layers with S tables can, since the statistics are calculated on the S tableSo, as you started with, mentioned Bitmap indexes... i guess the Spatial thing need a double check.
HTH !!
Thierry
Edited by: Urgent-IT on Feb 9, 2011 4:12 PM
Edited by: Urgent-IT on Feb 11, 2011 9:31 AM
You should mark the thread as answered if the responses have provided you with an appropriate response.

Similar Messages

  • Ora-29886 feature not supported for domain indexes ??

    Could anyone tell me the reason for the following error
    ora-29886 feature not supported for domain indexes
    What are domain indexes ..??
    Thanks in advance ..

    It would have been better if you posted the statement that caused the error.
    If you are using something like MERGE INTO, it is not supported with with Domain Indexes. Workaround is to complete your insert with individual insert statements or drop the Domain Index before insert and recreate the index after insert
    Domain indexes are built for specific applications (specific domain) like Oracle text, Oracle Spatial etc. So depending on what application you are running, you might be using domain indexes. You create domain indexes as you create b-tree indexes, but the difference is that you have to define the INDEXTYPE.
    You can find domain indexes in DBA_SECONDARY_OBJECTS. Find the index on the table you are using, then check the definition of the index and see what it looks like.

  • Explain Plan for domain index

    I am running explain plan for queries using a domain index. i.e. an oracle text 'contains' clause. The usage of the domain index appears in the plan o.k, but I am interested in seeing the underlying access to the DR$...$I etc tables and assoicated indexes belonging to ctxsys. Is it possible to see this access ?
    Basically I have all the objects created by the domain index in their own tablespace using a storage preference, but I am wondering if the sub indexes should be moved out from the sub tables for better performance ? Any guidance is appreciated.

    I am running explain plan for queries using a domain index. i.e. an oracle text 'contains' clause. The usage of the domain index appears in the plan o.k, but I am interested in seeing the underlying access to the DR$...$I etc tables and assoicated indexes belonging to ctxsys. Is it possible to see this access ?
    Basically I have all the objects created by the domain index in their own tablespace using a storage preference, but I am wondering if the sub indexes should be moved out from the sub tables for better performance ? Any guidance is appreciated.

  • Error during altering a domain index - 10gr2

    10.2.0.5 on RHEL-4
    I would like to reduce some redo entries to prevent huge generation of archive-logs.
    select index_name, table_owner, table_name, tablespace_name from user_indexes where index_type='DOMAIN' and logging='YES';
    SQL> alter INDEX ISE_HIST#LOC nologging;
    alter INDEX ISE_HIST#LOC nologging
    ERROR at line 1:
    ORA-29871: invalid alter option for a domain index
    Why I am unable to convert into no-logging mode ? What is the correct way of doing this?
    Thanks!

    >
    I would like to reduce some redo entries to prevent huge generation of archive-logs.
    select index_name, table_owner, table_name, tablespace_name from user_indexes where index_type='DOMAIN' and logging='YES';
    SQL> alter INDEX ISE_HIST#LOC nologging;
    alter INDEX ISE_HIST#LOC nologging
    ERROR at line 1:
    ORA-29871: invalid alter option for a domain index
    Why I am unable to convert into no-logging mode ? What is the correct way of doing this?
    >
    As the exception message says you can't use the logging/nologging clause for domain indexes. Oracle doesn't support that functionality.
    See ALTER INDEX in the SQL Language doc
    >
    index
    Specify the name of the index to be altered.
    Restrictions on Modifying Indexes The modification of indexes is subject to the following restrictions:
    •If index is a domain index, you can specify only the PARAMETERS clause, the RENAME clause, the rebuild_clause (with or without the PARAMETERS clause), the parallel_clause, or the UNUSABLE clause. No other clauses are valid.
    •You cannot alter or rename a domain index that is marked LOADING or FAILED. If an index is marked FAILED, the only clause you can specify is REBUILD.
    >
    The first bullet point above itemizes the clauses you can specify for a domain index and LOGGING/NOLOGGING is not one of them. As that point says 'No other clauses are valid'.
    There are no workarounds.

  • Mail in_reply_to field is Null in Envelope Index

    I am trying to pull some data from the sqlite database Mail uses. However, the in_reply_to field of the messages table is NULL for every value.
    set databasePath to POSIX path of (path to library folder from user domain as text) & "Mail/V2/MailData/Envelope Index"
    set theReply to (do shell script "sqlite3 " & quoted form of databasePath & " \"SELECT DISTINCT in_reply_to from messages;\"")
    However, I can extract the value of the header with something like this:
    tell application "Mail"
              set aMessage to first item of (get selection)
              try
                        set inReplyTo to extract address from (content of aMessage's header "in-reply-to")
              on error
                        set inReplyTo to "NULL"
              end try
    end tell
    Where can I find the value of in_reply_to field within the Envelope Index database?

    I found the answer in
    http://www.entourage.mvps.org/faq_topic/reply.html#reply4
    thanks to the Microsoft news server...

  • Performance of resource view using domain index XDBHI_IDX

    Hello all,
    We have a home grown XMLDB application for doing schema validation against incoming messages. The application issues several queries like below. I know, it hard parses, which is very bad, but that's not where the real performance problem is right now. The problem is with the domain index XDBHI_IDX against the xdb$resource table. We use a very specific path which results in 0 or 1 returned rows, but as you can see the domain index has an intermediate result of 48041 rows, so the index is not effective here. Statistics are up to date, the index has been rebuild. Does anybody know what we can do with the domain index to make it do what it should do: identify the one xml document in that path?
    SELECT 0
    FROM
    resource_view WHERE any_path=
      '/home/app/incoming/ARCH_IN/2012/01/592174'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        2      0.02       0.02          0       1041          0           0
    Execute      2      0.00       0.00          0          0          0           0
    Fetch        2     81.26      85.43          0     202556     576158           0
    total        6     81.28      85.45          0     203597     576158           0
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 67  (app)   (recursive depth: 3)
    Rows     Row Source Operation
          0  TABLE ACCESS BY INDEX ROWID XDB$RESOURCE (cr=341531 pr=0 pw=0 time=60883725 us)
      48041   DOMAIN INDEX  XDBHI_IDX (cr=311030 pr=0 pw=0 time=1548774 us)Regards,
    Rob.
    PS: Database version is 10.2.0.3.0

    Hi odie and Marco,
    Thanks for your tips. Using equals_path instead of "=" did the trick indeed. Here are some results from our test system to prove it.
    Old query:
    SQL> SELECT /*+ gather_plan_statistics */ 0
      2  FROM
      3   resource_view WHERE any_path=
      4    '/home/app/incoming/ARCH_IN/2012/01/592174'
      5  /
    no rows selected
    SQL> select *
      2    from table(dbms_xplan.display_cursor(null,null,'allstats last'))
      3  /
    PLAN_TABLE_OUTPUT
    SQL_ID  0cnfnzqc2k5bd, child number 0
    SELECT /*+ gather_plan_statistics */ 0 FROM  resource_view WHERE any_path=
    '/home/app/incoming/ARCH_IN/2012/01/592174'
    Plan hash value: 2859544236
    | Id  | Operation                   | Name         | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |*  1 |  TABLE ACCESS BY INDEX ROWID| XDB$RESOURCE |      1 |      1 |      0 |00:00:00.15 |   12104 |
    |*  2 |   DOMAIN INDEX              | XDBHI_IDX    |      1 |        |   2590 |00:00:00.10 |   10576 |
    Predicate Information (identified by operation id):
       1 - filter("XDB"."ABSPATH"(9999)='/home/app/incoming/ARCH_IN/2012/01/592174')
       2 - access("XDB"."UNDER_PATH"("P"."SYS_NC00033$",'/',9999)=1)
    20 rows selected.New query:
    SQL> SELECT /*+ gather_plan_statistics */ 0
      2  FROM
      3   resource_view
      4  where equals_path(res, '/home/app/incoming/ARCH_IN/2012/01/592174') = 1
      5  /
    no rows selected
    SQL> select *
      2    from table(dbms_xplan.display_cursor(null,null,'allstats last'))
      3  /
    PLAN_TABLE_OUTPUT
    SQL_ID  b8y3sra82yj7u, child number 0
    SELECT /*+ gather_plan_statistics */ 0 FROM  resource_view where
    equals_path(res, '/home/app/incoming/ARCH_IN/2012/01/592174') = 1
    Plan hash value: 3533888242
    | Id  | Operation     | Name      | Starts | A-Rows |   A-Time   | Buffers |
    |*  1 |  DOMAIN INDEX | XDBHI_IDX |      1 |      0 |00:00:00.01 |       2 |
    Predicate Information (identified by operation id):
       1 - access("XDB"."EQUALS_PATH"("P"."SYS_NC00033$",'/home/app/incoming
                  /ARCH_IN/2012/01/592174')=1)Regards,
    Rob.

  • How to increase the performance of a domain index?

    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    I am using a dynamic query which uses a domain index for a clob column. The table has 1021487 records. How can i increase the performance of a select query based on this table? This is the only part where my application gets slowed down.
    The query is
    SELECT :search_id, 100, :item_type, c.search_college, c.search_colname, TRUNC(dbms_random.value(900000000000, 999999999999)) rand, COUNT(1), c.college_rating, min(DECODE(c.search_postcode, NULL, 99999, NULL)) search_distance FROM w_search_text c WHERE c.search_course_type is not null
    and (contains(c.search_text,:search_text,2) > 0)
    AND c.search_item_type = :item_bind
    GROUP BY c.search_college, c.search_colname, c.college_rating
    ORDER BY c.search_college
    here c.search_text is the domain indexed column?
    Is there a way to tune it?
    Ram

    Here c.search_text is the clob column.
    i am using 4 bind variables and they are search id : 123456
    item_type : O
    search_text : French
    item_bind : Z
    I tried explain plan and here are the results
    Plan
    SELECT STATEMENT ALL_ROWSCost: 5 Bytes: 38,280 Cardinality: 264                
         3 SORT GROUP BY Cost: 5 Bytes: 38,280 Cardinality: 264           
              2 TABLE ACCESS BY INDEX ROWID TABLE HOT_ADMIN.W_SEARCH_TEXT_LIVE2 Cost: 4 Bytes: 38,280 Cardinality: 264      
                   1 DOMAIN INDEX INDEX (DOMAIN) HOT_ADMIN.W_SRCH_TXT_IDX2 Cost: 4
    Its using the domain index, But the column is highly fed up with data...so ithink that may be the reason.Is there any HINTS in particular to tune domain indexes?
    Ram

  • Party Merge ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE

    Hi gurus,
    i am using 11.5.10.2 on linux.
    while running the party merge concurrent program , we are getting below error, please help.
    Errors in Merge :
    Application: Receivables_
    Error: Merge failed in Receivables (HZ_STAGED_PARTY_SITES ) with the following error message:
    This unexpected SQL error occurred during the merge process :
    ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE
    The following record was being handled when the error occurred :
    Thanks
    RB

    Thanks Hussain, this is similer to the error i got, i will run the steps and get back to you, once again thanks for your prompt responce.
    Thx
    RB
    Edited by: R12DBA on Jul 23, 2010 4:36 PM
    Edited by: R12DBA on Jul 23, 2010 4:50 PM

  • Domain index on list-partitioned table?

    Hi,
    I have a list-partitioned table, and wanted to create a partitioned Oracle Text index on it. I keep getting an error, and am now wondering if it's possible to do. Here is my syntax:
    CREATE INDEX SCHEMA1.IDX_ALL_TEXT_LOCAL ON SCHEMA1.TABLE1(ALL_TEXT)
    INDEXTYPE IS CTXSYS.CONTEXT
    LOCAL
    (PARTITION PTN1 PARAMETERS('sync (on commit) storage ptn1'),
    PARTITION PTN2 PARAMETERS('sync (on commit) storage ptn2'),
    PARTITION PTN3 PARAMETERS('sync (on commit) storage ptn3'),
    PARTITION PTN4 PARAMETERS('sync (on commit) storage ptn4'),
    PARTITION PTN5 PARAMETERS('sync (on commit) storage ptn5'),
    PARTITION PTN6 PARAMETERS('sync (on commit) storage ptn6'),
    PARTITION PTN7 PARAMETERS('sync (on commit) storage ptn7'),
    PARTITION PTN8 PARAMETERS('sync (on commit) storage ptn8')
    PARAMETERS('section group my_group lexer new_lexer');
    ERROR at line 1:
    ORA-29850: invalid option for creation of domain indexes
    Any advice would be much appreciated.
    Thanks,
    Nora

    ... will it spread the index across the tablespaces that are associated with each partition?No, as demonstrated below.
    SCOTT@orcl_11gR2> CREATE TABLE table1
      2       ( id         NUMBER(6),
      3         all_text      VARCHAR2 (20)
      4       )
      5  PARTITION BY LIST (id)
      6   (PARTITION ptn1 VALUES (2,4) TABLESPACE example,
      7    PARTITION ptn2 VALUES (3,9) TABLESPACE example
      8   )
      9  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO table1 VALUES (2, 'test2')
      3  INTO table1 VALUES (3, 'test3')
      4  INTO table1 VALUES (4, 'test4')
      5  INTO table1 VALUES (9, 'test9')
      6  SELECT * FROM DUAL
      7  /
    4 rows created.
    SCOTT@orcl_11gR2> CREATE INDEX IDX_ALL_TEXT_LOCAL
      2  ON TABLE1 (ALL_TEXT)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  /
    Index created.
    SCOTT@orcl_11gR2> SELECT table_name, tablespace_name
      2  FROM   user_tab_partitions
      3  WHERE  table_name = 'TABLE1'
      4  /
    TABLE_NAME                     TABLESPACE_NAME
    TABLE1                         EXAMPLE
    TABLE1                         EXAMPLE
    2 rows selected.
    SCOTT@orcl_11gR2> SELECT table_name, tablespace_name
      2  FROM   user_tables
      3  WHERE  table_name LIKE '%IDX_ALL_TEXT_LOCAL%'
      4  /
    TABLE_NAME                     TABLESPACE_NAME
    DR$IDX_ALL_TEXT_LOCAL$I        USERS
    DR$IDX_ALL_TEXT_LOCAL$R        USERS
    DR$IDX_ALL_TEXT_LOCAL$N
    DR$IDX_ALL_TEXT_LOCAL$K
    4 rows selected.
    SCOTT@orcl_11gR2>

  • Creating DOMAIN INDEX on INTERVAL PARTITIONING

    Hi !
    I hava a problem, and I hope someone can help me!
    Two questions are asked below:
    1. Main question: HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    2. Additionally: Is there a way to accelerate the deletion process
    Step 1: Creating the table* For Information how I create the table:
    CREATE TABLE LOC_EXAMPLE
    COLUMN1 NUMBER
    COLUMN2 NUMBER
    COLUMN3 NUMBER
    COLUMN4 NUMBER
    START_TIME TIMESTAMP
    GEOLOC MDSYS.SDO_GEOMETRY,
    TABLESPACE DB_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING
    PARTITION BY RANGE (START_TIME)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
         PARTITION PART_LOC_EXAMPLE VALUES LESS THAN (TO_DATE('01-01-2008','dd-MM-yyyy'))
    ALTER TABLE LOC_EXAMPLE
    ADD CONSTRAINT PK_LOC_EXAMPLE PRIMARY KEY (COLUMN2,COLUMN4)
    DELETE FROM USER_SDO_GEOM_METADATA VALUE WHERE TABLE_NAME = 'LOC_EXAMPLE'
    INSERT INTO USER_SDO_GEOM_METADATA VALUES ('LOC_EXAMPLE','GEOLOC', MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('X',-180,180,0.001111949), MDSYS.SDO_DIM_ELEMENT('Y',-90,90,0.001111949) ), 8307)
    STEP 2: I TRY TO CREATE SPATIAL INDEX (ITS A DOMAIN INDEX IF I'M NOT WRONG) ON PARTITIONED TABLE*
    (PARTITIONED TABLE is an extension of range partitioning)
    CREATE INDEX LOC_EXAMPLE_idx ON LOC_EXAMPLE'(GEOLOC)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX LOCAL;
    THE SECOND STEP IS NOT POSSIBLE AS THE ORACLE DOCUMENTATION SAYS:
    When using interval partitioning, consider the following restrictions:
    -You can only specify one partitioning key column, and it must be of NUMBER or DATE type.
    -Interval partitioning is not supported for index-organized tables.
    -You cannot create a domain index on an interval-partitioned table.
    1) I THINK IT IS IMPOSSIBLE FOR ME TO PASS ON INTERVAL PARTITIONING (AMOUNT OF DATA IS REALY BIG).
    This partitioning is also used to delete datas from database once a mounth (scheduled on the basis of the partitions).
    Is there a way to accelerate the deletion process?
    2) I NEED A SPATIAL INDEX! NO WAY TO PASS ON IT!
    HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    Why is it not possible to create a domain index on interval partitioning, any reason?
    Will this be possible anytime?
    I would be grateful to read any advise ...!
    Thanking you in anticipation,
    Ali

    There is a forum here at OTN for spatial. Please delete the contents of this post and ask your question there. Thanks.

  • Creating DOMAIN INDEX (SPATIAL) on INTERVAL PARTITIONING

    Hi !
    I hava a problem, and I hope someone can help me!
    Two questions are asked below:
    1. Main question: HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    2. Additionally: Is there a way to accelerate the deletion process
    Step 1: Creating the table For Information how I create the table:
    CREATE TABLE LOC_EXAMPLE
    COLUMN1 NUMBER
    COLUMN2 NUMBER
    COLUMN3 NUMBER
    COLUMN4 NUMBER
    START_TIME TIMESTAMP
    GEOLOC MDSYS.SDO_GEOMETRY,
    TABLESPACE DB_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING
    PARTITION BY RANGE (START_TIME)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    PARTITION PART_LOC_EXAMPLE VALUES LESS THAN (TO_DATE('01-01-2008','dd-MM-yyyy'))
    ALTER TABLE LOC_EXAMPLE
    ADD CONSTRAINT PK_LOC_EXAMPLE PRIMARY KEY (COLUMN2,COLUMN4)
    DELETE FROM USER_SDO_GEOM_METADATA VALUE WHERE TABLE_NAME = 'LOC_EXAMPLE'
    INSERT INTO USER_SDO_GEOM_METADATA VALUES ('LOC_EXAMPLE','GEOLOC', MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('X',-180,180,0.001111949), MDSYS.SDO_DIM_ELEMENT('Y',-90,90,0.001111949) ), 8307)
    STEP 2: I TRY TO CREATE SPATIAL INDEX (ITS A DOMAIN INDEX IF I'M NOT WRONG) ON PARTITIONED TABLE
    (PARTITIONED TABLE is an extension of range partitioning)
    CREATE INDEX LOC_EXAMPLE_idx ON LOC_EXAMPLE'(GEOLOC)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX LOCAL;
    THE SECOND STEP IS NOT POSSIBLE AS THE ORACLE DOCUMENTATION SAYS:
    When using interval partitioning, consider the following restrictions:
    -You can only specify one partitioning key column, and it must be of NUMBER or DATE type.
    -Interval partitioning is not supported for index-organized tables.
    -You cannot create a domain index on an interval-partitioned table.
    1) I THINK IT IS IMPOSSIBLE FOR ME TO PASS ON INTERVAL PARTITIONING (AMOUNT OF DATA IS REALY BIG).
    This partitioning is also used to delete datas from database once a mounth (scheduled on the basis of the partitions).
    Is there a way to accelerate the deletion process?
    2) I NEED A SPATIAL INDEX! NO WAY TO PASS ON IT!
    HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    Why is it not possible to create a domain index on interval partitioning, any reason?
    Will this be possible anytime?
    I would be grateful to read any advise ...!
    Thanking you in anticipation,
    Ali

    Is it possible to just use a normal range-partitioned table?
    CREATE TABLE LOC_EXAMPLE
    START_TIME TIMESTAMP
    GEOLOC MDSYS.SDO_GEOMETRY,
    PARTITION BY RANGE (START_TIME)
    PARTITION P1 VALUES LESS THAN (TO_DATE('01-01-2008','dd-MM-yyyy'))
    alter table loc_example add partition p2 VALUES LESS THAN (TO_DATE('02-01-2008','dd-MM-yyyy'));
    alter table loc_example drop partition p1;
    I understand it is not as perfect as interval partitioning, since
    you have to drop an old partition/add a new one either manually
    or by some script. But you should be able to create a spatial domain index
    on it.

  • Gather_table_stats with a method opt of "for all indexed columns size 0"

    I have 9 databases I support that contain the same structure, and very similar data concentrations. We are seeing inconsistent performance in the different databases due to bind variable peeking.. I have tracked it down to the Min and Max values that are gathered during the analyze. I analyze from one cluster, and export/import those statistics into the other clusters.. I then go about locking down the stats gathered. Some of the statistics are on tables that contain transient data (the older data is purged, and new data gets a new PK sequence number).
    Since I am gathering statistics with a 'FOR ALL INDEXED COLUMNS SIZE 1', a min and max value are grabbed. This value is only appropriate for a short period of time, and only for a specific database. I do want oracle to know the density to help calculate, but I don't want cardinality based on whether the current bind values fall in this range..
    Example
    COLUMN PK
    When I analyze the min is 1 and max is 5. I then let the database run, and the new min is 100 and max is 105.. same number of rows, but different min/max. At first a select * from table where pk>=1 and pk <=5 would return a cardinality of 5.. Later, a seelct * from tables where pk>=100 and pk<=105 would return a cardinaility 1.
    Any ideas how to avoid this other than trying set min and max to something myself (like min =1 max = 99999999). ??

    MarkDPowell wrote:
    The Oracle documentation on bind variable peeking said it did not peek without histograms and I cannot remember ever seeing on 9.2 where the trace showed otherwise. Mark,
    see this simple test case run on 9.2.0.8. No histograms, but bind variable peeking, as you can see that the EXPLAIN PLAN output generated by AUTOTRACE differs from the estimated cardinality of the actual plan used at runtime.
    Which documentation do you refer to?
    SQL>
    SQL> alter session set nls_language = 'AMERICAN';
    Session altered.
    SQL>
    SQL> drop table bind_peek_test;
    Table dropped.
    SQL>
    SQL> create table bind_peek_test
      2  as
      3  select
      4             100 as n1
      5           , cast(dbms_random.string('a', 20) as varchar2(20)) as filler
      6  from
      7             dual
      8  connect by
      9             level <= 1000;
    Table created.
    SQL>
    SQL> exec dbms_stats.gather_table_stats(null, 'bind_peek_test', method_opt=>'FOR ALL COLUMNS SIZE 1')
    PL/SQL procedure successfully completed.
    SQL>
    SQL> variable n number
    SQL>
    SQL> variable n2 number
    SQL>
    SQL> alter system flush shared_pool;
    System altered.
    SQL>
    SQL> exec :n := 1; :n2 := 50;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> set autotrace traceonly
    SQL>
    SQL> select * from bind_peek_test where n1 >= :n and n1 <= :n2;
    no rows selected
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1000 Bytes=24
              000)
       1    0   FILTER
       2    1     TABLE ACCESS (FULL) OF 'BIND_PEEK_TEST' (Cost=2 Card=100
              0 Bytes=24000)
    Statistics
            236  recursive calls
              0  db block gets
             35  consistent gets
              0  physical reads
              0  redo size
            299  bytes sent via SQL*Net to client
            372  bytes received via SQL*Net from client
              1  SQL*Net roundtrips to/from client
              4  sorts (memory)
              0  sorts (disk)
              0  rows processed
    SQL>
    SQL> set autotrace off
    SQL>
    SQL> select
      2             cardinality
      3  from
      4             v$sql_plan
      5  where
      6             cardinality is not null
      7  and      hash_value in (
      8    select
      9            hash_value
    10    from
    11            v$sql
    12    where
    13            sql_text like 'select * from bind_peek_test%'
    14    );
    CARDINALITY
              1
    SQL>
    SQL> alter system flush shared_pool;
    System altered.
    SQL>
    SQL> exec :n := 100; :n2 := 100;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> set autotrace traceonly
    SQL>
    SQL> select * from bind_peek_test where n1 >= :n and n1 <= :n2;
    1000 rows selected.
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1000 Bytes=24
              000)
       1    0   FILTER
       2    1     TABLE ACCESS (FULL) OF 'BIND_PEEK_TEST' (Cost=2 Card=100
              0 Bytes=24000)
    Statistics
            236  recursive calls
              0  db block gets
            102  consistent gets
              0  physical reads
              0  redo size
          34435  bytes sent via SQL*Net to client
           1109  bytes received via SQL*Net from client
             68  SQL*Net roundtrips to/from client
              4  sorts (memory)
              0  sorts (disk)
           1000  rows processed
    SQL>
    SQL> set autotrace off
    SQL>
    SQL> select
      2             cardinality
      3  from
      4             v$sql_plan
      5  where
      6             cardinality is not null
      7  and      hash_value = (
      8    select
      9            hash_value
    10    from
    11            v$sql
    12    where
    13            sql_text like 'select * from bind_peek_test%'
    14    );
    CARDINALITY
           1000
    SQL>
    SQL> spool offRegards,
    Randolf
    Oracle related stuff blog:
    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/

  • Domain index query takes 12 hours to execute

    Hi Friends,
    My query which uses domain index takes 12 hours to execute. Can you please help me tuning this query?
    select /*+ NO_UNNEST ORDERED index_ffs(Term idx_recanon_term_ysm1) parallel_index(Term, idx_recanon_term_ysm1, 8) */ term.rowid
    from cmpgn.recanon_search_terms,cmpgn.recanon_term_ysm Term
    where cmpgn.recanon_search_terms.search_type=3 and
    contains(Term.RAW_TERM_TEXT,cmpgn.recanon_search_terms.search_text) > 0 and
    Term.pod_id=11
    Thanks in advance.
    Regards
    Bala

    First your driving table is recanon_search_terms to get the required search terms, then use them to query Oracle Text. What you are trying to do is to get a subset of table term first and than run every individual row of table term against the search terms. This approach will take a very long time.
    Not sure what you want to do, but it looks something I have been working on previously. As far I can see there is a table with controlled terms which are matched against other raw terms in a text document using Oracle Text. The issue is that you do a join in the contains clause without knowing the number of query expressions formed. It can be that 7 thousand individual queries run at once, than use indexes of the other predicates, do some sorting, etc. which would explain the long time needed. It will probably run out of memory causing all sorts of issues.
    As a quick fix try first following statement without hints.
    Tell us how many rows you get, the distinct counts for pod_id and search_type and how long it takes.
    CREATE TABLE test_table AS
    select term.pod_id pod_id, cmpgn.recanon_search_terms.search_type search_type, term_primary_key, ....
    from cmpgn.recanon_search_terms,cmpgn.recanon_term_ysm Term
    where contains(Term.RAW_TERM_TEXT,cmpgn.recanon_search_terms.search_text) > 0
    Create index test_idx on test_table(pod_id, search_type) and use test_table instead to get the results, just by providing pod_id and search_type without the join in the contains clause.
    SELECT ..
    FROM test_table
    WHERE pod_id = X
    AND search_type = Y
    Maybe this approach is sufficient for your purpose. For sure, it will give you instant results. In that case a materialized view instead of the table could work for maintenance reasons; I had some issues with materialized views for above scenario.
    However check very carefully the results. I would have some doubts that all rows in search_text form a valid query expression for Oracle Text. If search_text has just single tokens or phrases wrapping curly brackets around will probably resolve the issue.
    Think about to form one query expression through a function call instead of a table join inside the contains clause. Sometimes to run a set of individual queries are faster than one big query.
    select term.rowid --, form_query_exrpession(3) query_exrpession
    from cmpgn.recanon_term_ysm Term
    where contains(Term.RAW_TERM_TEXT, form_query_exrpession(3)) > 0
    The above function will form one valid Oracle Text query expression by using the table recanon_search_terms inside the function. This approach normally helps, at least in debugging and fine-tuning. Avoid using bind variables first in order to identify highly skewed distribution of search_type.
    The other performance issue is the additional predicate of pod_id = X, here the suggestion from radord works very well. If you want to get your hands dirty have a look at user_datastore in the Oracle Text documentation, this will give you all the freedom you want.

  • ORA-29857: domain indexes and/or secondary objects exist in the tablespace

    I tried to drop tablespace APPS_TS_TX_DATA using drop tablespace APPS_TS_TX_DATA including contents and datafiles cascade constraints.
    I got error ORA-29857: domain indexes and/or secondary objects exist in the tablespace.
    After I have dropped all domain indexes, then tried to drop tablespace again, I still got the same error. I have searched metalink regarding this error, there is no hit.
    What exactly objects in the tablespace are prevenng dropping the tablespaces?

    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    ILMU88>
    ILMU88> SELECT COUNT(*)
    2 FROM dba_segments
    WHERE tablespace_name = 'APPS_TS_TX_DATA';
    3
    COUNT(*)
    14190
    drop tablespace APPS_TS_TX_DATA including contents and datafiles cascade constraints;
    drop tablespace APPS_TS_TX_DATA including contents and datafiles cascade constraints
    ERROR at line 1:
    ORA-29857: domain indexes and/or secondary objects exist in the tablespace

  • Error in Application log SCOM mgmt server 25934 Credentials are null for user

    Hi,   We recently started getting errors like the one shown below on one of our SCOM management servers.
    Any thoughts on what might be causing this and why this shows on a scom server.   There is no VMM stuff installed on this SCOM server.
    Thanks in advance.
    System
    Provider
    [ Name]
    Microsoft.SystemCenter.VirtualMachineManager.2012.Report.VMUsageCollection
    EventID
    25934
    [ Qualifiers]
    0
    Level
    2
    Task
    0
    Keywords
    0x80000000000000
    TimeCreated
    [ SystemTime]
    2014-01-28T18:08:24.000000000Z
    EventRecordID
    287618
    Channel
    Application
    Computer
    XXXX
    Security
    EventData
    Credentials are null for user:
    Thanks Lance

    Hi,
    If agent is installed on the VMM server, it will collect the information and send it to SCOM server. The event indicates the SCOM agent tried to access the registry key that was included in the User Profile but failed.
    Please specify a local account or domain account as the SCOM action account for a test.
    Niki Han
    TechNet Community Support

Maybe you are looking for

  • How to use BRF in Business Transaction?

    Hi Experts, In a business transaction, for example there is the field Last name. I need to apply a BRF in order to check if the field is initial or not. Can anyone suggest how can the link between the field in the business transaction and the BRF obj

  • Problem starting managed server in Cluster

    Hi, I'm using cluster with 2 managed server. other managed server2 is runing ok in the cluster now when I am starting managed server1 in a cluster this error is coming The WebLogic Server encountered a critical failure Reason: Assertion violated Exce

  • Query Tuning Assistance - part 6

    1061 - access("A"."INVOICE_NBR"=:B1) 1062 - filter("FIN_AGING_ARG"."CREDIT_STATUS"='0' OR "FIN_AGING_ARG"."CREDIT_STATUS"='1' AND "S1_CUSTOMER_DATA"."HOLD_FLAG"='Y' OR "FIN_AGING_ARG"."CREDIT_STATUS"='2' AND "S1_CUSTOMER_DATA"."CREDIT_LIMIT" IS NOT N

  • Session Count not dropping in BOE XI

    Iam calling crystal reports using url reporting. ie. calling OpenDocument.aspx page from a custom asp webpage. Iam able to create a token and then redirect to the OpenDocument.aspx correctly. But iam facing 2 issues : 1. The session created does not

  • Can't seem to save non-English as text from PDF using Reader

    I have several PDF documents that were originally generated by OpenOffice from a UTF8-encoded text file. The text is in different languages, e.g. Korean, Arabic, Russian, English. When I open these documents and then "save as text", the resulting tex