Local and Global Index confusion...

Hi all

Oracle Database 10 g Enterprise Edition Release 10.2.0.3.0 - 64 bit

I have a partitioned table, when developing the application, they have committed an index ON this table. Previously, whenever we use to run 'Alter Table add partition..' global index becomes unusable and I used to rebuild the same. But in recent months, each time we add partition (Alter Table... ADD Partition..) on this table, index will get unusable to stat instead it shows that indexes THE data dictionaries (Lacality = Local in USER_PART_INDEXES). Partitioned indexes are also automatically created with each table partition creation.

But the query below shows the output indexes are GLOBAL.

Select double dbms_metadata.get_ddl('INDEX','ABCD','USER_A');

Can someone me help on what actually happened here.

But the example above has the keyword LOCAL?

CREATING INDEX 'SEB '. "" CDRV_I1 ""SEBS ". "" CDRV ' ('CDRV_CURNT_FL', 'IND_LAST_VERSN', 'GMT_SEIZ_DT_TIME', 'CLECT_ZONE', 'CALL_ID',

"SWTCH_ADMIN_ABBR")

PCTFREE, INITRANS 10 2 MAXTRANS 255 LOGGING

STORAGE (INITIAL 10485760 NEXT 10485760 MINEXTENTS 2 MAXEXTENTS 2147483645)

PCTINCREASE 0 DEFAULT USER_TABLES)

"SEBS_CDRV_TAB" of LOCAL TABLESPACE

(PARTITION "CDRV_HISTORIC"

PCTFREE, INITRANS 10 2 MAXTRANS 255

STORAGE (INITIAL 10485760 NEXT 10485760 MINEXTENTS 2 MAXEXTENTS 2147483645)

PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 DEFAULT USER_TABLES)

TABLESPACE "SEBS_CDRV_TAB."

If it looks like a duck and quacks like a duck, it is very probably a duck (or the local index)

See you soon

Richard Foote

http://richardfoote.WordPress.com/

Tags: Database

