Column at Index

Hi all,

I'm quite new in the world of scripts and try to learn more. I try to write scripts to help me speed up some of my tasks, and everything is going well, until today.

My current project requires the creation of an Index for a catalog. The project contains many tables of products/descriptions (which some extend over a few pages long).

I'm trying to write a script that would add the first column cells content (less the first line as it is a title of the header) to the index, as well as the page reference; also add a reference to the source of the cells and the content.

Here is my script running so far, which translates an error number 24 (the object is not a function) on line 5.

addToIndex();
function addToIndex(){
    var myDoc = app.selection[0].tables[0].columns[0];
    for (var i=1; i < myDoc.cells.length; i++){
        app.activeDocument.indexes[0].topics.add(myDoc.cells(i).contents).pageReferences.add(myDoc.cells(i).texts[0].insertionPoints[0]);
    }
}

Any help will be greatly appreciated.

Adham

Thank you Peter for your answer. But that no longer works.

However, I found the error, it was actually a syntax error. My variable 'i' is in square brackets, but should be in brackets.

Here's the correct code:

addToIndex();
function addToIndex(){
    var myDoc = app.selection[0].tables[0].columns[0];
    for (var i=1; i < myDoc.cells.length; i++){
        app.activeDocument.indexes[0].topics.add(myDoc.cells[i].contents).pageReferences.add(myDoc.cells[i].texts[0].insertionPoints[0]);
    }
}

See you soon,.

Adham

Tags: InDesign

