Indexes on a view

Hi,
I have created 7 indexes on a view.
Its working fine for me.
Is it the right way or is there any limit for the number of indexes creation?
Can somebody please advice.
Thank you
--Kumar                                                                                                                                                                                                                                                                                                                                                                                                       

Thanks for your reply Reidelme
but i think the concept of insert/update/delete doesn't apply for this materialized view i guess because this view is like a snapshot of a table and
the insert/delete/update are done in the table and not in this View and this view needs to be refreshed once in a while.
I'm using this view for my discoverer report.
I have written a concurrent programme and before running the report, the users need to run the concurrent request so that the Materialized view is dropped and created again with indexes for updated data.
Rgds
--Kumar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How can I create index in a view?

    Dear all,
    How can I create index in a view?
    Best Regards,
    Amy

    A view is a stored query. It gets executed at run time. A view does not occupy any physical space in the database (other than the insignificant amount of space required to store the query in the data dictionary).
    A materialized view actually materializes the results of a query in a separate table structure, so it consumes physical space in the database. It also has to be refreshed at some interval, either synchronously with DML or asynchronously on a set interval.
    Justin

  • Spatial Index Problem in View

    Hello everyone.
    I have a table (A) that stores point locations (X,Y) and contains the following fields:
    ID NUMBER(10,0) No 1
    CD_CODIGO_EMA VARCHAR2(10 BYTE) Yes 2
    TX_NOMBRE_EMA VARCHAR2(50 BYTE) Yes 3
    CD_PROVINCIA_EMA NUMBER(5,0) Yes 4
    CD_MUNICIPIO_EMA NUMBER(5,0) Yes 5
    NU_UTMX_EMA NUMBER(10,2) Yes 6
    NU_UTMY_EMA NUMBER(10,2) Yes 7
    NU_HUSO_EMA NUMBER(5,0) Yes 8
    NU_TIPO_EMA NUMBER(3,0) Yes 9
    TX_URL_EMA VARCHAR2(255 BYTE) Yes 10
    I have created a view (V) with a field of type SDO_GEOMETRY values based on longitude (NU_UTMX_EMA) and latitude columns (NU_UTMY_EMA) in Table A, as follows:
    CREATE VIEW A_VIEW (ID, SHAPE)
    AS SELECT
    ID, MDSYS.SDO_GEOMETRY(2001, 83030, MDSYS.SDO_POINT_TYPE(NU_UTMX_EMA, NU_UTMY_EMA, NULL), NULL, NULL)
    FROM A
    I have updated the view USER_SDO_GEOM_METADATA:
    insert into user_sdo_geom_metadata values (
    'A_VIEW',
    'SHAPE',
    MDSYS.SDO_DIM_ARRAY(
    MDSYS.SDO_DIM_ELEMENT('Longitude',90000,630000,0.005),
    MDSYS.SDO_DIM_ELEMENT('Latitude',3980000,4300000,0.005)
    83030
    I can see the spatial view in differentes clientes (for example, Geoserver and ArcMap). The problem is when I try to Zoom into the View I receive the message: Interface not supported without a spatial index+
    If I try to make an spatial index on the view, I receive the message:
    create index V_idx on A_VIEW(SHAPE) indextype is MDSYS.SPATIAL_INDEX;
    ORA-01702 A view is nos appropiate here.
    How can I fix it? The original table (A) has a spatial index and it works fine.
    Thanks in advance

    This should be answered in your other post:
    View with SDO_GEOMETRY column

  • Index organized Materialized View in SQL Developer Datamodeler

    Hello SQL Developer Datamodeler Team,
    I'm using version 4.0.2.840 and looking for a how-to to change a MV to an IOMV.
    So far I do the following:
    Create Table in Relational Model
    Create MV in Oracle 11g Physical Model
    Double Click Table in Oracle 11g Physical Model
    Set "Implement as MV" to my MV
    OK
    Now I can't find an option for index organized in Physical Model Materialized View properties.
    The setting "Organization: Head/Index" for Physical Model MV-Basetable properties does not change the generated DDL.
    Also, setting this to "Index" does not enable the window's "IOT Properties"-tab (like it does for normal tables).
    Is it possible to create an Index organized Materialized View in current SQL Developer Datamodeler?
    Thank you & Best regards,
    Blama

    Hi Blama,
    DDL for Index-organized Materialized Views is generated in the Early Adopter release 4.1.0.866, which is now available for download.
    The Organization on the Table that is implemented as the Materialized View should be set to INDEX, and the Table's IOT properties will be used during DDL generation.
    David

  • Is it possible to create a spatial index on a view?

    Hi
    Is it possible to create a spatial index on a view?
    We would like to link our spatial tables to each other (using only one of the SDO_GEOMETRY fields) in a view & make it very easy so that anybody can work with the data.
    Thanks Caroline.

    Simon,
    In order for autoregistration to work, you first need to make sure that all entries in mdsys.sdo_geom_metadata_table are registered with SDE. All tables not just one schema. None of our spatial tables or views exist in the SDE schema.
    Also make sure all Oracle Spatial tables in sde.table_registry are held in mdsys.sdo_geom_metadata_table.
    When a user makes a database connection in ArcCatalog, all Oracle Spatial tables will be registered with SDE automatically. Also, entries will be inserted into mdsys.sdo_geom_metadata_table and indexes will be created. If you do not have primary key fields, you will have to Register with Geodatabase and it will create the OBJECTID field.
    This did not work for us originally. but after cleaning up metadata and installing SP1, it is working now and it is very convenient.
    VIEWS:
    You have to create the view thru SDE. You cannot register foreign views. There are bugs in support of views containing SDO_GEOMETRY objects. I have been told some problems will be fixed in SP2 and there may be a patch out to address some others.
    Here are the incidents I have filed in reference to views:
    1.
    I created a view consisting of a geometry column from a "foreign" Oracle
    Spatial table (SDO_GEOMETRY) and corresponding attribution in another table.
    I used the following command to create the view through SDE:
    C:\arcgis\arcexe81\BIN>sdetable -o create_view -T gis_v_traffic -t
    "trims_traffi c_geom,traffic" -c
    "trims_traffic_geom.geometry,trims_traffic_geom.fid,traffic.i
    d_number,traffic.aadt" -w "trims_traffic_geom.mslink = traffic.mslink" -u
    gis -p spatial -i esri_sde -s JJ0DN10
    ArcSDE 8.1 Build 832 Thu Mar 22 14:08:07 PST 2001 Attribute Administration
    Utility ----------------------------------------------------- Successfully
    created view gis_v_traffic.
    I can preview the geometries in ArcCatalog without error.
    However, when I try to select a feature in ArcMap I get the following error:
    The instruction at "0x125222dd" referenced memory at "0x00000000". The
    memory could not be "read".
    I click ok.
    Then I get this error:
    The insruction at "0x5f8012d3" referenced memory at "0x00000004". the memory
    could not be "read".
    I click ok and ArcMap terminates.
    I can select features from the spatial table the view is pointing to, but
    not from the view itself.
    2.
    I need to create views utilizing database links to tie attribution in other
    databases to geometries created for that data in a spatial database.
    I issued the following command from command prompt and got this error:
    C:\arcgis\arcexe81\BIN>sdetable -o create_view -T link_v_traffic -t
    "trims_traff ic_geom,[email protected]" -c
    "trims_traffic_geom.geometry,trims_traffic_ge
    om.fid,[email protected],[email protected]" -w
    "trims_t raffic_geom.mslink = [email protected]" -u gis -p
    spatial -i esri_sd e -s JJ0DN10
    ArcSDE 8.1 Build 832 Thu Mar 22 14:08:07 PST 2001 Attribute Administration
    Utility ----------------------------------------------------- Error:
    Underlying DBMS error (-51). Error: Unable to create view link_v_traffic
    ORA-00957: duplicate column name (link_v_traffic)
    3.
    Spatial Views created on Oracle Spatial LRS layers containing SDO_GEOMETRY
    objects are not recognized as feature classes unless they are created with
    the sdetable -o create_view command.
    Here is typical SQL for the view creation:
    create or replace view trims_v_traffic as select a.geometry,
    b.nbr_tenn_cnty, b.nbr_rte, b.spcl_cse, b.cnty_seq, b.tr_beg_log_mle,
    b.tr_end_log_mle, b.yr_trfc, b.aadt, b.pct_peak_hr, b.dhv_pct, b.drct_distr,
    b.vhcl_pass_pickups, b.vhcl_su_trk, b.vhcl_mu_trk, b.actl_cnt, b.updt_by,
    b.updt_on, b.mslink, b.mapid, b.id_number, b.sta_nbr from
    gis.trims_traffic_geom a, gis.traffic b where a.mslink = b.mslink;
    The table containing the SDO_GEOMETRY object is registered with SDE in the
    following manner:
    C:\arcgis\arcexe81\BIN>sdelayer -o register -l trims_traffic_geom,geometry
    -e slM -k SDO_GEOME
    TRY -s JJ0DN10 -i esri_sde -u gis -p spatial -c fid -C SDE
    A feature class is successfully created for this layer and the data can be
    added successfully to a map.
    However, there is no way of adding data to a map from a spatial database
    view containing an SDO_GEOMETRY object which was created externally from
    SDE.
    We are using Oracle Spatial 8.1.7 on NT 4.0. We are also using ArcGIS 8.1
    and ArcSDE 8.1.1.
    4.
    SDE does not support spatial database views which reference snapshot
    objects.
    I was unable to create a view using sdetable -o create_view which referenced
    a snapshot object.
    The snapshot was created using the following sql syntax:
    CREATE SNAPSHOT SNP_TEST
    BUILD IMMEDIATE
    REFRESH FAST
    ON DEMAND
    AS
    SELECT * FROM [email protected]
    We are using ArcSDE 8.1.1 with Oracle 8.1.7 on NT 4.0.
    Here are the permissions I granted, they need to be the same for every schema:
    for sde (these are all the permissions that might be needed for any type of
    activity - new install or upgrade)..lets just step through and go ahead and
    grant them all...
    grant create session to sde;
    grant create table to sde;
    grant create procedure to sde;
    grant create sequence to sde;
    grant create trigger to sde;
    grant unlimited tablespace to sde;
    grant select any table to sde;
    grant create any sequence to sde;
    grant create any procedure to sde;
    grant execute any procedure to sde;
    grant drop any procedure to sde;
    grant select any sequence to sde;
    grant create any view to sde;
    grant drop any view to sde;
    grant create any trigger to sde;
    grant drop any sequence to sde;
    each Oracle user will also need the following privileges...
    grant create session to gis;
    grant create table to gis;
    grant create procedure to gis;
    grant create sequence to gis;
    grant create trigger to gis;
    grant unlimited tablespace to gis;
    Viewer
    The viewer is allowed to connect to an ArcSDE database. Other users grant
    select privileges on their tables and feature classes to the viewer or to
    the public role. The DBA can create a role that can be granted select
    privileges on data objects owned by other users. The role can be granted to
    the viewer.
    create session
    select on other user's data objects
    Editor
    The editor is allowed to connect to an ArcSDE database. Other users grant
    select and insert, update, or delete on data objects they own to editor. The
    DBA may create a role that can be granted select, insert, update, and delete
    privileges on data objects owned by other users. The role can be granted to
    the editor.
    create session
    select, insert, update, or delete on other user's data objects
    Creator
    The creator is allowed to connect to an ArcSDE database and create data
    objects. The creator may grant privileges on their
    objects to other users or roles. Other users can grant select and insert,
    update, or delete on data objects they own to creator. The DBA may create a
    role that can be granted select, insert, update, and delete privileges on
    data objects
    owned by other users. The role can be granted to the creator:
    create session
    create table
    create procedure
    create sequence
    create trigger
    unlimited tablespace
    select, insert, update, or delete on other user's objects
    It might be worthwhile to rebuild your SDE metadata. I can walk you thru that if you need help.
    Hope this helps.
    Dave
    null

  • How to create unique index on a View

    Hi All,
    11.2.0.1
    How do I create an index on a view or any workaround that my view wont get duplicates?
    SQL> create unique index indx01 on db_backup_details_vw(id);
    create unique index indx01 on db_backup_details_vw(id)
    ERROR at line 1:
    ORA-01702: a view is not appropriate here
    Thanks a lot,
    Kinz

    I'm thinking of using a distinct clause here.
    if i get 5 duplicate rows in my selection set because of the join condition, can't i discard the remaining 4 using a distinct clause.
    Observe this
    SQL> select * from a;
    T1 T2
    1 4
    2 4
    3 4
    SQL> select * from b;
    T1 T2
    1 4
    2 5
    in both a,b t1 is the primary key. so we'll write a join on t2 (non PK).
    SQL> select b.t1,b.t2 from a,b where a.t2=b.t2;
    T1 T2
    1 4
    1 4 -- duplicates
    1 4
    Now create view with distinct clause
    create view ab as select distinct b.t1,b.t2 from a,b where a.t2=b.t2;
    SQL> select * from ab;
    T1 T2
    ---------- ---------- -- no duplicates
    1 4
    CSM

  • Indexes in a view(how does it work?)

    I have a view that makes a union query between too similar tables,
    selecting equal fields in both, and the field I use in the where clause are the same in both too.
    That's somenthing like this:
    CREATE OR REPLACE VIEW TABLE_1 AS
    SELECT T1.DESC_DATA
    T1.TOTAL_DATA
    FROM TABLE_1 T1
    WHERE T1.COD = &COD_PARAMETER
    UNION
    SELECT T2.DESC_DATA
    T2.TOTAL_DATA
    FROM TABLE_2 T2
    WHERE T2.COD = &COD_PARAMETER
    The first table(TABLE_1) has to many rows, around 10 millon registers, so it has index for the field cod,
    but the TABLE_2 has few registers, like 1000, and has no index created.
    But when I run a query using the view TABLE_1 it goes to slowly, not using the index.
    How do I have to proceed in this case?
    Do I have to create index for the same index in TABLE_2?
    TABLE_2 not having any indexes makes the view not use indexes?
    Or is something else?
    The version that I'm using is Oracle 9.2.0.4.0.

    We need more information like the explain plan.. Please look at this link about when the query is slow.
    When your query takes too long ...
    Thanks

  • H2 devide implicit and explicit created indexes by dictionary views?

    For migrating amounts of data it is useful to drop and recreate indexes and referencing constaints. A implicit created index by defining a primary/unique key constraint will be dropped implicitly by dropping the before mentioned constraint. Creating such a constraint after creating an equivalent index with the constraint name will result in an other behaviour. The explicit created index will not be dropped by dropping the referencing primary/unique key constraint.
    So far so good and well known. The question is: Which dictionary view columns will show me the difference between implicit and explict created indexes if I try to dynamically drop and recreate indexes and unique / primary key constraints?

    Oracle Version is always helpful in answering questions, but for 9i you can find the system generated by:
    dba_indexes.generated = 'Y'
    or
    'SYS_' naming convention for system generated indexes
    or
    dba_constraints.constraint_name = dba_constraints.index_name
    Hope this helps - JTommaney

  • Dynamic creation of Dropdown by Index in the view

    Hi,
    Please help me how to create Dropdown by Index dynamically.
    The scenario is in a view, part of view is Static and other part is Dynamic.
    Dynamic part display depends on entry  selected from Static part of the view.
    I am using method WDDOMODIFYVIEW to implement this. I could successfully generate Group, Caption, TextView view
    element dynamically but with Dropdown by Index, I am getting runtime error.
    New Dropdown by Index will belong to Dyanmically generated Group in 'ROOTELEMENTCONTAINER' and new Context node will be created in CONTEXT for Dynamic Dropdown by Index .
    Thanks, in advance ,for your help.

    Thanks Amit and Lekha for your replies.
    I tried the code but still I am getting the same error.
      lr_rootnode_info = wd_context->get_node_info( ).
      lr_rootnode_info = lr_rootnode_info->get_child_node( 'ADD_DATA' ).
      call method lr_rootnode_info->add_new_child_node( exporting name = lv_node_name                                                                    is_mandatory = abap_false
                                                                  is_multiple = abap_true
                                                                  is_multiple_selection = abap_true
                                                                  is_singleton = abap_false
                                                                  is_initialize_lead_selection = abap_true
                                                                  is_static = abap_false
                                                        receiving child_node_info = lr_rootnode_info ).
    ****----------------Get instance of new node
      concatenate 'ADD_DATA.' lv_node_name INTO lv_child_node.
      lr_dyn_node = wd_context->get_child_node( name = lv_child_node ).
    ***----------------Prepare properties of attribute and add to context node
    *data:lo_nd_add_data type ref to if_wd_context_node,
    *     lo_nd_lv_node_name type ref to  if_wd_context_node,
    *     lo_el_lv_node_name type ref to  if_wd_context_element.
    *lo_nd_add_data = wd_context->get_child_node( name = wd_this->wdctx_add_data ).
    *lo_nd_lv_node_name = lo_nd_add_data->get_child_node( name = lv_node_name ).
    *lo_el_lv_node_name = lo_nd_lv_node_name->get_element(  ).
      concatenate is_char-descr_char 'ID' into lv_attname.
      translate lv_attname to upper case.
      condense lv_attname no-gaps.
      lr_attribute-name = lv_attname.
      lr_attribute-type_name = 'STRING'.
      lr_attribute-value_help_mode = '0'.
      lr_rootnode_info->add_attribute( exporting attribute_info = lr_attribute ).
      lr_element = lr_dyn_node->create_element( ).
      lr_dyn_node->bind_element( new_item = lr_element
                                 set_initial_elements = abap_true ).
      concatenate lv_node_name '.' lv_attname into   lv_bindtext.
      lr_ddbyidx = CL_WD_DROPDOWN_BY_IDX=>NEW_DROPDOWN_BY_IDX( id = iv_name
                                                    view = ir_view
                                                    label_for = iv_textviewid
                                                    bind_texts = lv_bindtext ).
      lr_row_grid_data = cl_wd_grid_data=>new_grid_data( element = lr_ddbyidx ).
    *******To set the TextView to the Group_2
      lr_group2->add_child( lr_ddbyidx ).
    Please help.
    Thanks.
    Edited by: Trupti Kallurwar on Oct 26, 2009 9:14 PM

  • Index On Materialized View

    I have created a materialized view that involves joining 4 tables for diferent where conditions. How can I create index on this materialized view.
    Thanks

    Yes, but it is done automatically:
    SQL> create materialized view emp_dept_mv
      2  as
      3  select e.empno
      4       , e.ename
      5       , e.sal
      6       , d.deptno
      7       , d.dname
      8    from emp e
      9       , dept d
    10   where e.deptno (+) = d.deptno
    11  /
    Gematerialiseerde view is aangemaakt.
    SQL> create index i1 on emp_dept_mv (deptno)
      2  /
    Index is aangemaakt.
    SQL> exec dbms_stats.gather_table_stats(user,'emp_dept_mv',cascade=>true)
    PL/SQL-procedure is geslaagd.
    SQL> set autotrace on explain
    SQL> select * from emp_dept_mv where deptno = 40
      2  /
         EMPNO ENAME             SAL     DEPTNO DNAME
                                             40 OPERATIONS
    1 rij is geselecteerd.
    Uitvoeringspan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=4 Bytes=96)
       1    0   TABLE ACCESS (BY INDEX ROWID) OF 'EMP_DEPT_MV' (Cost=2 Card=4 Bytes=96)
       2    1     INDEX (RANGE SCAN) OF 'I1' (NON-UNIQUE) (Cost=2 Card=4)
    SQL> set autotrace off
    SQL> insert into dept (deptno, dname) values (50, 'EXTRA DEPT')
      2  /
    1 rij is aangemaakt.
    SQL> exec dbms_mview.refresh('emp_dept_mv')
    PL/SQL-procedure is geslaagd.
    SQL> set autotrace on explain
    SQL> select * from emp_dept_mv where deptno = 50
      2  /
         EMPNO ENAME             SAL     DEPTNO DNAME
                                             50 EXTRA DEPT
    1 rij is geselecteerd.
    Uitvoeringspan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=4 Bytes=96)
       1    0   TABLE ACCESS (BY INDEX ROWID) OF 'EMP_DEPT_MV' (Cost=2 Card=4 Bytes=96)
       2    1     INDEX (RANGE SCAN) OF 'I1' (NON-UNIQUE) (Cost=2 Card=4)Regards,
    Rob.

  • Can I create index on Materialized view log

    Hello
    The ADDM suggest me to create index on some fields of my materialized view log , I don't know does it cause any problem ? Is it safe ? have you done it before ?
    thanks

    Actually you can do it since materialized view log is in fact a table.
    SQL> create table t(x int primary key);
    Table created.
    SQL> create materialized view log  on t;
    Materialized view log created.
    SQL> select segment_name, segment_type from user_segments;
    SEGMENT_NAME
    SEGMENT_TYPE
    MLOG$_T
    TABLE
    T
    TABLE
    SYS_C004857
    INDEX
    SQL> desc mlog$_t;
    Name                                      Null?    Type
    X                                                  NUMBER
    SNAPTIME$$                                         DATE
    DMLTYPE$$                                          VARCHAR2(1)
    OLD_NEW$$                                          VARCHAR2(1)
    CHANGE_VECTOR$$                                    RAW(255)
    SQL> create index i on mlog$_t(x);
    Index created.However I don't know if this is really supported and makes sense.

  • Oracle Text Index on Materialized View

    Hello,
    I have designed a search engine for an internet application.
    We have different tables for our main business objects, the search is based on the content of all these dependent entities (Product, Company etc...)
    So I have created a materialized view to embody this aggregation.
    Then I have created a Multi column datastore index on top of the snapshot.
    The search engine has to be refreshed automatically 3 times a day, and manually anytime.
    This is achieved by executing a complete refresh on the view and rebuild the index, programmatically via Toplink (SqlCall).
    The MV refresh looks like this :
    alter index usr_batiprod.fullTextMulticolIdx rebuild
    and the index rebuild:
    begin
    DBMS_MVIEW.REFRESH('FT_TEST','C');
    end;
    Everything was fine until now, we have had lots of tuning on the index side, the refresh process was working fine...
    We have let the users access the engine since Thursday (the index had been created on the production environment a fews weeks ago) and since yesterday (or maybe before) we have been experiencing data incoherency on the index...
    I've tracked down the pb to the Fulltext Search's refresh process (manual and automatic share the same code) that was crashing on the Materialized view refresh :
    java.sql.SQLException: ORA-20000: Oracle Text error:
    DRG-50610: internal error: drexdsync
    DRG-50857: oracle error in drekrtd (lob erase)
    ORA-00060: deadlock detected while waiting for resource
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 794
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 851
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 832
    ORA-06512: at line 2
    Again, we had tested the functionality thoroughly and never experienced such behaviour before... even while refreshing the materialized view and the index 3 times (or more) a day..
    Once I dropped the Oracle Text Index, I was able to refresh the MV again..
    so it looks like the index was in some incoherent state and was holding a lock on the materialized view...
    Maybe my Index refresh call is wrong, and a stronger load on the functionality leads quickly to this pb, I dont know..
    I had always been a bit doubtful towards my index rebuild call, so Im thinking about using a more complete call :
    alter index usr_batiprod.fullTextMulticolIdx rebuild parameters ('sync')
    is it enough, or do I have to switch to a 'Oracle Text' specific call ?
    Is there another possible reason for the MV lock ?
    Thank you for your support
    Best Regards
    Olivier Cuzacq

    MVs are constructed in different ways and have lots of different uses.
    Why not just use MV as temp table for OT (Oracle Text) index?
    Refresh MV OT_TEMP.
    Delete all not matching rows from OT.
    Insert all missing missing rows from OT_TEMP to OT.
    sync OT index (online).
    Query table OT.

  • How to use index in a view?

    Hi!
    I have a view created of the following structure:
    create or replace view v as
      select col1, col2
      from a
    union all
      select col1, col2
      from bwhere both tables a and b have indexes on col1 - named i1 and i2 respectively.
    While using the view v I want to ensure that I use the indices defined to access data. How can I achieve that by means of optimizer hints? (or by means of anything else).
    Any feedback is appreciated. Thanks.

    Okay, here's what I have to deal with:
    For some reasons (out of my control) I have to use an Oracle Report*Writer 1.0 to present data from Oracle 9i DB.
    My simple (one query) report is running too slowly. It takes unlimited time to complete (at least more than 1,5 hour). But when I pull out the SQL query executed by the Report*Writer's session (using the tool 'PL/SQL Developer') and rerun it in the Developer it works just in 10sec. And I wonder why?
    At the moment I want to somehow manipulate execution plan (without using outlines and in fact without appropriate tools as have no access to OS (i.e. to take actual trace files from there))
    That's why I ask if I can somehow make sure that the Server uses indices while processing the query.

  • Simple index (How to view data(all columns) of an index in toad)

    Hi All,
    I am training myself on sql tuning and over the years I have seen ppl creating many indexes, today I am trying to learn various types of indexes and just curious to see physical data in an index but I am not able to do so on toad, I know if I have some index def like:
    create index employees_employee_id on employees(employee_id)
    my index would have two columns of information : first rowid and employee_ids in sorted order, right ? <- if my understanding is not right could any1 please correct me here.
    PS: The major problem is to see physical index data in toad, please help me with it.
    Many thanks
    Rahul

    There is no SELECT query that could be written over an index. But a SELECT query on a TABLE can be in such a way that Oracle only scans the index and give you the information
    Here is an example.
    SQL> create table t
      2  (
      3    no integer
      4  );
    Table created.
    SQL> create index t_idx on t(no);
    Index created.
    SQL> insert into t       
      2  select level
      3    from dual connect by level <= 10;
    10 rows created.
    SQL> commit;
    Commit complete.
    SQL> alter table t modify no not null;
    Table altered.
    SQL> exec dbms_stats.gather_table_stats(user, 'T', cascade=>true)
    PL/SQL procedure successfully completed.
    SQL> select rowid, no from t;
    ROWID                      NO
    AAFrZaABMAAAiKKAAA          1
    AAFrZaABMAAAiKKAAB          2
    AAFrZaABMAAAiKKAAC          3
    AAFrZaABMAAAiKKAAD          4
    AAFrZaABMAAAiKKAAE          5
    AAFrZaABMAAAiKKAAF          6
    AAFrZaABMAAAiKKAAG          7
    AAFrZaABMAAAiKKAAH          8
    AAFrZaABMAAAiKKAAI          9
    AAFrZaABMAAAiKKAAJ         10
    10 rows selected.
    SQL> select * from table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID  35mwb1b3fpfrh, child number 0
    select rowid, no from t
    Plan hash value: 3354442786
    | Id  | Operation        | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |       |       |       |     1 (100)|          |
    |   1 |  INDEX FULL SCAN | T_IDX |    10 |    30 |     1   (0)| 00:00:01 |
    13 rows selected.
    Actually in this case i have queried the INDEX

  • Index vs views in performance

    HI,
       Can creating a view will help to improve performance.I have to read from table RBKP but i don't have index fields , can i create view to get faster access.will it help over secondary index. 
    Regards,
    Karthik.k

    hi,
    if u are comparing views vs secondary indexes, then secondary indexes are better ,  view will improve performance little bit and will be constant but if u r usingh secondary indexes then overall performance will be better.
    Disadvantage of secondary indexes is that it will occupy space, it will slow down add , delete operation slow.
    Jogdand M B

Maybe you are looking for

  • How to get current locale / language

    Hi, I am trying to change the default startup settings for a CDE session, and I need to edit the file /usr/dt/config/lang/sys.session There are two possibilities: /usr/dt/config/C/sys.session or /usr/dt/config/en_US.UTF-8/sys.session How can I find o

  • Iphone recovery error code 1602

    How recover a iphone 3 without itunes. There is no back up made of this phone.

  • Acrobat Reader DC Uninstalled my LiveCycle...

    Hello, I had to install Acrobat Reader on my PC yesterday for testing purposes and it apparently uninstalled my old copy of Acrobat Pro and LiveCycle and I want them back. Does anyone know how I can go about this? I'm kind of angry that Adobe did thi

  • Getting a playlist onto iPhone

    I have recorded some band rehearsals on my iPhone, synced them with iTunes via my desktop Mac, then added them to a particular playlist in iTunes. Now, when I sync my iPhone with my desktop, those particular tracks don't appear in the playlist on my

  • What is the maximum number of images that can be imported into flash?

    I am not able to import images more than 47 or 48. What is the max. images imported? As the images are sequence images and I need that to use for interactivity for rotation with Action script. So cudn't import as a swf either. Please do let me know.