Implementing Rank / Partitioned Index

Has anyone implemented a partitioned RANK in Power Query? I understand I can Sort and then create an Index, but how can I define partitions for the index? Is there some way I can make it restart with each new partition value?
For instance, I want to rank company performance in each sport:
let
Source = Table.FromRecords(
{[Company = "Company A", Event = "Swimming", Points = 8],
[Company = "Company A", Event = "Running", Points = 5],
[Company = "Company B", Event = "Swimming", Points = 10],
[Company = "Company B", Event = "Running", Points = 2],
[Company = "Company C", Event = "Swimming", Points = 2],
[Company = "Company C", Event = "Running", Points = 4] })
in
#"Source"
Is there a way to do this, besides manually filtering to a single sport, doing the Sort + Index, repeating this step for each sport, and then appending these steps?

Since there is a built-in rank function in Power Pivot and you have more control over filtering etc., if one has the choice, then Power Pivot is the better option. On the other hand, Curt provides a fine solution if you need to do the equivalent in Power
Query.
It appears though, that you'd rather not have an index column and the lot. An alternative solution involves using a couple of portable custom functions.
ListRankEqual:
(inputValue as any, inputSeries as list, optional orderDescending as nullable logical) as number =>
let
    SortedSeries = if not orderDescending or orderDescending = null then
                    List.Sort(inputSeries,Order.Descending)
                 else
                    List.Sort(inputSeries),
    RankEqual = List.PositionOf(SortedSeries,inputValue)+1
in
    RankEqual
The function has two mandatory parameters and one optional parameter. In your example, inputValue would be the current value in the Points column, specified as [Points] when passed to the function. inputSeries would be the entire Points column, or in this
case, a subset of the Points column. In the body of the function, we sort inputSeries in
descending order to get the rank in ascending order and vice versa.
The second function I call GroupList. I tend to use this function when I want to group a column, but retain the original columns in a table. In your example, we want to rank Swimming and Running independently. Therefore, we need
to create a Swimming points list and a Running points list for the ListRankEqual function.
The code for GroupList:
(keyColumnList as list, keyColumnValue as any, associatedColumnList as list)=>
let
    FilteredKeyColumnPositions = List.PositionOf(keyColumnList, keyColumnValue, Occurrence.All),
    FilteredGroupList = List.Transform(FilteredKeyColumnPositions, each associatedColumnList{_})
in
   FilteredGroupList
keyColumnList is the list of values in the grouping column. In this case, it would be specified as
Source[Event]. keyColumnValue is the current value in the Event column, specified as [Event]. associatedColumnList is the column with the values you want to rank (Source[Points]).
GroupList first finds all the positions of the current value in the Event column. It then uses List.Transform to produce a corresponding Point list. The Swimming event will produce a list containing all of the points for Swimming, and the Running event
will produce a list containing all of the points for Running.
The complete custom formula would be:
ListRankEqual([Points],GroupList(Source[Event],[Event],Source[Points]))
You just toss the formula into a new custom column.