Similar Questions

  • How many columns and indexes can create?

    Hello

    1: the number of columns can create in a table of 10g to oracle?

    index 2: how much can create on a table of unique oracle 10g?

    Imran

    Googling for limits of Oracle 10 g is the appropriate documentation

    http://docs.Oracle.com/CD/B19306_01/server.102/b14237/limits003.htm#i288032

  • [SQL * Loader] ORA-01747 on column name 'INDEX '.

    Hello

    I use SQL * Loader to load the test data for the CSV files. I have a column whose name is "INDEX". SQL * Loader works very well under Linux (Red Hat 6 - Client Oracle 11.2.0.1.0) but I encounter ORA-01747 launch my Workstation Windows (Oracle Server 11.2.0.1.0).

    For more information, I target the same instance (Red Hat 6 - Oracle Server 11.2.0.1.0).

    You have an idea how to solve the problem (without renaming the column )?

    Thanks for any help you can provide.

    I finally find the solution surrounding the column name with double quotes ("") within the control file. Thank you to remember the format of "protector".

  • blob column field index

    SQL > select * from v version $;

    BANNER

    Oracle Database 10g Release 10.2.0.4.0 - Production
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    AMT for Mac OS X Server: release 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    SQL > documents desc;
    Name Null? Type
    IDENTIFICATION NUMBER
    TITLE VARCHAR2 (100)
    FILENAME VARCHAR2 (200)
    BLOB OF DOCUMENT

    SQL > create index idx_documents
    2 documents (document)
    3 indextype is ctxsys.context;

    The index is created.

    SQL > exec ctx_ddl.sync_index ('IDX_DOCUMENTS');

    PL/SQL procedure successfully completed.

    SQL > Select token_text of Dr.$ idx_documents$ i;

    no selected line

    SQL > Select file name of documents;

    FILE NAME
    --------------------------------------------------------------------------------
    Axiom.txt
    test.txt

    SQL >

    Axiom.txt:
    ----------
    Nach der Installation wird als Axiom MIDI-Gerät mit zwei MIDI-Eingangen und einem MIDI-exit auf Ihrem Computer gefuhrt.
    Fur den Einsatz von axiom mit will host application must the first der Sie in der Eingangsliste aufgefuhrten noon-Eingange
    von Axiom MIDI-Eingabegerat als Park. Erst nach dieser Einstellung kann Ihre host application MIDI - und Notenbefehle
    -Controllerbefehle von Axiom only.

    Falls Sie ein external MIDI-Gerät (Drum Machine oder equipped keyboard) a MIDI-digitization den von Axiom angeschlossen haben.
    können Sie Axiom als simply MIDI-USB-Interface, indem Sie den second wins der in der list aufgefuhrten Axiom-Eingange als MIDI -.
    Eingabegerat aktivieren.
    Like können Sie ein external, a MIDI-exit dem von Axiom angeschlossenes MIDI-Gerät über die application-host ansteuern und
    ALS axiom MIDI-USB-Interface benefits. There must Sie Axiom MIDI-Ausgabegerat als Park. Further notices zu diesen
    Is find in den nachfolgenden Handbuchs Kapiteln sharps.

    Die EuGHMR der to hear MIDI-Ein-und von Axiom unter den individual functionality sind der nachstehenden Tabelle unit
    aufgefuhrt. Calendar Sie Bitte, dass sharp positions you can hear, I depending on ob Sie am PC oder am Mac arbeiten bzw. den
    Windows-Multi-Client-Treiber installed haben oder nicht. (Information zur Treiber-Installation und - configuration items
    Sie in den nachfolgenden Kapiteln.)

    Select Dr. token_text $ idx_documents$, I am not returned no line! The same text stored in a clob column works fine.

    Thanks in advance

    The filter has failed.

    Because you use a BLOB column, it will try to invoke the filter of binary document (INSO_FILTER or AUTO_FILTER depending on the version).

    The filter SHOULD be able to deal with plain text documents, but who knows what kind of problems of translation of characters you'll have when writing a document in plain text in a binary container.

    If you only use plain text documents, you must use a CLOB column. Alternatively, you can try specifying the FILTER CTXSYS. NULL_FILTER in a parameters clause, but there still may be problems of translation.

    If you need to index a combination of binary and plain text documents, then try this again with a file binary document - a PDF or DOC file for example. If those who fail this way then it is probably your method of loading that is at fault.

  • Display the columns on index

    I have a list of indexes that are not used.
    I want to do is make a query that shows that these indices are on the columns.

    The results would be so: INDEX_NAME TABLE_NAME COLUMN_NAME

    I appreciate any help on this.
    SELECT TABLE_NAME,COLUMN_NAME,COLUMN_POSITION FROM DBA_IND_COLUMNS WHERE INDEX_NAME='INDEX_NAME';
    
  • Order of the columns to index

    Hello

    When you create an index say on table emp as below:

    SQL & gt; / / desc emp

    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO

    If you create an index on (EMPNO, DEPTNO) say - that is the same as creating an index on (DEPTNO, EMPNO)? I mean, it is of the order of the columns when the index is created? For example, when you run your select, in which article, you use the same order as in the creation of the index?
    Any comment is welcome.
    Thank you very much
    VIC

    you're welcome... but why POracle becomes all the point? ;)

  • Rownum and order of columns not indexed

    Why ROWNUM continue to take the same cost?

    Why can't you see no difference between the ORDER of SORTING BY STOPKEY and just SORT ORDER BY?

    SQL_ID, 9vccbf2dtazuq, number of children 0

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

    Select * from (select * from PROCESS_MESSAGE by id) where

    rownum < 101

    Hash value of plan: 2507589572

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

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

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

    |   0 | SELECT STATEMENT |                    |       |       |       |  1252K (100) |          |

    |*  1 |  COUNT STOPKEY |                    |       |       |       |            |          |

    |   2.   VIEW                  |                    |    26 M |    40G |       |  1252K (1) | 00:00:49 |

    |*  3 |    SORT BY STOPKEY ORDER.                    |    26 M |  4736M |  5835M |  1252K (1) | 00:00:49 |

    |   4.     TABLE ACCESS FULL | PROCESS_MESSAGE |    26 M |  4736M |       |   170K (1) | 00:00:07 |

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

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

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

    1 - filter(ROWNUM<101)

    3 - filter(ROWNUM<101)

    SQL_ID, 2zwdanc062902, number of children 0

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

    Select * from PROCESS_MESSAGE by id

    Hash value of plan: 1046773234

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

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

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

    |   0 | SELECT STATEMENT |                    |       |       |       |  1252K (100) |          |

    |   1.  SORT ORDER BY |                    |    26 M |  4736M |  5835M |  1252K (1) | 00:00:49 |

    |   2.   TABLE ACCESS FULL | PROCESS_MESSAGE |    26 M |  4736M |       |   170K (1) | 00:00:07 |

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

    Cost is not something that I want to live. Here's a simple example. Search for the-row, A-Time and memory usage for the SORT operation on both the query to see the difference.

    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> create table t as
      2  select rpad ('x', 1000, 'x') str from dual
      3  connect by level <= 10000;
    
    Table created.
    
    SQL> exec dbms_stats.gather_table_stats(user, 'T')
    
    PL/SQL procedure successfully completed.
    
    SQL> alter session set statistics_level = all
      2  ;
    
    Session altered.
    
    SQL> @temp.txt
    
    PLAN_TABLE_OUTPUT
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    SQL_ID  c4qj1q3h9kkyy, child number 0
    -------------------------------------
    select * from t order by str
    
    Plan hash value: 3672837129
    --------------------------------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation          | Name | Starts | E-Rows |E-Bytes|E-Temp | Cost (%CPU)| E-Time   | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    --------------------------------------------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |      |      1 |        |       |       |  2018 (100)|          |  10000 |00:00:00.25 |    1433 |       |       |          |
    |   1 |  SORT ORDER BY     |      |      1 |  10000 |  9775K|     9M|  2018   (1)| 00:00:20 |  10000 |00:00:00.25 |    1433 |    11M|  1285K|    9M (0)|
    |   2 |   TABLE ACCESS FULL| T    |      1 |  10000 |  9775K|       |   225   (1)| 00:00:03 |  10000 |00:00:00.02 |    1433 |       |       |          |
    --------------------------------------------------------------------------------------------------------------------------------------------------------
    
    14 rows selected.
    
    PLAN_TABLE_OUTPUT
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    SQL_ID  8a53npuzuxxj5, child number 0
    -------------------------------------
    select * from (select * from t order by str) where rownum <= 50
    
    Plan hash value: 1317717595
    -------------------------------------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation               | Name | Starts | E-Rows |E-Bytes|E-Temp | Cost (%CPU)| E-Time   | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    -------------------------------------------------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT        |      |      1 |        |       |       |  2018 (100)|          |     50 |00:00:00.08 |    1433 |       |       |          |
    |*  1 |  COUNT STOPKEY          |      |      1 |        |       |       |            |          |     50 |00:00:00.08 |    1433 |       |       |          |
    |   2 |   VIEW                  |      |      1 |  10000 |  4902K|       |  2018   (1)| 00:00:20 |     50 |00:00:00.08 |    1433 |       |       |          |
    |*  3 |    SORT ORDER BY STOPKEY|      |      1 |  10000 |  9775K|     9M|  2018   (1)| 00:00:20 |     50 |00:00:00.08 |    1433 | 61440 | 61440 |55296  (0)|
    |   4 |     TABLE ACCESS FULL   | T    |      1 |  10000 |  9775K|       |   225   (1)| 00:00:03 |  10000 |00:00:00.01 |    1433 |       |       |          |
    -------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       1 - filter(ROWNUM<=50)
       3 - filter(ROWNUM<=50)
    
    22 rows selected.
    

    Edited...

    Looking for more, if you see the lines-E in the second request its 10000 for SORTING display. But the row that is the true value is 50. Maybe this could be a factor why the cost of both the request are the same.

  • Unique column index index composite vs

    Hello

    I have a table with a, b, c, d, e, f, g, h, i, j, k columns and I have an index on columns a, b!

    There is a sql statement now with where a =?  and one wonders if it could also be good to add a unique index on just 'a' column!

    does not AT ALL help? It does not help in SOME CASES? or?

    What do you think??

    Thank you!

    / Hesi

    HeSi9466 wrote:

    I think, in general when you have a composite index as (a, b) and you have a query as where a =? Then, this composite index is sufficient and you don't need to also add a unique index.

    But... I think that this response CANNOT be a final answer for all possible combinations of data.

    For example, if the leader index column (a) has a low number of distinct values and the second column (b) index has a large number of different values then a query that seeks where a =? could be better with a single (one) index a column.

    My point is, it must be tested and could not say NO, UNIQUE INDEX number IS NECESSARY at all.

    The basic answer is that you need NOT the index of single column if you have the index on two columns.

    The answer is complex, is that you may need to spend some time and effort to ensure that the index of the two columns is used in all cases where it would have been appropriate to use single-column index. This can average simply ensuring that the clustering_factor in the index is adjusted properly so that the optimizer 'love' the index enough and/or you need to change code to use the cluster_by_rowid indicator (when you are 12 c) so that you do not suffer a running performance impact.

    Key factors: the index of the two columns will be physically larger than the single column index - this will increase the (optimizer estimated) operating costs; the index of two_column clustering_factor will almost certainly larger than the single column index clustering_factor - this will also increase the (optimizer estimated) cost of its use. Both of these echo run time: two column index will be bigger, then you will have to do more work to read the relevant ROWID, and if you walk two-column index in order for a given value of the first column, you will visit the blocks to the table in a different order from the order of the visits of the unique column index - this can lead to the application doing more work running.

    The variation in counts of leaf_block index is often negligible (especially if, as per your example, the number of lines - blocks so in the table - is large); the impact of the clustering_factor can make a huge difference for the calculation of costs; but you can often work around this problem. In 11.2.0.4, in particular, you can use the dbms_stats.set_table_prefs () call to set the parameter "table_cached_blocks" a table for all of its indexes seem more desirable to the optimizer.

    Bottom line - you have not the single column index, but if you have it and want to break down human effort needed to do so that it can be placed without side effects can make you decide to keep in any case, especially if it seems not be the cause of any competition or other overhead of performance.  If you haven't yet, then you should not need to create.

    Concerning

    Jonathan Lewis

  • Indexes on columns with only "Y" and "n".

    Our transaction table has about 100 mn lines. Of these latter on 60 minutes the lines are not actively used.

    We have composite index on multiple columns, including dates, and these are used to regular queries.

    Will be adding a status = 'y' or ' don't column and the creation of an index on this column is useful to increase the performance of the query?

    For example, will add a condition like

    OÙ......... AND ACTIVE_FLAG = 'Y '.

    help increase the performance of queries?

    Creating such a column and adding a help index?
    What type of clue do you recommend?

    The alternative advocated by some members of the staff is the archiving of INACTIVE lines in a separate table. This will have a big impact on business processes. But we might be able to pull it off.

    Is there another solution.

    I am a beginner full performance although I am familiar with PL/SQL and queries.
    I'm on the constraints of very tight timetable for the first level of back. I'll have more time as soon as I know the direction in which to go.

    Forgive me if I broke a tag forum. I'm new on the forum too.

    Thanks for providing this information. This gives a much clearer picture of what you are facing.

    I will try to give you my answer your questions afterwards.

    You have indicated your data volumes have steadily increased and performance made that decline.
    Even if you do not say (I forgot to ask) but it may be that the number of users increases as and.
    so typical, many users use the system of the time.

    For me it's indicative of a systemic problem. In other words, the problem is not due to a
    a thing or a part of the system.

    There are two main components of a server: the instance and the database. This link sums up the difference
    between the two - http://www.adp-gmbh.ch/ora/misc/database_vs_instance.html and here is a link to recent forum
    for reference Re: difference between Oracle Instance and Database.

    To paraphrase, an instance includes background processes and structures of memory (SGA, PGA, etc.)
    Oracle uses.

    The symptoms you describe could mean that your instance is more configured size not set correctly
    for your current workload are originally strain throughout the system. Maybe the memory is too limited.
    Maybe your sorts are growing with addional data.

    I suggest that you start the new thread to ask for help in the evaluation and optimization of your instance. Use this
    as a starting point:
    >
    Question/title - how to evaluate the State of health / instance and tune

    Our facility has a problem of increasing return.

    How can we collect and provide assessment of workload and configuration information, so you can help determine
    possible solutions such as: memory sizing, temp and segment again sizing, sort the issue.

    Statement of the problem
    1 oracle Version is? ?. ?. ?

    2. gradually return was degrading with more and more data. The UI response suffers and
    batch processing is also in hours. We expect volumes to only continue to grow.

    3. the volumes have continued to increase over the years and gradually performance issues
    accumulate over the past 2 years. Data volumes began to increase faster
    last year 1 due to changes in the company.

    4. the data in OLTP system is a combination of assets of 40% and 60% relatively inactive (financial history).

    5. a complete system near-live replecation on several sites. In my opinion, using streams.

    6. notice of the tech team is a few tables have too many lines. We know that our demands can be suboptimal.

    >

    Now to your question:
    >
    1. I do not know the index on the existing columns are not fully exploited. In the meantime can but, we still get some benefits from adding
    a 'Y' and the null column? What will be improved?
    >

    It is unlikely the benefits you need. It's putting the cart before the horse. The first step is to identify a specific problem.
    Only then can examine you and evaluate solutions. for example by adding a new column or index.

    There are several reasons, this isn't the right solution; certainly not at the moment
    A. any new column and index, BY DEFINITION, maybe even this does not use except if one or more current
    queries are changed. This is obvious since no existing query could possibly refer to a column that does not exist.

    (B) to try to obtain the Oracle to use the new index column / single lease request must be changed.

    C. in my opinion, you should never modify a query of production without knowing which allows to obtain the amendment
    a well-defined objective. You must evaluate the current execution plan to identify what changes, IF ANY,
    can improve performance.

    D. it can be and given your systemic problem is likely to be, some ripe fruit on the performance. That
    is that there may be ways to tune the query to use existing indexes or add a new index on an existing column
    improve things.

    E. assuming that none of the above does the work adding a new column and an index to identify
    a 40/60 split (40% of assets) is unlikely to be used by Oracle (see response of Centinui).

    >
    2. notes that this calculation 'Y' is not negligible. I can easily reproduce this with a WHERE condition on the existing columns. We can have
    to run a batch on the weekend to check row groups and mark them as 'Y '. So it is not only the advantage of indexing on 'Y', but also some benefits of prior calculation.
    Given this info doing now more logic to have a 'Y' and the null column?
    >
    My answer is no – there is no sense to have a Y/N Y/NULL column.

    A. certainly not for reasons of performance - as noted above above it is unlikely help

    Certainly not for commercial reasons.
    The calculation of your "non-trivial" is to demonstrate a business rule: identify groups of lines that have earned.
    If you perform this calculation, the result must be saved significantly. One way is to create a new
    column called 'DATE_NETTED_OUT '. This column name have meanings, and can be used as a boolean DATE/NULL type. This
    It would be much better that Y/NULL which is not really enter the business sense of the value.

    >
    3 partitioning speed up queries on the minutes 40 active and slow queries on the full 100 minutes?
    >
    Probably not to have one influence on the other. Allocation decisions are usually made to ensure easier data management and often
    have little, if any, a performance impact. All existing applications are unlikely to accomplish the any
    differently just because the table is partitioned. There are exceptions of course. If you partition on DATE
    and an existing query has a DATE filter, but there is no index on the DATE column, it will do a full table scan
    of the whole picture. If the table is partitioned on this DATE column that oracle would probably make a partition full
    Scan just the 40% or 60% of the table according to the value DATE. It would be so much faster.

    But if there is already an index on the column DATE I do not expect the performance to change much. It comes
    just speculation since it is based on data, the factor of grouping the data, and the existing queries.

    >
    1. I still need to a particular column of partion, I do not?
    >
    Yes, you do. Unless you use HASH Partitioning that don't really benefit your use case. You too
    says that "...". staff advocate is the archiving of INACTIVE lines in a separate table "."
    Partitioning can be used as part of this strategy. Partition by MONTH or by QUARTER on your
    new column "DATE_NETTED_OUT." Keep 1 or 2 years of data online as you do now and when a partition
    becomes more than 2 years you can 'transport' it to your archiving system. This is part of the partition
    management, which I mentioned earlier. You can simply disconnect the oldest partition and copy it to archive.
    This will not affect your applications other than the data not being is not available.

    >
    2. "adds a column' or ' cut-and - paste lines of table created by copy" the worst idea?
    >
    I don't know what that means.

    SUMMARY

    It is premature to consider alternatives until you know what the problems are. Only then you can try to
    determine the applicable solutions.

    I do it in this order:

    1. upgrading to a newer version of Oracle you are on an older (you said 9i which is not
    longer supported)

    2 assess the health and configuration of your instance. You may be able to significantly improve things
    by adjusting the parameters of configuration and instance. Post a new question, as previously mentioned. I don't
    have the expertise to advise you in details on that and the gurus tuning of the Forum the Forum can
    not to notice this thread (indexes on columns with only 'Y' and 'n') than even know you need help.

    3. identify the ripe fruits for performance problems. Is this one of your batch process? An individual
    request? You mentioned UI soon - that could be a problem of front end, middle tier or application
    not a database one.

    4. don't it make changes architecture (add columns) until you have tried everything first.

  • Oracle Text multi column index based query returns no rows

    Hello

    I have a MAH_KERESES_MV table with 3 columns OBJEKTUM_NEV, KERESES_SZOVEG_1, KERESES_SZOVEG_2. I create the following Oracle multi column text index:

    ctx_ddl.create_preference exec ('MAH_SEARCH', 'MULTI_COLUMN_DATASTORE');
    ctx_ddl.set_attribute exec ('MAH_SEARCH', 'COLUMNS', 'OBJEKTUM_NEV, KERESES_SZOVEG_1, KERESES_SZOVEG_2');

    create index MAX_KERES_CTX on MAH_KERESES_MV (OBJEKTUM_NEV)
    indexType is ctxsys.context
    parameters ("DATASTORE MAH_SEARCH");
    But the query returns no rows, although if I make the query with the 'like' operator, and then I get the results as expected:

    SELECT id, OBJEKTUM_NEV
    OF MAH_KERESES_MV
    WHERE CONTAINS (OBJEKTUM_NEV, "C") > 0;

    Can some body please help? TIA,

    Tamas

    You can do it in Oracle Text, well it is not necessarily desirable.

    You can search the

    WHERE CONTAINS(OBJEKTUM_NEV, '%C%')>0;
    

    And it will probably work in a simple test. However, using a leader like this wildcard prevents them the index on the table "list of words" used, so such a request can be very slow on a large system.
    You can improve this by using SUBSTRING_INDEX, but making your much bigger index. And you could always hit the 'expansions too' problem if %C % expansion is more than about 15,000 words (depending on version and different settings).

    Also be aware of differences in case - %C % will match 'fact' or 'FACT', as part of a CONTAINS, but not part of a TYPE.

  • Index on the date column

    Hello

    I have a behavior when running a table with an indexed column date that seems a bit away from me.

    I have a table with many columns and rows 4.8 million (Oracle 11 g 2). One of his columns is of data type Date. This column is indexed using a b-three index.

    Consider the select statement. It returns only 32 thousand rows (less than 1% of the number of rows in the table). Oracle did a full scan to run the query.

    Field2 can be any column of the table that is not part of the index (for example, a column which is varchar2 (14)).

    As the used filter has a high selectivity, I expect Oracle to use the index on the date_field when executing the query. Have no idea about it? Is there a rule on the date columns indexing?

    Select Field2
    TABLE
    WHERE date_field > = TO_DATE('13/09/2010','DD/MM/YYYY')
    and date_field < TO_DATE('14/09/2010','DD/MM/YYYY')

    user492400 wrote:
    The clustering_factor is not too high?

    OBJECT_TYPE-> INDEX
    BLEVEL-> 2
    LEAF_BLOCKS-> 14796
    DISTINCT_KEYS-> 3249780
    AVG_LEAF_BLOCKS_PER_KEY-> 1
    AVG_DATA_BLOCKS_PER_KEY-> 1
    CLUSTERING_FACTOR-> 3620372
    NUM_ROWS-> 4823298

    If you look at your plan, it has a cost of 11156.

    The CBO estimated 29446 lines will be returned. It's a selectivity of 29446/4823298, which represents 0.61%.

    Therefore, the cost of using the index is approximately:

    2 (blevel) + 0.61% of the 14796 (pads of sheets) + 0.61% 3620372 (clustering factor) which is about 22195 (assuming that CBO based default settings).

    22195 is superior (so much) than 11156 so Full Table Scan WINS.

    See you soon

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

  • Indexing of a column based on content types

    Hello

    Is it possible to create an index of text only for certain content. For example, I have a table of CONTENTS
    create table CONTENT
    (
    Identification number,
    CONTENT_TYPE_ID number 4,
    Clob DATA
    )

    with different content_type_ids say 10, 20, 30, etc. I need to create a text index on the column of DATA for content_type_id = 10. Can anyone help me please with an example? Thanks in advance

    Concerning
    REDA

    Another method would be to use the format column in the database using table IGNORE to disregard the documents you do not want to index.

    SQL> alter table CONTENT add fmt varchar2(10);
    
    Table altered.
    
    SQL> update CONTENT set fmt='IGNORE' where  content_type_id != 10;
    
    2 rows updated.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> create index content_idx
     on content (data)
     indextype is ctxsys.context
     parameters ('format column fmt')
    /
    
    Index created.
    

    -Edwin

  • Change data type column - performance of indexes in Oracle 10 g

    Hello
    I have a table with too many lines (lines more than 2000000). I changed the data type (NUMBER of VARCHAR2) of an indexed column (the index is only for this column), using a temporary backup table:

    CREATE TABLE BKTABLE AS SELECT FIELD, ROWID AS IDROW ORIGNALTABLE;
    UPDATE ORIGNALTABLE SET FIELD = NULL;
    ALTER ORIGNALTABLE CHANGE THE FIELD VARCHAR2 (256);
    ORIGNALTABLE UPDATE A FIELD SET = (SELECT FIELD OF BKTABLE B WHERE B.IDROW = A.IDROW);

    This way worked OK.

    There is no performance problem knew about the ORIGNALTABLE index? Need to rebuild this index?

    Thks!

    Need to rebuild this index?

    YES

    ALWAYS
    View the name of the operating system (OS) & version for DB Server System.
    View the results of
    SELECT * from version $ v
    or post the Oracle version with 4 decimals

  • Automatically sort columns

    Hello

    I have a column with a number of figures for names that changes according to the entry on a separate table. It is sort of have this kind of column down automatically without having to click each me time change of numbers?

    Thank you

    Rob

    Hi Rob,

    The way I would like to address the issue is to create an index column in your original table that would rank the values that you want to sort.

    C2 = RANK (B2, B, 0)

    It is filled down.

    This index is used to retrieve the values in a report table that is already sorted.

    A2 = INDEX (entry::A, CORRESPONDENCE data (LINE (cell) −1, data entry: $C, 0),-l' the index of the column, area-index)

    It is filled down and across.

    Quinn

  • How can I get a name of table 1, column A, if column B is a negative number and insert the names of table 2?

    How can I get a name of table 1, column A, if column B is a negative number and insert the names of table 2?

    What is the formula?

    You can do this with a column of "index" in table 1, as this assistance:

    The formula in C2, filled to the bottom:

    IF (B =<>

    That increments a counter each time that it finds a negative number in column B.

    In the second table, you can retrieve a list of negative values in this way:

    The formula in A2, filled to the bottom:

    = INDEX (array 1::A, CORRESPONDENCE (LINE (−1, Table 1::C), 0))

    It takes the line number, the formula is activated, subtracts 1 to the header line and look up the result in the column of table 1 C.  If it finds a match, it feeds the line number to the INDEX page with retrieves the value of the column of table 1A.

    To hide the red triangles of signage wrap the IFERROR formula, like this:

    = SIERREUR (INDEX (table 1::A, CORRESPONDENCE (LINE (−1, Table 1::C), 0)),"")

    Of course, you can also simply filter on column B without the need to set up a column from another table or index.

    SG

Maybe you are looking for