Similar Questions

  • partation local and global index

    Hello

    I want partation tables in my database.
    Can someone tell me what exactly the difference between the local index & glabal.
    is there any link which can give me more informetion about the same.

    Thank you

    Local index is the index that is created on the partition key column name.

    Hi Anand

    Just to be clear, that a local index must not necessarily be created on partitioned key column, it is simply automatically partitioned in the same way as the underscore.

    If it contains effectively partitioned key columns is completely optional.

    See you soon

    Richard Foote
    http://richardfoote.WordPress.com/

  • Concepts behind them were leaving local and global


    Hello

    I'm not quite sure you understand the difference between local and global scores.

    Can someone explain to me - in easy words - what is the difference between local and global scores?

    Why should I use one rather than another.

    Thank you and best regards.

    I create a table and partition on SALE_DATE.

    I create an Index on it and set it as 'LOCAL '.  It becomes Equi-partitioned as a partitioned local Index.  Each Table of Partition is a Partition of the corresponding Index.

    I create another index and partition on CUSTOMER_ID.  It is partitioned on a different key of the table.  This is a partitioned Index.

    I create another index on PRODUCT_ID without no partitioning.  It is an overall index.

    Hemant K Collette

  • Check the local or global index

    Hi all
    I wanted to know how we confirm/check if an index is local or global on a system of oracle 10 g 2

    Thank you
    Rossy.Rocs

    Lacotte,

    Small correction was need here that the partitioned dba_indexes column will only be "indicates whether the index is partitioned (YES) or not (NO); While op asks how do I know if it is a local or global index. So for that he must check the below command:

    SELECT INDEX_NAME, THE LOCALITY OF USER_PART_INDEXES;

    Column of the locality of user_part_indexes ' indicates if the partitioned index is local (LOCAL) or global (GLOBAL).
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14237/statviews_2015.htm#REFRN20156

    Concerning
    Girish Sharma

  • Get local and global variables using API

    Hi, I do in LV a Publisher for TS. The user should be able to change the value of global variables and the inhabitants of file. Using the TS API, it is possible to get all files of Globals and locals without knowing the name of these variables have ts? I mean, if I knew the name I could use the value of property Get with the search string. But if the I do not know the name of the variable, can I get the list (and their values) of the variable?

    Thank you very much.

    Try the following link

    http://forums.NI.com/NI/board/message?board.ID=330&message.ID=3390&query.ID=6624776#M3390

    In summary:

    Use the GetNumSubProperties method to get the total number of inhabitants / FileGlobals.

    Use GetNthSubProperty to get sub properties using the index starting with 0 to GetNumSubProperties-1

    Use the Name property to get the name of the subproperty.

    Concerning

    Ray Farmer

  • Local partitioned Global Index Index conversion online.

    Hi all
    I use the Release of oracle 10.2.0.4.0 version. As a solution to solve a performance problem, I intend to convert one of the partitioned local index in overall index. Here is the script that I made, but it will take a time out as because other applications may use the same index and will suffer from performance during the transition problem. My question is if I can reach the same onlline, only because the prod database is too busy down time? Please suggest.

    Script:

    drop index INDX_c1c2;

    create the IDX_c1c2 index on tab1 (c1, c2);

    930254 wrote:
    Hi all
    I use the Release of oracle 10.2.0.4.0 version. As a solution to solve a performance problem, I intend to convert one of the partitioned local index in overall index. Here is the script that I made, but it will take a time out as because other applications may use the same index and will suffer from performance during the transition problem. My question is if I can reach the same onlline, only because the prod database is too busy down time? Please suggest.

    Script:

    drop index INDX_c1c2;

    create the IDX_c1c2 index on tab1 (c1, c2);

    Your application will run without index during the time it takes to create. An alternative approach which avoids this would be:

    create index INDX_c1c2null on tab1(c1,c2,null);
    drop index INDX_c1c2;
    

    --
    John Watson
    Oracle Certified Master s/n
    http://skillbuilders.com

    Published by: JohnWatson on February 17, 2013 11:35
    Typo - forgot to change the name of the index

  • problem with the type of local and global

    Hi the gems...

    I have a plsql package. In the package, I defined a proc that takes two input parameters of type simple number and a parameter of a type of output collection.

    create or replace package pack_1 as body
    procedure proc_1 (p_number1 in number, p_number2 number, p_tt_table to tt_table) as
    v_tt_table tt_table:=tt_table();
    type c_ref_cursor is ref_cursor;
    v_c_ref_cursor c_ref_cursor;
    v_sql varchar2 (20000): = < a large sql using bind variables p_number1 and p_number2 >

    Start
    Open the v_c_ref_cursor for v_sql using p_number1, p_number2;
    loop
    extract the v_c_ref_cursor in v_tt_table;
    When the output v_tt_table.count = 0;
    for idx in 1.v_tt_table.count
    loop
    < business logic >
    end of loop
    end loop;
    close v_c_ref_cursor;
    < excpetion_block >;
    end;

    < several codes for the rest of the package >



    When I execute the proc_1 then he throws me error of data type incosistent while to fetch the v_c_ref_cursor of cursor in the v_tt_table variable.
    ORA-00932: inconsistent data types: expected - was -.
    But I have checked that the output of the query is similar with the type of variable.

    Now, a few facts: the tt_table of the user-defined table type is made from ot_table (create or replace tt_table to ot_table Board).
    The parent type i.e. ot_table has the same columns of this query in v_sql my proc.
    The ot_table and the tt_table are global types.

    But when I did these two types as local types, then the proc works very well. But I need them as global types only according to the condition in java.

    Please help me. The database is 11 GR 2.

    Thanks in advance.

    user12780416 wrote:

    I'm trying to keep it in the simplest form... Please take a look...

    Ah... Easy to solve.

    The projection of SQL must be an object of type ot_test_type for extraction in bulk work.

    Your projection of SQL look like this:
    cursor c1 is select object_name from user_objects;

    object_name is a string - it is not of type ot_test_type.

    You must change the projection to return ot_test_type. This is done by using the default constructor for that type of object.

    For example
    cursor c1 is ot_test_type (object_name) select as the user_objects OBJECT;

    He may now be in bulk recovered in tt_test_type.

  • Local and Global filter

    Hello

    What to say by a global and local filter filter, global and local guest quick to OBIEE


    Please urgent.


    Thank you
    JEL

    Global vs Local filter filter:
    global filters are also called saved filters, it can be applied to several reports.

    step 1: go criteria in responses create a filter using Add option filter in any column.
    step 2: save the filter in any shared folders.we can apply this filter to any report containing this particular column.we can select filter recorded in option to filter the left pane.

    If a report contains several blocks as table and chart, you can apply a filter that filters the data of table and chart. It is not only for the two blocks. You can apply a filter to a number n of blocks. This filter is called global filter. Local is a normal filter that can be applied generally on one block.

    Guest of dashboard:

    Guest of dashboard is a special type of filter that filters of query that are integrated with the dashboard.

    Step 1: In Oracle BI answers select new dashboard button in this upscale neighborhood of topic.
    Step 2: Select the scope of the dashboard, if we choose the scope as a page then guest will filter does not show in a particular page.scope is the dashboard then it will filter all reports that are present in this dashboard.
    operator and in step 3, select column
    step 4: select control and constraints
    step 5:set default and set the variables of the presentation if necessary.
    step 6: create labels
    Guest of 7:save stage

    Two types of guests from dashboard:
    Table of edge/Page

    Dashboard: this will get all dashboards
    Page: this will get a particular page only.

  • Local/Global index for OLTP

    In our application (OLTP), we have a rule on

    * "" on all the partitioned tables, we need to have just partitioned LOCAL index "... *"
    I think that this rule is valid, because when we had GLOBAL index partitioned on the table when concurrent transactions
    was going on, we got below error:
    ORA - 00054:resource busy and...
    We get this error when rebuild us all indexes not valid...

    When we changed all the GLOBAL partitioned index at the LOCAL level... we get this error...

    We use MEV for cloud computing (i.e. we have several tenants and a partition for each tenant)


    My doubt is, is the rule as mentioned above may be still valid, because it is at odds with what is mentioned in the Oracle
    Documentation (the concepts guide)...
    http://docs.Oracle.com/CD/B19306_01/server.102/b14220/partconc.htm#i461446

    '' In general, you should use an index for OLTP applications and local storage of data or applications of DSS ''

    We use oracle 10 g 2...

    In our case, research www.lesormes.com will not create several partitions, only one partition (we have a partition for each tenant).

    Local is even better for you.

    Thanks for suggesting to rebuild online (for global)... I'll try with that... .but he would have any problem of performance relative to the index LOCAL...

    I don't think abnd so there shouldn't be any performance impact, rather it improves performance in locaking not all the table exclusively for the index creaiton.

    NY suggestion/idea why Oracle recommends partitioned Global index for OLTP?

    Because normally we have much aprtition of drop/merger/split partition of things in OLTP type (these operations are important in DSS normally loading data).

    any suggestion/idea why Oracle recommends partitioned Global index for OLTP?

    Because they are the fastest to access a record of a table and OLTP, response time is what counts. If you compare your reports OLTP or transactions, to spawn multiple partitions (a small percentage could access only a single partition and rules are made for the majority of cases, not for the small number of cases) and global index are better in this scenario.
    at MAS, you always have a huge data and as partition operation may stop your work until the index is rebuilt (which can take several hours for the huge data) where oracle is recommended to have a local indexing policy.

    Salman

  • conversion index global index local

    Hello guys, someone tell me how to convert a global index of a local index.
    The only method I know is to
    1 remove the global index
    2. create the index even with the local keyword.

    I was wondering is there any alter index statement which allows you to change the overall index to a local index?

    Thank you

    969224 wrote:
    Hello guys, someone tell me how to convert a global index of a local index.
    The only method I know is to
    1 remove the global index
    2. create the index even with the local keyword.

    I was wondering is there any alter index statement which allows you to change the overall index to a local index?

    Thank you

    There is no such statement

  • Global index unpartitioned reconstruction shot

    Hi all.

    The rebuild operation global index unpartitioned is hang. Everything down and rebuild this index works correctly (nearly 15-20 secconds).

    Format of the operation:

    ALTER index index-name regeneration;

    Also try

    ALTER index index-name reconstruction nologging;

    Also try

    ALTER index index-name parallel reconstruction n NOLOGGING;

    Trace session has failed the cause of blocking.

    Session block on the operation "sequential reading.

    No other sessions are in time to rebuild indexes, without locks, no session blocking.

    Plan query ranks Rowsource Time (s)

    CREATE the INDEX STATEMENT cost = 13448670
    CREATE the INDEX STATEMENT cost = 13448670
    CREATE the INDEX STATEMENT cost = 13448670
    CREATE the INDEX STATEMENT cost = 13448670
    UNIQUE CONSTRUCTION INDEX NO AGG_EXT_ARPU_MOU_IDX8
    UNIQUE CONSTRUCTION INDEX NO AGG_EXT_ARPU_MOU_IDX8
    UNIQUE CONSTRUCTION INDEX NO AGG_EXT_ARPU_MOU_IDX8
    UNIQUE CONSTRUCTION INDEX NO AGG_EXT_ARPU_MOU_IDX8
    LIKE CREATE INDEX13 M9
    LIKE CREATE INDEX13 M9
    LIKE CREATE INDEX13 M9
    LIKE CREATE INDEX13 M9
    INDEX FULL SCAN AGG_EXT_ARPU_MOU_IDX22
    INDEX FULL SCAN AGG_EXT_ARPU_MOU_IDX22
    INDEX FULL SCAN AGG_EXT_ARPU_MOU_IDX22
    INDEX FULL SCAN AGG_EXT_ARPU_MOU_IDX22

    EVENT                            P1      P2           P3

    db file sequential read1210001


    Partitioned table consists of about 13 million lines.

    Can you help me find the problem or give a workaround solution.

    Kind regards

    Mikhail

    Always go read a CREATE INDEX of the Table.

    An INDEX REBUILD will be:

    (a) if the Index is in a VALID State-read of the Index online

    (b) if the Index is unusable-online read the Table

    You could make the Index UNUSABLE to force RECONSTRUCTION to read from the Table.

    I assume that you do NOT attempt a reconstruction in LINE and are ready to have the table locked for the duration of the reconstruction.

    But WHY YOU REBUILD the INDEX?  What is the reason?   Do you have proof that reconstruction will benefit?

    Hemant K Collette

  • Select Insert on the same partition: RELATIONAL() - REMOVE a GLOBAL INDEX

    Hi all

    I found on v$ sqlarea suite statament:

    insert / * + / RELATIONAL PARALLEL ("TABLENAME") ("TABLENAME", 1) ADD NESTED_TABLE_SET_SETID NO_REF_CASCADE * /

    in "SCHEMA." "" TABLENAME ' partition ('DAY20151015')

    (

    Select / * + RELATIONAL("TABLENAME") PARALLEL("TABLENAME", 1) * /.

    *

    a 'schema '. " TABLENAME' partition ("DAY20151015") ".

    )

    Remove the global index

    This is a query that reads and writes the same data on the same partition!

    I think that it is generated by Oracle, but I don't undestand what he does.

    Can you give me some explanation or assistance on this query?

    Thank you very much

    This is a query that reads and writes the same data on the same partition!

    Well not - enough is NOT that.

    The RELATIONAL indicator causes unnest Oracle object data and insert the data from the attribute itself rather than the object.

    The indicators used are usable only by Oracle-c ' is why they are undocumented. You can find songs on the web, but practically everything you find is "best estimate".

    Oracle SQL tips - other indicators [HelloDBA.COM]

  • Partitioned global index on partitioned table range, but the index partition does not work

    Hello:

    I was creating an index partitioned on table partitioned and partitioned index does not work.

    create table table_range)

    CUST_FIRST_NAME VARCHAR2 (20).

    CUST_GENDER CHAR (1),

    CUST_CITY VARCHAR2 (30),

    COUNTRY_ISO_CODE CHAR (2),

    COUNTRY_NAME VARCHAR2 (40),

    COUNTRY_SUBREGION VARCHAR2 (30),

    PROD_ID NUMBER NOT NULL,

    CUST_ID NUMBER NOT NULL,

    TIME_ID DATE NOT NULL,

    CHANNEL_ID NUMBER NOT NULL,

    PROMO_ID NUMBER OF NON-NULL,

    QUANTITY_SOLD NUMBER (10.2) NOT NULL,

    AMOUNT_SOLD NUMBER (10.2) NOT NULL

    )

    partition by (range (time_id)

    lower partition p1 values (u01 tablespace to_date('2001/01/01','YYYY/MM/DD')),

    lower partition (to_date('2002/01/01','YYYY/MM/DD')) tablespace u02 p2 values

    );

    create index ind_table_range on table2 (prod_id)

    () global partition range (prod_id)

    values less than (100) partition p1,

    lower partition p2 values (maxvalue)

    );

    SQL > select TABLE_NAME, SUBPARTITION_COUNT, HIGH_VALUE, nom_partition NUM_ROWS of user_tab_partitions;

    TABLE_NAME NOM_PARTITION SUBPARTITION_COUNT HIGH_VALUE NUM_ROWS

    ----------- ---------------- ------------------ -------------------------------------------------------------------------------- ----------

    TABLE_RANGE P2 0 TO_DATE (' 2002-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIA 259418)

    TABLE_RANGE P1 0 TO_DATE (' 2001-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIA 659425)

    SQL > select INDEX_NAME, NUM_ROWS nom_partition, HIGH_VALUE user_ind_partitions;

    INDEX_NAME NOM_PARTITION HIGH_VALUE NUM_ROWS

    ------------------------------ ------------------------------ -------------------------- ----------

    P1 IND_TABLE_RANGE 100 479520

    IND_TABLE_RANGE P2 MAXVALUE 439323

    SQL > EXECUTE DBMS_STATS. GATHER_TABLE_STATS (USER, 'TABLE_RANGE');

    SQL > EXECUTE DBMS_STATS. GATHER_TABLE_STATS (USER, 'TABLE_RANGE', GRANULARITY = > 'PARTITION');

    SQL > EXECUTE DBMS_STATS. GATHER_INDEX_STATS (USER, 'IND_TABLE_RANGE');

    SQL > EXECUTE DBMS_STATS. GATHER_INDEX_STATS (USER, 'IND_TABLE_RANGE', GRANULARITY = > 'PARTITION');

    SQL > set autotrace traceonly

    SQL > alter shared_pool RAS system;

    SQL > changes the system built-in buffer_cache;

    SQL > select * from table_range

    where prod_id = 127;

    ---------------------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

    ---------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |             | 16469 |  1334K |  3579 (1) | 00:00:43 |       |       |

    |   1.  RANGE OF PARTITION ALL THE |             | 16469 |  1334K |  3579 (1) | 00:00:43 |     1.     2.

    |*  2 |   TABLE ACCESS FULL | TABLE_RANGE | 16469 |  1334K |  3579 (1) | 00:00:43 |     1.     2.

    ---------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 - filter ("PROD_ID" = 127)

    Statistics

    ----------------------------------------------------------

    320 recursive calls

    2 db block Gets

    13352 consistent gets

    11820 physical reads

    0 redo size

    855198 bytes sent via SQL * Net to client

    12135 bytes received via SQL * Net from client

    1067 SQL * Net back and forth to and from the client

    61 sorts (memory)

    0 sorts (disk)

    15984 rows processed

    Once the sentence you say ' does not ' and then you go to paste plans that seem to show that it "works".

    What gives?

    In fact, if you look at the plans - think Oracle you have 16 k rows in the table and he'll be back k 12 rows for your select statement. In this case, Oracle is picking up the right plan - full scan 16 ranks of k is a lot less work to digitize the index lines k 12 followed by the research of rank k 12 rowid.

  • Get-VMHost: you have changed the world: DefaultVIServer and global: DefaultVIServers system variables. This is not allowed. Please reset them to $null and reconnect the server vSphere.

    Hello world

    After the upgrade to PowerCLI version 5.1 however I can't run even the simplest command because it always ends up with the following error:

    Get-VMHost: you have changed the world: DefaultVIServer and global: DefaultVIServers system variables. This is not aRA. Please reset them to $null and reconnect the server vSphere.

    C:\Users\Albert\AppData\Local\Temp\7900df01-f6c1-48c6-ac1e-047dfff90fb6.ps1:1 tank: 11
    + Get-VMHost < < < <
    + CategoryInfo: NotSpecified: (:)) [Get-VMHost], InvalidState)
    + FullyQualifiedErrorId: VMware.VimAutomation.ViCore.Types.V1.ErrorHandling.InvalidState, VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHost

    Can someone please suggest to me how to fix the script for my v3.2.0 PowerGUI IDE can work with the latest PowerCLI in my computer laptop 64 bit Windows 7?

    Thank you.

    And I just tried with PowerGui (same versions of PowerGUI and PowerCLI you use), no problem.

    Must be something local on your desktop.

    Maybe try a uninstall/reinstall of PowerGUI?

  • spatial index and normal index

    Hi space specialists,.

    I have a question for spatial index performance and how Oracle manages queries that have a space and regular condition combined. We are on the Oracle 10 g Enterprise Edition Release 10.2.0.4.0 database

    Take a query like this one (not a real query but based on the type of query that is generated by ArcGIS):

    Select objectid

    attribute

    geometry

    table

    where mdsys.sdo_filter (geometry, mdsys.sdo_geometry (: gtype1,: srid1, null,: elem_info1,: ordinates1), 'querytype = window') = 'TRUE '.

    and attribute = value

    In our scenario, we have a lot of rows in the table (2 million), but we have only a few lines (2000) where attribute = value.

    It seems that there is a scenario where the performance is really bad. It takes 5 seconds for the query to return the results and you're just too slow for our needs. There is a spatial index on a geometry and a normal index on the field for the attribute. The plan of the explain command shows that both the spatial index and the index of the attribute are used.

    Of course, we can break to the top of the table in separate tables by object type. This would make the index space datamodel much more efficient, but at the expense of our current simple, abstract.

    Do you have suggestions on how we can improve performance without too much impact on our datamodel? Oracle for example has an option where you can create a spatial index on a subset of the data in a table?

    Thank you!

    Rob

    Do not know whether or not the following works for your case:

    use the column range-key attribute to create a partitioned table Beach and then create a local spatial index.