Similar Messages

  • Rank() partition by in webi

    Dear All,
    I'm having requirement to implement rank() partition by  order by in webi report.
    How can achieve it without help of universe. I have to impliment in Report level.
    Thanks for your Help
    Regards,
    Shekar

    Have you tried using calculation context at the webi formula level.. The process is quite simple actually at the report level..
    If you have not used calc context before then suggest you to go through one of my blog below
    Understanding calculation Context (Basics)
    The formula should be fairly simple.. something like
    rank([revenue]) in ([Dim1])

  • Index issue with or and between when we set one partition index to unusable

    Need to understand why optimizer unable to use index in case of "OR" whenn we set one partition index to unusable, the same query with between uses index.
    “OR” condition fetch less data comparing to “BETWEEN” still oracle optimizer unable to use indexes in case of “OR”
    1. Created local index on partitioned table
    2. ndex partition t_dec_2009 set to unusable
    -- Partitioned local Index behavior with “OR” and with “BETWEEN”
    SQL> CREATE TABLE t (
      2    id NUMBER NOT NULL,
      3    d DATE NOT NULL,
      4    n NUMBER NOT NULL,
      5    pad VARCHAR2(4000) NOT NULL
      6  )
      7  PARTITION BY RANGE (d) (
      8    PARTITION t_jan_2009 VALUES LESS THAN (to_date('2009-02-01','yyyy-mm-dd')),
      9    PARTITION t_feb_2009 VALUES LESS THAN (to_date('2009-03-01','yyyy-mm-dd')),
    10    PARTITION t_mar_2009 VALUES LESS THAN (to_date('2009-04-01','yyyy-mm-dd')),
    11    PARTITION t_apr_2009 VALUES LESS THAN (to_date('2009-05-01','yyyy-mm-dd')),
    12    PARTITION t_may_2009 VALUES LESS THAN (to_date('2009-06-01','yyyy-mm-dd')),
    13    PARTITION t_jun_2009 VALUES LESS THAN (to_date('2009-07-01','yyyy-mm-dd')),
    14    PARTITION t_jul_2009 VALUES LESS THAN (to_date('2009-08-01','yyyy-mm-dd')),
    15    PARTITION t_aug_2009 VALUES LESS THAN (to_date('2009-09-01','yyyy-mm-dd')),
    16    PARTITION t_sep_2009 VALUES LESS THAN (to_date('2009-10-01','yyyy-mm-dd')),
    17    PARTITION t_oct_2009 VALUES LESS THAN (to_date('2009-11-01','yyyy-mm-dd')),
    18    PARTITION t_nov_2009 VALUES LESS THAN (to_date('2009-12-01','yyyy-mm-dd')),
    19    PARTITION t_dec_2009 VALUES LESS THAN (to_date('2010-01-01','yyyy-mm-dd'))
    20  );
    SQL> INSERT INTO t
      2  SELECT rownum, to_date('2009-01-01','yyyy-mm-dd')+rownum/274, mod(rownum,11), rpad('*',100,'*')
      3  FROM dual
      4  CONNECT BY level <= 100000;
    SQL> CREATE INDEX i ON t (d) LOCAL;
    SQL> execute dbms_stats.gather_table_stats(user,'T')
    -- Mark partition t_dec_2009 to unusable:
    SQL> ALTER INDEX i MODIFY PARTITION t_dec_2009 UNUSABLE;
    --- Let’s check whether the usable index partition can be used to apply a restriction: BETWEEN
    SQL> SELECT count(d)
        FROM t
        WHERE d BETWEEN to_date('2009-01-01 23:00:00','yyyy-mm-dd hh24:mi:ss')
                    AND to_date('2009-02-02 01:00:00','yyyy-mm-dd hh24:mi:ss');
    SQL> SELECT * FROM table(dbms_xplan.display_cursor(format=>'basic +partition'));
    | Id  | Operation               | Name | Pstart| Pstop |
    |   0 | SELECT STATEMENT        |      |       |       |
    |   1 |  SORT AGGREGATE         |      |       |       |
    |   2 |   PARTITION RANGE SINGLE|      |    12 |    12 |
    |   3 |    INDEX RANGE SCAN     | I    |    12 |    12 |
    --- Let’s check whether the usable index partition can be used to apply a restriction: OR
    SQL> SELECT count(d)
        FROM t
        WHERE
        (d >= to_date('2009-01-01 23:00:00','yyyy-mm-dd hh24:mi:ss') and d <= to_date('2009-01-01 23:59:59','yyyy-mm-dd hh24:mi:ss'))
        or
        (d >= to_date('2009-02-02 01:00:00','yyyy-mm-dd hh24:mi:ss') and d <= to_date('2009-02-02 02:00:00','yyyy-mm-dd hh24:mi:ss'))
    SQL> SELECT * FROM table(dbms_xplan.display_cursor(format=>'basic +partition'));
    | Id  | Operation           | Name | Pstart| Pstop |
    |   0 | SELECT STATEMENT    |      |       |       |
    |   1 |  SORT AGGREGATE     |      |       |       |
    |   2 |   PARTITION RANGE OR|      |KEY(OR)|KEY(OR)|
    |   3 |    TABLE ACCESS FULL| T    |KEY(OR)|KEY(OR)|
    ----------------------------------------------------“OR” condition fetch less data comparing to “BETWEEN” still oracle optimizer unable to use indexes in case of “OR”
    Regards,
    Sachin B.

    Hi,
    What is your database version????
    I ran the same test and optimizer was able to pick the index for both the queries.
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL>
    SQL> set autotrace traceonly exp
    SQL>
    SQL>
    SQL>  SELECT count(d)
      2  FROM t
      3  WHERE d BETWEEN to_date('2009-01-01 23:00:00','yyyy-mm-dd hh24:mi:ss')
      4              AND to_date('2009-02-02 01:00:00','yyyy-mm-dd hh24:mi:ss');
    Execution Plan
    Plan hash value: 2381380216
    | Id  | Operation                 | Name | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | SELECT STATEMENT          |      |     1 |     8 |    25   (0)| 00:00:01 |       |       |
    |   1 |  SORT AGGREGATE           |      |     1 |     8 |            |          |       |       |
    |   2 |   PARTITION RANGE ITERATOR|      |  8520 | 68160 |    25   (0)| 00:00:01 |     1 |     2 |
    |*  3 |    INDEX RANGE SCAN       | I    |  8520 | 68160 |    25   (0)| 00:00:01 |     1 |     2 |
    Predicate Information (identified by operation id):
       3 - access("D">=TO_DATE(' 2009-01-01 23:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "D"<=TO_DATE(' 2009-02-02 01:00:00', 'syyyy-mm-dd hh24:mi:ss'))
    SQL>  SELECT count(d)
      2  FROM t
      3  WHERE
      4  (
      5  (d >= to_date('2009-01-01 23:00:00','yyyy-mm-dd hh24:mi:ss') and d <= to_date('2009-01-01 23:59:59','yyyy-mm-dd hh24:mi:ss'
      6  or
      7  (d >= to_date('2009-02-02 01:00:00','yyyy-mm-dd hh24:mi:ss') and d <= to_date('2009-02-02 02:00:00','yyyy-mm-dd hh24:mi:ss'
      8  );
    Execution Plan
    Plan hash value: 3795917108
    | Id  | Operation                | Name | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | SELECT STATEMENT         |      |     1 |     8 |     4   (0)| 00:00:01 |       |       |
    |   1 |  SORT AGGREGATE          |      |     1 |     8 |            |          |       |       |
    |   2 |   CONCATENATION          |      |       |       |            |          |       |       |
    |   3 |    PARTITION RANGE SINGLE|      |    13 |   104 |     2   (0)| 00:00:01 |     2 |     2 |
    |*  4 |     INDEX RANGE SCAN     | I    |    13 |   104 |     2   (0)| 00:00:01 |     2 |     2 |
    |   5 |    PARTITION RANGE SINGLE|      |    13 |   104 |     2   (0)| 00:00:01 |     1 |     1 |
    |*  6 |     INDEX RANGE SCAN     | I    |    13 |   104 |     2   (0)| 00:00:01 |     1 |     1 |
    Predicate Information (identified by operation id):
       4 - access("D">=TO_DATE(' 2009-02-02 01:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "D"<=TO_DATE(' 2009-02-02 02:00:00', 'syyyy-mm-dd hh24:mi:ss'))
       6 - access("D">=TO_DATE(' 2009-01-01 23:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "D"<=TO_DATE(' 2009-01-01 23:59:59', 'syyyy-mm-dd hh24:mi:ss'))
           filter(LNNVL("D"<=TO_DATE(' 2009-02-02 02:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR
                  LNNVL("D">=TO_DATE(' 2009-02-02 01:00:00', 'syyyy-mm-dd hh24:mi:ss')))
    SQL> set autotrace off
    SQL>Asif Momen
    http://momendba.blogspot.com

  • Parallel creation of partitionned index and tablespace Temp size

    Hi,
    I'am not able to find the information if when building in parallel a locally partitionned index, Oracle will iterate on all the partition and then use temp tbs for one partitionned or it will compute for all the partitionned simultaneously ?
    Thanks for your help

    If I understand your question correctly, the temp tablespace is used for sorting, but there are temp segments created in the tablespaces where the indices will actually belong. See the demo on how to work it out for yourself: http://hemantoracledba.blogspot.com/2008/05/temporary-segments-in-dataindex.html
    Also find Randolf's blog for some other interesting factoids: http://oracle-randolf.blogspot.com/2011/02/parallel-dml-conventional-non-direct.html

  • Partition index are not visible after import in 11g

    Hi,
    target database : oracle version : 11.2.0.1
    Source database : 10.2.0.4
    i have a table in 10.2.0.4 and need to transfer to 11.2.0.1
    SQL> SELECT i.index_name, i.partition_name
    FROM dba_ind_partitions i, dba_tab_partitions t
    WHERE i.partition_name = t.partition_name
    AND t.table_name = 'BKPG';
      2    3    4
    INDEX_NAME                     PARTITION_NAME
    I_BKPG_ACT_REC_IDX             BKPG_2010_JUN_DEC
    I_BKPG_ACCT_ACTD_REC_IDX       BKPG_2010_JUN_DEC
    I_BKPG_ACCT_REC_ACT_IDX        BKPG_2010_JUN_DEC
    I_BKPG_STLM_REC_ACC_IDX        BKPG_2010_JUN_DEC
    I_BKPG_STLM_ACC_REC_IDX        BKPG_2010_JUN_DEC
    I_BKPG_ORD_IDX                 BKPG_2010_JUN_DEC
    I_BKPG_TDATE_REC_BS_IDX        BKPG_2010_JUN_DEC
    I_BKPG_CUSIP                   BKPG_2010_JUN_DEC
    I_BKPG_ACCT_TRDDTE_REC_IDX     BKPG_2010_JAN_JUN
    I_BKPG_ACCT_ACTD_REC_IDX       BKPG_2010_JAN_JUN
    I_BKPG_TDATE_REC_BS_IDX        BKPG_2010_JAN_JUN
    INDEX_NAME                     PARTITION_NAME
    I_BKPG_ACCT_REC_ACT_IDX        BKPG_2010_JAN_JUN
    I_BKPG_ACT_REC_IDX             BKPG_2010_JAN_JUN
    I_BKPG_ORD_IDX                 BKPG_2010_JAN_JUN
    I_BKPG_STLM_ACC_REC_IDX        BKPG_2010_JAN_JUN
    I_BKPG_ACCT_TRDDTE_REC_IDX     BKPG_2010_JUN_DEC
    I_BKPG_CUSIP                   BKPG_2010_JAN_JUN
    I_BKPG_STLM_REC_ACC_IDX        BKPG_2010_JAN_JUN
    18 rows selected.i took the export of this table and during import i used follwing parameters
    impdp directory=TEST transform=segment_attributes:n REMAP_SCHEMA=dev:prakash1 dumpfile=BKPG1.dmp -> as to avoid the storage clause error i used transform=segment_attributes:n
    import went sucessfull but if i query below sql zero rows returns
    SQL> SELECT i.index_name, i.partition_name
    FROM dba_ind_partitions i, dba_tab_partitions t
    WHERE i.partition_name = t.partition_name
    AND t.table_name = 'BKPG';
      2    3    4
    no rows selectedwhy i am not able to query partitions index , please advice
    Thanks

    Thanks for the update,
    i am unbale to see these index partitions in the views dba_ind_partitions but i am able to see in dba_objects;
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    OBJECT_NAME                              OBJECT_TYPE
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    I_BKPG_ACCT_TRDDTE_REC_IDX               INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    OBJECT_NAME                              OBJECT_TYPE
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    I_BKPG_CUSIP                             INDEX PARTITION
    .why i am unable to see in dba_ind_partitions view
    Thanks

  • SDO_UTIL.PREPARE_FOR_TTS  and Partitioned Indexes

    Does this procedure work with partitioned indexes?
    After executing this procedure on tablespace that contains the first partition of the partition index, the table SDO_INDEX_TTS_METADATA$ is empty. In addition, I can only run this procedure once, it fails for each subsequent tablespace which has a partition.
    When I execute the procedure on a tablespace with a non partitioned index the SDO_INDEX_TTS_METADATA$ table is populated.

    Thanks Dear ,
    for your immediate reply .....
    As u suggest I have tried all the following combitation but still it does not work;
    SDO_UTIL.INITIALIZE_INDEX*ES*FORTTS;
    SDO_UTIL.INITIALIZE_INDEXES_FOR_TTS;
    SDO_UTIL.INITIALIZE_INDEX_FOR_TTS;
    it gives same error....
    Thanks & Regards
    Chandrakishore Bankhede

  • Re-org oracle 11.1.0.7 partitioned and sub partitioned index not validiting

    Hi,
    As part of maintenance i did the following thing on the oracle 11.1.0.7 on windows (no archive log mode);
         Re-orgnaized the tables in application- data tablespace - done
         Re-orgnaized large table in SYSAUX tablespace - only one table (alter table sys.WRI$_OPTSTAT_HISTGRM_HISTORY move tablespace sysaux
    alter index sys.I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST rebuild nologging;
    alter index sys.I_WRI$_OPTSTAT_H_ST rebuild nologging;)
         Re-built the indexes on applicaton index tbs- done
         Re-built the partition indexes on application index tbs - done
         rebuilding of indexes in SYSAUX - done since it was invalid
         Run the analyze job –
         Re-claim the space at database level and OS level
    but i have the issues of partitioned and subpartition indexes are not validating..how to validate the indexes i am using the below querires but:
    ORA-14287: cannot REBUILD a partition of a Composite Range partitioned i

    i am using the below sqls:
    set head off
    set linesize 200
    select 'alter index '||index_owner||'.'||index_name||' rebuild partition '||partition_name||' ; ' from dba_ind_partitions where status <> 'VALID' and index_owner not in ('SYS','SYSTEM')
    set head off
    set linesize 200
    select 'alter index '||index_owner||'.'||index_name||' rebuild subpartition '||subpartition_name||' ;'
    from dba_ind_subpartitions
    where status <> 'VALID'

  • ORA-00604 ORA-00904 When query partitioned table with partitioned indexes

    Got ORA-00604 ORA-00904 When query partitioned table with partitioned indexes in the data warehouse environment.
    Query runs fine when query the partitioned table without partitioned indexes.
    Here is the query.
    SELECT al2.vdc_name, al7.model_series_name, COUNT (DISTINCT (al1.vin)),
    al27.accessory_code
    FROM vlc.veh_vdc_accessorization_fact al1,
    vlc.vdc_dim al2,
    vlc.model_attribute_dim al7,
    vlc.ppo_list_dim al18,
    vlc.ppo_list_indiv_type_dim al23,
    vlc.accy_type_dim al27
    WHERE ( al2.vdc_id = al1.vdc_location_id
    AND al7.model_attribute_id = al1.model_attribute_id
    AND al18.mydppolist_id = al1.ppo_list_id
    AND al23.mydppolist_id = al18.mydppolist_id
    AND al23.mydaccytyp_id = al27.mydaccytyp_id
    AND ( al7.model_series_name IN ('SCION TC', 'SCION XA', 'SCION XB')
    AND al2.vdc_name IN
    ('PORT OF BALTIMORE',
    'PORT OF JACKSONVILLE - LEXUS',
    'PORT OF LONG BEACH',
    'PORT OF NEWARK',
    'PORT OF PORTLAND'
    AND al27.accessory_code IN ('42', '43', '44', '45')
    GROUP BY al2.vdc_name, al7.model_series_name, al27.accessory_code

    I would recommend that you post this at the following OTN forum:
    Database - General
    General Database Discussions
    and perhaps at:
    Oracle Warehouse Builder
    Warehouse Builder
    The Oracle OLAP forum typically does not cover general data warehousing topics.

  • Possible to create partitioned index one partition at a time?

    I have a really large partitioned table. Wanted to know if I can create the partitioned index, one partition at a time? Trying to limit the amount of resources required to throw at it. Note this is not a rebuild or reindex operation. This is a brand new index on a multi-terabyte table.
    .. just throwing this out there...
    Thanks for any insights..
    Daryl.

    Daryl E. wrote:
    I have a really large partitioned table. Wanted to know if I can create the partitioned index, one partition at a time? Trying to limit the amount of resources required to throw at it. Note this is not a rebuild or reindex operation. This is a brand new index on a multi-terabyte table.
    You can create the index "unusable", then alter each partition in turn to make it usable.
    The side effects on optimisation and DML may vary with version of Oracle and whether the index is unique or non-unique.
    Regards
    Jonathan Lewis

  • 10g:  How to determine Local Partition Index Space UTILIZATION

    I'm trying to determine how much space is actually utilized by different local partition indexes. Some are b-tree and some are bitmap. So far when I query dba_segments and dba_part_indexes I just see space available, not the space utilized.
    Does anybody know a way to know the actual space utilized by a local partition index?

    Does anybody know a way to know the actual space utilized by a local partition index?SUM(BYTES) from dba_extents
    SQL> desc dba_extents
    Name                            Null?    Type
    OWNER                                  VARCHAR2(30)
    SEGMENT_NAME                             VARCHAR2(81)
    PARTITION_NAME                         VARCHAR2(30)
    SEGMENT_TYPE                             VARCHAR2(18)
    TABLESPACE_NAME                        VARCHAR2(30)
    EXTENT_ID                             NUMBER
    FILE_ID                             NUMBER
    BLOCK_ID                             NUMBER
    BYTES                                  NUMBER
    BLOCKS                              NUMBER
    RELATIVE_FNO                             NUMBER

  • Interval partitioning indexes

    Hi,
    I am unable to get the indexes interval partitioned, it always throws "ORA-00906: missing left parenthesis"
    Example:
    -- interval partitioning the table works fine as below
    create table t1 (partitionID number, name varchar2(200))
    partition by range (partitionID) interval (1)
    (partition p1 values less than (2))
    -- Now, lets try building a global interval partitioned index on this
    -- Though it is possible to simply tag it as local, I would like to create it as global for other reasons
    create unique index t1_u1 on t1(partitionID) global
    partition by range (partitionID) interval (1)
    (partition p1 values less than (2))
    Index creation as above fails for me with "ORA-00906: missing left parenthesis" and I can't figure out why it is doing so.
    I tried to see if I can range partition the index and add interval later, but that fails too
    SQL> create unique index t1_u1 on t1(partitionID) global
    2 partition by range (partitionID)
    3 (partition p1 values less than (MAXVALUE));
    Index created.
    SQL> alter index t1_u1 set interval (1);
    alter index t1_u1 set interval (1)
    ERROR at line 1:
    ORA-02243: invalid ALTER INDEX or ALTER MATERIALIZED VIEW option
    Isn't interval partitioning not supported for indexes ?

    Isn't interval partitioning not supported for indexes ?When all else fails, Read The Fine Manual
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1008.htm#i2050158

  • How to query/find storage clause info for partitioned index?

    In OEM if you click on an index name, and that index is not partitioned, there is a section of the resulting web page that gives you info about the storage options (e.g. Initial Extent Size, Buffer Pool, etc) for that index under a "Storage" heading. If however, you look at this page for a partitioned index this "Storage" section doesn't seem to be there. Any ideas why?
    If I can't get this info through OEM, any idea what view/table I might query to find out what storage options are configured for a partitioned index?
    Thank you -- I'm probably just missing this info in OEM somewhere. . .

    Not posting a version usually doesn't result in accurate replies.
    the info is in dba_ind_partitions.
    Sybrand Bakker
    Senior Oracle DBA

  • IMPLEMENTATION OF BITMAP INDEXING

    I have a question regarding implementation of BitMap Indexing.
    While using BitMap Indexing over a low cardinality column in a table having huge records (say 5 Million), what would be the approaches to reach to the record in the table that are stored in the file.
    For example supoose in a query we have a condition
    "gender = 'M'"
    Now if we apply BitMap Index over column "Gender" and select couple of records through masking Can anybody suggest a better approach so that corresponding records can be selected.
    Wait for an intelligent reply from Masters.
    Thanks.

    Guessing...
    You 'index' the data and create 'groups' which already match each bit.
    Obviously this can get complicated when the data changes. You either have to re-index at some time. You can do it immediately, or you can do it at some other interval. The first is an obvious performance problem. The second requires that you keep an un-indexed cache.

  • Question about the partition index

    Hi, all, I have some questions about partitioned index.
    And I get from oracle documents that oracle's partition index can be clarified as local partition index and global partition index.
    And local partition index can be clarified as prefix local partition index and non-prefix local partition index. And I also the word "global prefix partition index".
    But, I can not get what the exact meaning after I consulted many documents and notes from website.
    Can anyone give me one example to cover these topic?
    You help is very thankful!
    Thanks and best regards!

    Hi,
    Local index search by partition.
    Local Indexes: A local index is an index on a partitioned table which is partitioned in the exact same manner as the underlying partitioned table. Each partition of a local index corresponds to one and only one partition of the underlying table.
    Global Partitioned Indexes: A global partitioned index is an index on a partitioned or non-partitioned table which is partitioned using a different partitioning-key from the table. Global-partitioned indexes can only be partitioned using range partitioning. For example, a table could be range-partitioned by month and have twelve partitions, while an index on that table could be range-partitioned using a different partitioning key and have a different number of partitions.
    Global Non-Partitioned Indexes: A global non-partitioned index is essentially identical to an index on a non-partitioned table. The index structure is not partitioned.
    Maybe this links help you:
    http://www.oracle.com/technology/products/oracle9i/datasheets/partitioning.html
    http://asktom.oracle.com/pls/ask/f?p=4950:8:12026637104196321871::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:678824574412
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1612281449571
    Cheers

  • Creating Local partitioned index on Range-Partitioned table.

    Hi All,
    Database Version: Oracle 8i
    OS Platform: Solaris
    I need to create Local-Partitioned index on a column in Range-Partitioned table having 8 million records, is there any way to perform it in fastest way.
    I think we can use Nologging, Parallel, Unrecoverable options.
    But while considering Undo and Redo also mainly time required to perform this activity....Which is the best method ?
    Please guide me to perform it in fastest way and also online !!!
    -Yasser

    YasserRACDBA wrote:
    3. CREATE INDEX CSB_CLIENT_CODE ON CS_BILLING (CLIENT_CODE) LOCAL
    NOLOGGING PARALLEL (DEGREE 14) online;
    4. Analyze the table with cascade option.
    Do you think this is the only method to perform operation in fastest way? As table contain 8 million records and its production database.Yasser,
    if all partitions should go to the same tablespace then you don't need to specify it for each partition.
    In addition you could use the "COMPUTE STATISTICS" clause then you don't need to analyze, if you want to do it only because of the added index.
    If you want to do it separately, then analyze only the index. Of course, if you want to analyze the table, too, your approach is fine.
    So this is how the statement could look like:
    CREATE INDEX CSB_CLIENT_CODE ON CS_BILLING (CLIENT_CODE) TABLESPACE CS_BILLING LOCAL NOLOGGING PARALLEL (DEGREE 14) ONLINE COMPUTE STATISTICS;
    If this operation exceeds particular time window....can i kill the process?...What worst will happen if i kill this process?Killing an ONLINE operation is a bit of a mess... You're already quite on the edge (parallel, online, possibly compute statistics) with this statement. The ONLINE operation creates an IOT table to record the changes to the underlying table during the build operation. All these things need to be cleaned up if the operation fails or the process dies/gets killed. This cleanup is supposed to be performed by the SMON process if I remember correctly. I remember that I once ran into trouble in 8i after such an operation failed, may be I got even an ORA-00600 when I tried to access the table afterwards.
    It's not unlikely that your 8.1.7.2 makes your worries with this kind of statement, so be prepared.
    How much time it may take? (Just to be on safer side)The time it takes to scan the whole table (if the information can't read from another index), the sorting operation, plus writing the segment, plus any wait time due to concurrent DML / locks, plus the time to process the table that holds the changes that were done to the table while building the index.
    You can try to run an EXPLAIN PLAN on your create index statement which will give you a cost indication if you're using the cost based optimizer.
    Please suggest me if any other way exists to perform in fastest way.Since you will need to sort 8 million rows, if you have sufficient memory you could bump up the SORT_AREA_SIZE for your session temporarily to sort as much as possible in RAM.
    -- Use e.g. 100000000 to allow a 100M SORT_AREA_SIZE
    ALTER SESSION SET SORT_AREA_SIZE = <something_large>;
    Regards,
    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/

Maybe you are looking for

  • Re-installing itunes on my windows PC is no longer possible, why?

    I have an ipod and an ipad. First I lost most of my 14,000 songs when trying to synchronize with a re insatlled version of itunes, now I cannot download itunes at all: the message i get is that installing itunes is not possible due to an error in Win

  • Host command, change directory where it opens command prompt

    I'm using the HOST command to host out to the command prompt. What I want to know is how to change the directory that the command prompt opens up at. I want it to open up at the c:\ but instead it's opening up at in the forms60 path where forms is in

  • Trouble copying a large number of objects using Acrobat X

    Acrobat X is many times slower than Acrobat 9 when copying a large number of objects in a PDF.  What used to take one second in Acrobat 9, now takes upwards of 45 seconds or longer in Acrobat X and often causes the application to crash.  I am using 1

  • External link issues with FF7+

    Hello, after updating to FF7 (and now 7.01) most external links (widgets, etc.) are not displaying. Such as the twitter and facebook widgets. They won't display. Also on twitter, the right column thumbnails of photos (twitpic, etc.) are not displayin

  • I still trying load cs5.5

    i bought a registered this last year  i need to downlaod software have serial number . as disk is damaged need to contine couse . abode want me to buy cs6 but cant aford 375.00 student adition as i just 12 month i should be able to reload