Maybe you are looking for

  • Function of IRIS with Nex VG20 + Sigma lens

    Hello I have a NEX VG20 and a NEX 6. When I use my SIGMA 8-16 + THE - ai2 with NEX 6, everything works fine. On the other hand, with the VG20, the iris does not work and I can only work at full aperture. Is there a solution? I still have two other qu

  • Installation permanently update KB972696

    My computer is running Windows XP with Microsoft Security Essentials.  My problem is that my computer keeps downloading Windows update KB972696 over and over again.  So, my computer is very slow, and the update of this program will not stop.  Is it p

  • I try to install Outlook Express on my laptop. I don't remember my sign on or password, or even if I've never had a.

    I have a laptop as a desktop computer.  I try to install outlook express on my laptop.  I don't remember my sign on or password, or even if I've never had a.  I had outlook all my computer life.  Never thought I would need to save this information. P

  • Windows-7 windows-10 free update

    I have the windows 7 license, but currently I do not use because my windows OS was crumpled and I have no recovery option but now I want as my rear windows and also upgrade to windows 10. Can anyone give me solution for that and also link to download

  • Impossible to update the CC apps

    I received a notification from the desktop application of creative cloud that there are updates available for the CC of Photoshop and Adobe Bridge.  I tried to update these applications by using the desktop CC app but nothing happened - I clicked on