Use of indexes is not recorded in v$ object_usage...

Hi all

A few days ago, I posted a question to see if table scans / index deemed "used" index followed its use.

Now I have a bit of the opposite question: I can't seem to get clues to "confess" v$ object_usage they been used!

I tried this on two systems: a quarter-rack race Exadata V1 11.2.0.2 BP7 and a 11.2.0.3 (vanilla) running on AIX 5.3

I can't make it work on either, despite the fact that I have activated it for 900 non-unique index on the Exadata machine and 300 on the AIX 5.3 database. The two are producing, so I expect high activity levels.

That's what I did. Maybe I did something wrong. Surely that I did.

The control of its use on the index WE - I did yesterday
ALTER INDEX schema1.decentsizedtab_nu-idx1 MONITORING USAGE;
Find the name of owner or table on which the index is based. When I run the present, nothing crazy is returned. It is a unique, valid, index that has not been analyzed since June 2010. It is NOT partitioned, NOT temporary and NOT invisible. Segments were created for the index.
SELECT owner, index_name, index_type, table_owner, table_name, table_type, uniqueness, status, last_analyzed, partitioned, temporary, global_stats, visibility, segment_created
FROM dba_indexes
WHERE owner = 'SCHEMA1'
AND index_name = 'DECENTSIZEDTAB_NU-IDX1';
Determine the columns in dba_ind_columns
SELECT index_owner, index_name, column_name, column_position
FROM dba_ind_columns
WHERE index_owner = 'SCHEMA1'
AND index_name = 'DECENTSIZEDTAB_NU-IDX1';

SCHEMA1 DECENTSIZEDTAB_NU-IDX1  COL_1               1
SCHEMA1 DECENTSIZEDTAB_NU-IDX1  COL_2               2
SCHEMA1 DECENTSIZEDTAB_NU-IDX1  COL_3               3
SCHEMA1 DECENTSIZEDTAB_NU-IDX1  COL_4               4
So you would think that would use the index, especially if I give this move a bit to use it...
EXPLAIN PLAN FOR
SELECT /*+ INDEX (schema1.decentsizedtab_nu-idx1)*/ col_1, col_2, col_3, col_4
FROM schema1.decentsizedtab;
The plan of the explain command shows that we use the DECENTSIZEDTAB_NU-IDX1 index.
SELECT * FROM table(DBMS_XPLAN.DISPLAY);

Plan hash value: 1798057294
--------------------------------------------------------------------------------------------
| Id  | Operation                    | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT             |             |   145K|  2138K|    97   (2)| 00:00:02 |
|   1 |  INDEX STORAGE FAST FULL SCAN| DECENTSIZEDTAB_NU-IDX1|   145K|  2138K|    97   (2)| 00:00:02 |
--------------------------------------------------------------------------------------------
OK, so we're going to execute the statement and see if the index is used...
SELECT /*+ INDEX (schema1.decentsizedtab_nu-idx1)*/ col_1, col_2, col_3, col_4
FROM schema1.decentsizedtab;

     145721 rows selected.
Once this is completed, we will check the object_usage view $ v to see if it has registered using the index
SELECT * 
FROM v$object_usage;

No rows returned.
LOL. Nope. Bitch index tracking! *

I have not considered the fact that exadata was involved (unloading, etc.) to perform this operation somehow, but as I said, I tried this with an Oracle database restart a single instance and I see the same thing.

Thoughts? Ideas? Critical? Personal insults?

Mark

marksmithusa wrote:
I noticed that MOS Note 261756.1 gives to think you have to be connected to the schema owner to display the results.

It is a real pain because I have 50-60 patterns in the Exadata database AND I am logged in as SYSDBA - surely, I should be able to see everything in v$ object_usage?

Here is the definition of v$ object_usage

select io.name, t.name,
       decode(bitand(i.flags, 65536), 0, 'NO', 'YES'),
       decode(bitand(ou.flags, 1), 0, 'NO', 'YES'),
       ou.start_monitoring,
       ou.end_monitoring
from sys.obj$ io, sys.obj$ t, sys.ind$ i, sys.object_usage ou
where io.owner# = userenv('SCHEMAID')
  and i.obj# = ou.obj#
  and io.obj# = ou.obj#
  and t.obj# = i.bo#

The predicate: io.owner # = userenv ('SCHEMAID') is that which limits the output to the current user.
If you can connect with a login adapted, you could create another view that eliminates this predicate, perhaps adding to the selection in the io.owner list #, or even join user$ on io.owner # u.user = #, for example

select u.name, io.name, t.name,
       decode(bitand(i.flags, 65536), 0, 'NO', 'YES'),
       decode(bitand(ou.flags, 1), 0, 'NO', 'YES'),
       ou.start_monitoring,
       ou.end_monitoring
from sys.obj$ io, sys.obj$ t, sys.ind$ i, sys.object_usage ou, sys.user$ u
where i.obj# = ou.obj#
  and io.obj# = ou.obj#
  and t.obj# = i.bo#
  and u.user# =  io.owner#
;

Concerning
Jonathan Lewis

Tags: Database

Similar Questions

  • How to monitor the SQL perticuler using the INDEX or not?

    I'm running on a long-term quary and the output is coming very late. So, I want to know that the quary sql uses the index or not? How do I know that?

    Hello

    You have not provided your db version?
    You can check v $ object_usage in a simple way. Try to check the explanation of your query if you current sql is by using your existing index or not.
    Check with dbms_xplan.display

    Request to go through the links of Ask tom and jonathan lewis
    http://jonathanlewis.WordPress.com/2007/02/15/index-not-used-10G/
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:736825544526

    HTH

    -Pounet N

  • query not using the index for some user

    Hello

    I have a query that is running in less than a second for sys, system, or schema owner. However, another user (test_user) take 30 seconds to run the same query.

    I certainly dba and privileges identical to test_user as schmea_user, but the result is the same.

    I checked

    Select * from V$ SYS_OPTIMIZER_ENV;

    Both are the same for both users.

    I have check the plan to explain to both users. I noticed that for sys/system/schema_owner, the query uses an index, but not the test_user.

    All have experience the issue where a user uses an index, but not the other?

    Thank you for any assistance.

    Thank you for the display of formatting output, this output is much easier to read.

    One of the first things you notice about the execution plans that is for the owner non-schema "SQL_ID, 0wcs85uywn72m, number of children 1" appears in the output of DBMS_XPLAN, while "SQL_ID 0wcs85uywn72m, child number 0" (the same SQL_ID but a different number of child) appears for the schema owner. "" Whereas the SQL_ID is the same, which indicates that the client requires exactly the same SQL statement, so it's a good start.

    Then, note that in the predicate for the nonschema owner information section the following appears (sometimes with the order of the two conditions switched in position) as a condition placed on each table that is available in the schema:

    filter(("SEAL_FLAG" IS NULL OR "SEAL_FLAG"'Y'))
    

    The above suggests the presence of the virtual private database (or a superset of private database virtual) generated the predicates. You should be able to confirm that this is the case by querying V$ VPD_POLICY using the SQL_ID which was displayed in the DBMS_XPLAN output:

    SELECT
      *
    FROM
      V$VPD_POLICY
    WHERE
      SQL_ID='0wcs85uywn72m';
    

    As a test, I made a few minor adjustments to the example on this page:
    http://Antognini.ch/2011/09/optimizer_secure_view_merging-and-VPD/
    I changed the name of T to T12 and TESTUSER table specified for the schema names. I then created the function S of this page as follows:

    CREATE OR REPLACE FUNCTION s (schema IN VARCHAR2, tab IN VARCHAR2) RETURN VARCHAR2 AS
    BEGIN
      RETURN 'ID < 10';
    END;
    /
    

    I then added a couple of lines in the T12 test table:

    INSERT INTO T12 VALUES (1,1,NULL);
    INSERT INTO T12 VALUES (4,1,NULL);
    INSERT INTO T12 VALUES (10,1,NULL);
    INSERT INTO T12 VALUES (12,1,NULL);
    
    COMMIT;
    

    With an active 10053 trace, I executed the following SQL statement:

    SELECT id, pad
      FROM t12
      WHERE
      spy(id, pad) = 1
    

    The SQL_ID (in my case, found in the 10053 trace file) was 6hqw5p9d8g8wf, so I checked V$ VPD_POLICY to this SQL_ID:

    SELECT
      *
    FROM
      V$VPD_POLICY
    WHERE
      SQL_ID='6hqw5p9d8g8wf';
    
    ADDRESS          PARADDR            SQL_HASH SQL_ID        CHILD_NUMBER OBJECT_OWNER OBJECT_NAME                    POLICY_GROUP                   POLICY                 POLICY_FUNCTION_OWNER          PREDICATE
    ---------------- ---------------- ---------- ------------- ------------ ------------ ------------------------------ ------------------------------ ---------------------- ------------------------------ ------------------------------------------------------------------------------------
    000007FFB7701608 000007FFB7743350 1518838670 6hqw5p9d8g8wf            0 TESTUSER     T12                            SYS_DEFAULT                    T_SEC                  TESTUSER                       ID < 10
    

    As noted above, the VPD test function named S added the predicate "ID".< 10"="" to="" the="" sql="">

    There are not many clues in the 10053 trace file in my test VPD generated additional predicates. Trace the following was found shortly after the beginning of the file (this is the SQL statement initially presented):

    ----- Current SQL Statement for this session (sql_id=6hqw5p9d8g8wf) -----
    SELECT id, pad
      FROM t12
      WHERE
      spy(id, pad) = 1
    

    I searched then down in the trace for final after changes query file (to be noted that this sentence could be slightly different in different versions of database Oracle). That's what I found:

    Final query after transformations: ******* UNPARSED QUERY IS *******
    SELECT "T12"."ID" "ID","T12"."PAD" "PAD" FROM "TESTUSER"."T12" "T12" WHERE "TESTUSER"."SPY"("T12"."ID","T12"."PAD")=1 AND "T12"."ID"<10
    kkoqbc: optimizing query block SEL$F5BB74E1 (#0)
    

    Note that the final query after transformation shows how the final version of the query that has been rewritten by the query optimizer before the SQL statement has been executed and this version of the query includes AND "T12". "" IDENTITY CARD ".<10. if="" i="" was="" attempting="" to="" determine="" how="" that=""><10 predicate="" was="" added="" to="" the="" sql="" statement,="" i="" would="" start="" at="" the="" "current="" sql="" statement="" for"="" line="" in="" the="" trace="" file="" and="" search="" down="" the="" trace="" file="" for=""><10* -="" in="" this="" case,="" the="" following="" is="" what="" i="" found="" as="" the="" first="" search="" result,="" very="" close="" to="" the="" "current="" sql="" statement="" for"="" line="" in="" the="" trace="">

    **************************
    Predicate Move-Around (PM)
    **************************
    PM:     PM bypassed: Outer query contains no views.
    PM:     PM bypassed: Outer query contains no views.
    query block SEL$F5BB74E1 (#0) unchanged
    FPD: Considering simple filter push in query block SEL$F5BB74E1 (#0)
    "TESTUSER"."SPY"("T12"."ID","T12"."PAD")=1 AND "T12"."ID"<10
    try to generate transitive predicate from check constraints for query block SEL$F5BB74E1 (#0)
    finally: "TESTUSER"."SPY"("T12"."ID","T12"."PAD")=1 AND "T12"."ID"<10
    

    As can be seen from the above (because the predicate again appeared before and after the line containing the word "Finally: '), the AND"T12 ". "" IDENTITY CARD ".<10 predicate="" was="" already="" added="" to="" the="" original="" sql="" statement="" by="" the="" time="" the="" predicate="" move-around="" section="" of="" the="" trace="" file="" was="" written,="" and="" that="" is="" the="" first="" mention="" of=""><10 in="" the="" trace="" file.="" in="" your="" case,="" you="" would="" search="" the="" 10053="" trace="" file="">

    "SEAL_FLAG" IS NULL
    

    If V$ VPD_POLICY revealed that there are virtual private database (VPD) generated predicates applied to the SQL statement, take a look at the following article in the Oracle documentation library:
    http://docs.Oracle.com/CD/B28359_01/network.111/B28531/VPD.htm

    This article lists the different points of view, who can be interviewed to learn more about the VPD rules which are in force in the schema. For example, with my SPV test:

    SELECT
      *
    FROM
      ALL_POLICIES;
    
    OBJECT_OWNER                   OBJECT_NAME                    POLICY_GROUP                  POLICY_NAME                    PF_OWNER                       PACKAGE                       FUNCTION                       SEL INS UPD DEL IDX CHK ENA STA POLICY_TYPE              LON
    ------------------------------ ------------------------------ ----------------------------- ------------------------------ ------------------------------ ----------------------------- ------------------------------ --- --- --- --- --- --- --- --- ------------------------ ---
    TESTUSER                       T12                            SYS_DEFAULT                   T_SEC                          TESTUSER                       S                                                            YES YES YES YES NO  NO  YES NO  DYNAMIC                  NO
    

    He knows performance issues related to the use of VPD, some of which are Oracle Database version-dependent, and some have been fixed in recent versions. Take a look at the following articles if you have access to My Oracle Support:
    MetaLink (MOS) Doc ID 728292.1 ' known performance problems when you use transparent encryption data and indexes on the encrypted columns.
    MetaLink (MOS) Doc ID 967042.1 "How to investigate Query Performance regressions Caused by VPD (FGAC) predicates?"

    You might find working through the second of the above that the problem is caused by a bug in database Oracle.

    On a side note. Execution plans you have published include the 0 value in the column starts many of the operations in the execution plan. 0 indicates that the operation never actually executed. A 0 is included in the column starts on the line that includes the FULL ACCESS of TABLE of PEOPLE_TRANSACTIONS at least to the OPC. Value 123, a full table of PEOPLE_TRANSACTIONS table scan PROPERTY_CONTAINER_ID was not actually performed.

    Charles Hooper
    http://hoopercharles.WordPress.com/
    IT Manager/Oracle DBA
    K & M-making Machine, Inc.

  • I wan to save my history Web sites, but my computer does not record. I go to tools &gt; options &gt; privacy and try to "save history", but it goes back to "use the custom settings for history"... I'm all down on those checked so it should save, but it do

    I wan to save my history Web sites, but my computer does not record. I go to tools > options > privacy and try to "save history", but it goes back to "use the custom settings for history"... I'm all down on those checked so it should save, but it doesn't.

    Thank you for taking the time to help me!

  • This index is not used

    Hi forum

    Dynamically generated in this query:

    SELECT TITULO_MEDIODEPAGO AS TITLE, IDA_MEDIODEPAGO AS IDA, COUNT (DISTINCT VISTA. ID1 | VISTA. ID2. VISTA. ID3) AS AMOUNT

    OF MVISTA VISTA

    WHERE ((COALESCE (VISTA. FECHAEXPIRACION, TO_DATE (' 01/01/9999 ',' dd/mm/yyyy ""))) > = SYSDATE) AND

    ((1=1) OR: p_rubro IS NULL) AND ((1=1) OR: p_subrubro IS NULL) AND

    (VISTA. TITULO_PROVINCIA =: p_provincia) AND ((1=1) OR: p_ciudad IS NULL) AND

    ((1=1) OR: p_barrio IS NULL) AND ((1=1) OR: p_mediopago IS NULL) AND

    ((1=1) OR: p_nrocuotas IS NULL) AND ((1=1) OR: p_porcentaje IS NULL) AND

    ((1=1) OR: p_dias IS NULL) AND ((1=1) OR: p_textoBusqueda IS NULL)

    TITULO_MEDIODEPAGO GROUP, IDA_MEDIODEPAGO

    : p_rubro is null

    : p_subrubro is null

    : p_provincia = "PROV1.

    : p_barrio is null

    : p_mediopago is null

    : p_nrocuotas is null

    : p_porcentaje is null

    : p_dias is null

    : p_textoBusqueda is null

    When I inspect the plan to explain it, I could see a full analysis on the materialized view MVISTA operation. I want to avoid this analysis complements the view with 500 k lines:

    MAT_VIEW_ACCESSMVISTA

    Filter predicates

    AND
    NLSSORT (VISTA. TITULO_PROVINCIA, "nls_sort = 'BINART_AI'") = NLSSORT (: P_PROVINCIA "nls_sort =" BINARY_AI"')
    COALESCE (VISTA. FECHAEXPIRACION, TIMESTAMP'9999-01-01 00:00:00 ') > = SYSDATE @!

    I add an index to the materialized view 'MVISTA' TITULO_PROVINCIA (CSA) and FECHAEXPIRACION (CSA) fields, but it is not used by the query. Why the index is not used? How to define the index serve him?

    Thank you very much

    One of the reasons for the index is not used because you apply the function nlssort on a single column.

    You must use an index of feature based using this function instead.

    In addition, I would rewrtite him coalesce to

    (VISTA. FECHAEXPIRACION > = SYSDATE or VISTA. FECHAEXPIRACION is null)

  • How we force a query to use transparently a hint, even if the index is not given in the query as a query rewriting.

    How we force a query to use transparently a hint, even if the index is not given in the query as a query rewriting.

    For example:

    If the user runs a query select deptno, avg (sal) from emp group by deptno;

    We want the optimizer to use a hint of result_cache with this request, and it should be transparent to the user.

    Query should be rewritten to seamlessly

    Select / * + result_cache * / deptno, avg (sal)

    WCP

    Group of deptno;

    How can this feature we make? Please advice.

    I checked the possibility of SPM and contours, but it is not clear if this rewrite is possible here.

    Thank you and best regards,

    Vikas Krishna

    Surely dbms_advanced_rewrite is designed for this situation?

  • does not use the INDEX

    I have problem with a query as follows. It does not index when I keep a function on the left side of the comparison in which the condition.

    But when I remove the function is using the index.

    With BLC AS 
    Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     ID                                        NOT NULL NUMBER
     MASTER_VALUE               NOT NULL NUMBER(8)
     DESC_TEXT_ID                                    NUMBER
     GVM                                                     VARCHAR2(50)
     MASTER_LOOKUP_ID    NOT NULL  NUMBER
     WORK_SECTION_ID                          NUMBER
     AUDIT_TRAIL_NO                              NUMBER
     
    
    SQL> SELECT COUNT(*) FROM BLC;
      COUNT(*)
    ----------
          7769
    
    SQL> SELECT COUNT(DISTINCT(GVM)) "distinct" FROM BLC;
      distinct
    ----------
          1350
    
    SQL> SELECT COUNT(*) "nulls" FROM BLC WHERE GVM IS NULL;
    
         nulls
    ----------
          6419
    
    SQL> SELECT COLUMN_NAME,INDEX_NAME FROM DBA_IND_COLUMNS WHERE TABLE_NAME='BLC';
    
    COLUMN_NAME                              INDEX_NAME
    ---------------------------------------- ------------------------------
    MASTER_LOOKUP_ID      LKPCDE_MSTLKP_FK_I
    WORK_SECTION_ID        LKPCDE_WRKSEC_FK_I
    GVM                                   LKPCDE_UK
    MASTER_VALUE              LKPCDE_MASTERID_VALUE_UK
    MASTER_LOOKUP_ID     LKPCDE_MASTERID_VALUE_UK
    ID                                       LKPCDE_PK
    
    SQL> EXPLAIN PLAN FOR SELECT ID FROM BLC WHERE UPPER ( GVM) = 'MAIN_ORG';
    Explained.
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    Plan hash value: 3196655606
    --------------------------------------------------------------------------------------
    | Id  | Operation         | Name             | Rows  | Bytes | Cost (%CPU)| Time|
    --------------------------------------------------------------------------------------
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |                  |    78 |   624 |    18   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| BLC |    78 |   624 |    18   (0)| 00:00:01 |
    --------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    -----------------------------------------------------------------------------------------------------------------------------------
       1 - filter(UPPER("GVM")='MAIN_ORG')
    13 rows selected.
    
    
    SQL> EXPLAIN PLAN FOR SELECT ID FROM BLC WHERE GVM
      = 'MAIN_ORG';
    Explained.
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    Plan hash value: 1620245961
    --------------------------------------------------------------------------------
    ----------------
    | Id  | Operation                   | Name             | Rows  | Bytes | Cost (%
    CPU)| Time     |
    --------------------------------------------------------------------------------
    ----------------
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |                  |     1 |     8 |     2
     (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| BLC |     1 |     8 |     2
     (0)| 00:00:01 |
    |*  2 |   INDEX UNIQUE SCAN         | LKPCDE_UK        |     1 |       |     1
     (0)| 00:00:01 |
    --------------------------------------------------------------------------------
    ----------------
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("GVM"='MAIN_ORG')
    14 rows selected.
    
    SQL> EXPLAIN PLAN FOR SELECT /* INDEX(LKPCDE_UK) */ ID FROM BLC WHE
    RE UPPER ( GVM ) = 'MAIN_ORG';
    Explained.
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    Plan hash value: 3196655606
    --------------------------------------------------------------------------------
    ------
    | Id  | Operation         | Name             | Rows  | Bytes | Cost (%CPU)| Time
         |
    --------------------------------------------------------------------------------
    ------
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |                  |    78 |   624 |    18   (0)| 00:0
    0:01 |
    |*  1 |  TABLE ACCESS FULL| BLC |    78 |   624 |    18   (0)| 00:0
    0:01 |
    --------------------------------------------------------------------------------
    ------
    
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    ---------------------------------------------------
       1 - filter(UPPER("GVM")='MAIN_ORG')
    13 rows selected.
    

    Please let me know how I can force it to use an index as it is causing the CPU usage.

    I can't change the query in the application it is used in several places.

    Thank you

    And/or read: ORACLE-BASE - Oracle function index

  • Index is not used, although suspicion.

    DBVersion: 10.2.0.3
     CREATE TABLE "ESW"."DURCHLAUFZEIT_SONDER_AG" 
       (     "AG" NUMBER(3,0) DEFAULT 0 NOT NULL ENABLE, 
         "TAGE" NUMBER(5,0) DEFAULT 0 NOT NULL ENABLE, 
         "ABTEILUNG" VARCHAR2(20 BYTE), 
    
    Content of this table
    AG    TAGE  ABTEILUNG
    910     1     EAV
    133     1     TG
    743     2     TM
    719     2     TM
    706     2     TM
    979     10     TM
    When I use a select statement like that no index on tabel 'walze w2' is used:
    select /*+ index(apl(arbeitsgang_nr))*/
           /*+ index(w2 WALZE_IND1)*/
            SUM (dsa.tage) tage,
             w2.walzen_nr walzen_nr,
            w2.walzen_ng walzen_ng
          from durchlaufzeit_sonder_ag dsa,
               auftrag_arbeitsplan apl,
               walze w2
          where apl.arbeitsgang_nr in
              ( select dsa1.ag ag
                from durchlaufzeit_sonder_ag dsa1
                where dsa1.abteilung = 'TM' )*and apl.auftr_nr = w2.auftr_nr
    and apl.auftr_jj = w2.auftr_jj
    and apl.auftr_pos = w2.auftr_pos
    and apl.auftr_los = w2.auftr_los
    and dsa.abteilung = 'TM' 
    and dsa.ag = apl.arbeitsgang_nr
    GROUP BY w2.walzen_nr,
         w2.walzen_ng;
    
    --------------------------------------------------------------------------------------------------
    | Id  | Operation                       | Name                           | Rows  | Bytes | Cost  |
    --------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                |                                |    21 |  1155 |  4927 |
    |   1 |  SORT GROUP BY                  |                                |    21 |  1155 |  4927 |
    |*  2 |   HASH JOIN                     |                                |    21 |  1155 |  4922 |
    |   3 |    NESTED LOOPS                 |                                |   333 | 11655 |  4682 |
    |   4 |     NESTED LOOPS                |                                | 16215 |   427K|  4682 |
    |   5 |      TABLE ACCESS BY INDEX ROWID| DURCHLAUFZEIT_SONDER_AG        |     4 |    40 |     2 |
    |*  6 |       INDEX RANGE SCAN          | DURCHLAUFZEIT_SONDER_AG_INDEX1 |     4 |       |     1 |
    |   7 |      TABLE ACCESS BY INDEX ROWID| AUFTRAG_ARBEITSPLAN            |  4054 | 68918 |  1170 |
    |*  8 |       INDEX RANGE SCAN          | AUFTRAG_ARBEITSPLAN_IND3       |  4054 |       |     7 |
    |*  9 |     INDEX RANGE SCAN            | DURCHLAUFZEIT_SONDER_AG_INDEX2 |     1 |     8 |       |
    |  10 |    *TABLE ACCESS FULL*            | WALZE                          | 75432 |  1473K|   239 |
    --------------------------------------------------------------------------------------------------
    When I run the same sql to the delivery of the selection from tabel 'durchlaufzeit_sonder_ag' by my own index is used:
    select /*+ index(apl(arbeitsgang_nr))*/
           /*+ index(w2 WALZE_IND1)*/
            SUM (dsa.tage) tage,
             w2.walzen_nr walzen_nr,
            w2.walzen_ng walzen_ng
          from durchlaufzeit_sonder_ag dsa,
               auftrag_arbeitsplan apl,
               walze w2
          where apl.arbeitsgang_nr in
                          ( 743, 719, 706, 979 )
    and apl.auftr_nr = w2.auftr_nr
    and apl.auftr_jj = w2.auftr_jj
    and apl.auftr_pos = w2.auftr_pos
    and apl.auftr_los = w2.auftr_los
    and dsa.abteilung = 'TM' 
    and dsa.ag = apl.arbeitsgang_nr
    GROUP BY w2.walzen_nr,
    w2.walzen_ng;
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                        | Name                           | Rows  | Bytes | Cost  |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                 |                                |     2 |    94 |  1161 |
    |   1 |  SORT GROUP BY                   |                                |     2 |    94 |  1161 |
    |   2 |   TABLE ACCESS BY INDEX ROWID    | WALZE                          |     1 |    20 |     2 |
    |   3 |    NESTED LOOPS                  |                                |     2 |    94 |  1156 |
    |*  4 |     HASH JOIN                    |                                |    31 |   837 |  1094 |
    |   5 |      INLIST ITERATOR             |                                |       |       |       |
    |   6 |       TABLE ACCESS BY INDEX ROWID| DURCHLAUFZEIT_SONDER_AG        |     3 |    30 |     2 |
    |*  7 |        INDEX RANGE SCAN          | DURCHLAUFZEIT_SONDER_AG_INDEX2 |     3 |       |     1 |
    |   8 |      INLIST ITERATOR             |                                |       |       |       |
    |   9 |       TABLE ACCESS BY INDEX ROWID| AUFTRAG_ARBEITSPLAN            |  2276 | 38692 |  1091 |
    |* 10 |        INDEX RANGE SCAN          | AUFTRAG_ARBEITSPLAN_IND3       |  2276 |       |     8 |
    |* 11 |     INDEX RANGE SCAN             | WALZE_IND1                     |     1 |       |     1 |
    ---------------------------------------------------------------------------------------------------
    I don't understand this. Why oracle do not use index (provided in the indicator) when I select the values in the durchlaufzeit_sonder_ag table, but when they provide my own values, it uses the index?

    As far as I know only the first comment of suspicion in a given query block is considered.

    So it would be valid (unless hint_one is specified correctly)...

    SELECT /*+ hint_one hint_two */
           column_name
    FROM   table_name;
    
    SELECT /*+
           hint_one
           hint_two
           */
           column_name
    FROM   table_name;
    
    SELECT /*+ hint_one
           hint_two */
           column_name
    FROM   table_name;
    
    SELECT --+ hint_one hint_two
           column_name
    FROM   table_name;
    

    But this should not (regardless of if hint_one is specified correctly)...

    SELECT /*+ hint_one */
           /*+ hint_two */
           column_name
    FROM   table_name;
    

    Also I do not believe your INDEX index specification is correct, a single set of brackets should be used and the alias name and index table must be separated by a space or a comma.

    So it would be nice...

    SELECT /*+ INDEX (table_alias index_name) */
           column_name
    FROM   table_name;
    
    SELECT /*+ INDEX (table_alias, index_name) */
           column_name
    FROM   table_name;
    

    But it would not...

    SELECT /*+ INDEX (table_alias (index_name)) */
           column_name
    FROM   table_name;
    

    Also, you should be aware that an INDEX indicator is only considered provided that supports a given join order.

  • Table, shuffle a part of a table using start and end Index does not work properly

    Hello
    I used a method to mix a part of an array, but I noticed that it does not work very well.
    When I run this method sometimes I empty array values.

    So if you try the example below and test out a few times would get you a good result but sometimes a wrong result.


    For example, when I run the present I get in my trace output:

    a, b, c, d, g, e, f (here after the g it won't)

    a, b, c, f, g, d, e (here it goes right)

    a, b, c, d, g, f, e (here I'm not)

    var myArr:Array = ['a', 'b', 'c', ', 'e', 'f', 'g'];

    function shuffle(myArray:Array,_startIndex:int_=_0,_endIndex:int_=_0):Array {}
    if(endIndex == 0) endIndex = myArray.length - 1;
    for (var i: int = endIndex; I > startIndex; i--) {}
    var randomNumber:int = Math.floor (Math.random () * endIndex) + startIndex;
    var tmp: * = myArray [i];
    myArray [i] = myArray [NombrAl];
    myArray [NombrAl] = tmp;
    }
    return myArray;
    }

    trace (shuffle (myArr, 3, 5));

    No one knows where he goes wrong and why nobody on the web discovered this problem previously, because
    When I googled on this topic, I found other methods that also sometimes fail.

    Kind regards
    Chris.

    var myArr:Array = ['a', 'b', 'c', ', 'e', 'f', 'g'];

    function shuffle(myArray:Array,_startIndex:int_=_0,_endIndex:int_=_0):Array {}
    If (endIndex == 0) {}
    endIndex = myArray.length - 1;
    }
    for (var i: int = endIndex; I > = startIndex; i--) {}
    trace (i)
    var randomNumber:int = int (Math.random () * (endIndex + startIndex-1)) + startIndex;

    var tmp: * = myArray [i];
    trace (i, randomNumber)
    myArray [i] = myArray [NombrAl];
    myArray [NombrAl] = tmp;
    }
    return myArray;
    }

    trace (shuffle (myArr, 3, 5));

    There were a few issues going on here.  The first is that you used the index end to the random number, but should be the difference between the beginning and the end.  the second is the > = start index in the loop.  give this a go.

  • Performance problem - Index is not used when a string of zero padded is queried

    Hi all

    I have a table T1 that has many columns. One such column C1 is a varchar2 (20). T1 has 10 million rows and there is an index I1 called C1. His stats are updated for tables and indexes. Here are the scenarios:
    Scenario 1
    select *   from T1 where C1 = '0013206263' --Uses index I1 
    187 ms
    Scenario 2
    select *   from T1 where C1 = '8177341863' --Uses index I1
    203 ms
    *Scenario 3*
    *select *   from T1 where C1 = '0000000945' --Uses Fulll Table Scan --Very Slow*
    *45 seconds*
    
    When I force the sql to use the index through a hint, it is working fine:
    Scenario 4
    select /*+ INDEX (t1 i1) */  *   from T1 where C1 = '0013206263' --Uses index I1 
    123 ms
    Scenario 5
    select /*+ INDEX (t1 i1) */  *   from T1 where C1 = '8177341863' --Uses index I1
    201 ms
    *Scenario 6*
    *select /*+ INDEX (t1 i1) */  *   from T1 where C1 = '0000000945' --Uses index I1*
    *172ms*
    Is there a reason for this problem of performance? Why the optimizer goes for FTS in scenario 3?

    Published by: user539954 on May 14, 2009 12:22

    Published by: user539954 on May 14, 2009 12:32

    user539954 wrote:

    one) says user_tab_histograms on the histogram on the column
    -Online there are about 250 lines for this query (varies from between 0 and 254 endpoint_number)
    Select * from user_tab_histograms where column_name like 'C1' and table_name like 'T1 '.

    It's balanced height histogram - by default in 10g if you do not deliberately block histograms you get histograms.

    >

    (b) If you "set autotrace traceonly explain' and run the queries a bit do you can predictions of a few lines for most of the values, but the predictions of a large number of lines when the value begins with zero, one or more zeros.
    => working on this now because there is a power outage now

    No need, your response to Justin provided examples which proved the point.
    If you expect always a few lines for all values of this column then you must ensure that this histogram does not builds. To avoid histograms in general, you must specify method_opt like 'for all columns size 1' in the call to dbms_stats.gather_table_stats; and don't forget that in 10g, you get an automatic job working at 22:00 that could remember his stats because he thinks that current statistics have gone stale.

    Concerning
    Jonathan Lewis
    http://jonathanlewis.WordPress.com
    http://www.jlcomp.demon.co.UK

    "Science is more than a body of knowledge; It's a way of thinking. "
    Carl Sagan

  • Query is not using the index. (Included execution plan. TKPROF output not available)

    Hi all

    Version of DB: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

    Here is the description of the problem:
    (The statistics are up to date for all tables).

    The query below does not use the index on ACCOUNTS_LIVE (ID). (Unique index)
    SQL> explain plan for
      2  select txn.account_number,to_number(txn.amount_lcy) txn_amt,to_date(booking_date,'YYYYMMDD') TXN_DATE,
      3        sal.latest_sal,sal.sal_date,customer_name,employer_name,
      4       decode(COMMUNICATION_TYPE_1,'MOBILE',COMMUNICATION_NO_1,
      5            decode(COMMUNICATION_TYPE_2,'MOBILE',COMMUNICATION_NO_2)) mob,
      6       txn.CURRENCY, CHEQUE_NUMBER,trans_dets,trans_reference,target,teller_id,acc.category,acc.inactive_marker,
      7            acc.posting_restrict,cus.sector,cus.industry
      8  from coreadmin.Gtxn_dtl_v1 txn,
      9                     (select account_number,round(to_number(nvl(amount_lcy,0)),2) latest_sal,TXN_DATE sal_date,rr
     10                      from
     11                        (select to_date(booking_date,'YYYYMMDD') TXN_DATE,batch_id,account_number,amount_lcy
     12                             ,row_number() over (partition by account_number
     13                                                     order by to_date(booking_date,'YYYYMMDD') desc NULLS LAST,
     14                                                     batch_id desc nulls last) rr,
     15                                     CURRENCY, CHEQUE_NUMBER,trans_dets,trans_reference
     16                             from coreadmin.Gtxn_dtl_v1
     17                             where transaction_code in ('204','938')
     18                  and to_number(amount_lcy) > 0)
     19                             where rr = 1
     20                       ) sal,accounts_live acc,customers_live cus
     21  where to_date(booking_date,'YYYYMMDD') between to_date('030109','DDMMRR') and to_date('020209','DDMMRR')
     22  and txn.account_number = sal.account_number
     23  and txn.account_number = acc.id
     24  and txn.CUSTOMER_ID = cus.CUSTOMER_number
     25  and target in ('30','31','32')
     26  /
    
    Explained.
    
    SQL> select * from table(dbms_xplan.display);
    
    PLAN_TABLE_OUTPUT                                                                                                                                     
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    Plan hash value: 920245766                                                                                                                            
                                                                                                                                                          
    -----------------------------------------------------------------------------------------------------------                                           
    | Id  | Operation                        | Name           | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                           
    -----------------------------------------------------------------------------------------------------------                                           
    |   0 | SELECT STATEMENT                 |                |   363M|   121G|       |   223K  (4)| 00:44:47 |                                           
    |*  1 |  HASH JOIN                       |                |   363M|   121G|  6232K|   223K  (4)| 00:44:47 |                                           
    |*  2 |   VIEW                           |                | 34453 |  5820K|       |   147K  (1)| 00:29:36 |                                           
    |*  3 |    WINDOW SORT PUSHED RANK       |                | 34453 |  1480K|  4072K|   147K  (1)| 00:29:36 |                                           
    |*  4 |     FILTER                       |                |       |       |       |            |          |                                           
    |   5 |      INLIST ITERATOR             |                |       |       |       |            |          |                                           
    |*  6 |       TABLE ACCESS BY INDEX ROWID| GTXN_DTL_V1    | 34453 |  1480K|       |   147K  (1)| 00:29:31 |                                           
    |*  7 |        INDEX RANGE SCAN          | IDX_TXN5       |   707K|       |       |  1815   (2)| 00:00:22 |                                           
    |*  8 |   HASH JOIN                      |                |   598K|   106M|    20M| 63724   (1)| 00:12:45 |                                           
    |*  9 |    MAT_VIEW ACCESS FULL          | CUSTOMERS_LIVE |   227K|    17M|       |  2239   (4)| 00:00:27 |                                           
    |* 10 |    HASH JOIN                     |                |   598K|    59M|  9504K| 57157   (1)| 00:11:26 |                                           
    |  11 |     MAT_VIEW ACCESS FULL         | ACCOUNTS_LIVE  |   249K|  6577K|       |  1832   (2)| 00:00:22 |                                           
    |* 12 |     TABLE ACCESS BY INDEX ROWID  | GTXN_DTL_V1    |   597K|    43M|       | 52319   (1)| 00:10:28 |                                           
    |* 13 |      INDEX RANGE SCAN            | IDX_TXN11_V1   |  1204K|       |       |  3931   (2)| 00:00:48 |                                           
    -----------------------------------------------------------------------------------------------------------                                           
                                                                                                                                                          
    Predicate Information (identified by operation id):                                                                                                   
    ---------------------------------------------------                                                                                                   
                                                                                                                                                          
       1 - access("TXN"."ACCOUNT_NUMBER"="ACCOUNT_NUMBER")                                                                                                
       2 - filter("RR"=1)                                                                                                                                 
       3 - filter(ROW_NUMBER() OVER ( PARTITION BY "ACCOUNT_NUMBER" ORDER BY                                                                              
                  TO_DATE("BOOKING_DATE",'YYYYMMDD') DESC  NULLS LAST,INTERNAL_FUNCTION("BATCH_ID") DESC  NULLS                                           
                  LAST)<=1)                                                                                                                               
       4 - filter(TO_DATE('030109','DDMMRR')<=TO_DATE('020209','DDMMRR'))                                                                                 
       6 - filter(TO_NUMBER("AMOUNT_LCY")>0)                                                                                                              
       7 - access("TRANSACTION_CODE"='204' OR "TRANSACTION_CODE"='938')                                                                                   
       8 - access("TXN"."CUSTOMER_ID"="CUS"."CUSTOMER_NUMBER")                                                                                            
       9 - filter("TARGET"='30' OR "TARGET"='31' OR "TARGET"='32')                                                                                        
      10 - access("TXN"."ACCOUNT_NUMBER"="ACC"."ID")                                                                                                      
      12 - filter("TXN"."CUSTOMER_ID" IS NOT NULL)                                                                                                        
      13 - access(TO_DATE("BOOKING_DATE",'YYYYMMDD')>=TO_DATE('030109','DDMMRR') AND                                                                      
                  TO_DATE("BOOKING_DATE",'YYYYMMDD')<=TO_DATE('020209','DDMMRR'))                                                                         
    
    38 rows selected.
    
    SQL> select index_name
      2  from dba_ind_columns
      3  where table_name = 'ACCOUNTS_LIVE'
      4  and column_name = 'ID';
    
    INDEX_NAME                                                                                                                                            
    ------------------------------                                                                                                                        
    IDX_ACCLIVE                                                                                                                                           
    Line 23 of the query uses accounts_live.id.

    11 the order ID explain plan shows that the index does not use.

    Please suggest.

    Thanks in advance,
    Jac

    What happens when you force the index by using hint and use the hash between txn and acc join?

    See you soon
    Sarma.

  • If the INSTR function will not use the INDEX o?

    Hi all


    I have a querry as
        Select * from Tab1 Where Instr(Tab1.Col1,'XX') >0 ;
    Is simple index on column Col1. If we use the index will be used or full table scan will happen in this scenario?

    Please give me explanatory answer because I have doubts


    Dhabas

    Hello

    You must use the index function if you want to avoid the full table scan. Check this box

    SQL> create table tab1(col1 varchar(20))
      2  /
    
    Table created.
    
    SQL> insert into tab1 values ('XXAB')
      2  /
    
    1 row created.
    
    SQL> create index col1_idx on tab1(col1);
    
    Index created.
    
    SQL> explain plan for Select * from Tab1 Where Instr(Tab1.Col1,'XX') >0;
    
    Explained.
    
    SQL> set autotrace on
    SQL> Select * from Tab1 Where Instr(Tab1.Col1,'XX') >0;
    XXAB
    
    Execution Plan
    ----------------------------------------------------------
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=5 Card=1 Bytes=12)
       1    0   TABLE ACCESS (FULL) OF 'TAB1' (TABLE) (Cost=5 Card=1 Bytes
              =12)
    
    Statistics
    ----------------------------------------------------------
              4  recursive calls
              0  db block gets
             32  consistent gets
              0  physical reads
              0  redo size
            234  bytes sent via SQL*Net to client
            280  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    
    SQL>  create index col1_idx2 on tab1(Instr(Col1,'XX'));
    
    Index created.
    
    SQL> Select * from Tab1 Where Instr(Tab1.Col1,'XX') >0;
    XXAB
    
    Execution Plan
    ----------------------------------------------------------
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=1 Bytes=12)
       1    0   TABLE ACCESS (BY INDEX ROWID) OF 'TAB1' (TABLE) (Cost=2 Ca
              rd=1 Bytes=12)
    
       2    1     INDEX (RANGE SCAN) OF 'COL1_IDX2' (INDEX) (Cost=1 Card=1
              )
    
    Statistics
    ----------------------------------------------------------
             28  recursive calls
              0  db block gets
             22  consistent gets
              0  physical reads
              0  redo size
            234  bytes sent via SQL*Net to client
            280  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    
    SQL> 
    

    Thank you
    AJ

  • One of the secondary index is not complete

    Hello

    I had an entity having 18847 record.  It contains a primary key and secondary keys several.  Since the next release to check, we see it, all indexes are complete except ProductId.  What should I do to fix this error?

    Verification of data persist #gdlogs #test. TableWhProductStorageCard

    Tree control to persist #gdlogs #test. TableWhProductStorageCard

    BTree: Composition of the btree, types and number of nodes.

    binCount = 149

    binEntriesHistogram = [40-49%: 1; 80 to 89%: 1, 90-99%: 147]

    binsByLevel = [level 1: count = 149]

    deletedLNCount = 0

    inCount = 3

    insByLevel = [level 2: number = 2; level 3: count = 1]

    lnCount = 18, 847

    mainTreeMaxDepth = 3

    BTree: Composition of the btree, types and number of nodes.

    Verification of data persist #gdlogs #test. TableWhProductStorageCard #BatchNo

    Tree control to persist #gdlogs #test. TableWhProductStorageCard #BatchNo

    BTree: Composition of the btree, types and number of nodes.

    binCount = 243

    binEntriesHistogram = [% 40-49: 43; 50 to 59%: 121, 60-69%: 30; 70-79%: 23; 80 to 89%: 17; 90-99%: 9]

    binsByLevel = [level 1: count = 243]

    deletedLNCount = 0

    inCount = 4

    insByLevel = [level 2: number = 3; level 3: count = 1]

    lnCount = 18, 847

    mainTreeMaxDepth = 3

    BTree: Composition of the btree, types and number of nodes.

    This secondary index is correct. (the lnCount is the same as the primary index)


    Verification of data persist #gdlogs #test. TableWhProductStorageCard #ProductId

    Tree control to persist #gdlogs #test. TableWhProductStorageCard #ProductId

    BTree: Composition of the btree, types and number of nodes.

    binCount = 168

    binEntriesHistogram = [% 40-49: 16; 50 to 59%: 47; 60 to 69%: 39; 70-79%: 26; 80 to 89%: 26; 90-99%: 14]

    binsByLevel = [level 1: count = 168]

    deletedLNCount = 0

    inCount = 3

    insByLevel = [level 2: number = 2; level 3: count = 1]

    lnCount = 14: 731

    mainTreeMaxDepth = 3

    BTree: Composition of the btree, types and number of nodes.

    This index is not complete. (lnCount is less than the primary index)  Then when use this index to iterate through the lines, only the first record 14731 is returned.


    Apparently, somehow your secondary index DB became not synchronized with your primary.  Normally, this is caused by not using is not a transactional store (EntityStore.setTransactional).  But whatever the cause, I will describe how to correct the situation by rebuilding the index.

    (1) take your application offline so that no other operations occur.

    (2) make a backup in case a problem occurs during this procedure.

    (3) do not open the EntityStore yet.

    (4) delete the database index that is out of sync (persist #gdlogs #test. TableWhProductStorageCard #ProductId) by calling the Environment.removeDatabase with this name.

    (5) rebuild the index database simply by opening the EntityStore.  It will take more time than usual, since the index will be rebuilt before the return of the EntityStore constructor.

    (6) confirm that the index is rebuilt correctly.

    (7) bring your online return request.

    -mark

  • Bit data does not record

    only two field data does not record. I placed a script, it works fine, but when it is open after saving a file, the fields are empty. Why this happen?

    event of calculation:

    var a = Itemnumber.rawValue;

    rowb var = xfa.resolveNodes ("form1.page2.Subform1.Table1.Row2 [*]");

    rowc var = xfa.resolveNodes ("form1.page2.Subform2.Table1.Row2 [*]");

    var WDT = xfa.resolveNodes ("form1.page2.Subform3.Table1.Row2 [*]");

    for (var i = 0; i < rowb.length; i ++)

    {

    var b = rowb.item (i). Calculation.rawValue;

    var bb = rowb.item (i). Total_dispensing. RawValue;

    if(a==b)

    var x = bb;

    }

    for (var i = 0; i < rowc.length; i ++)

    {

    var c = rowc.item (i). Initial.rawValue;

    var cc = rowc.item (i). Site2.RawValue;

    if(a==c)

    var y = cc;

    }

    for (var i = 0; i < rowd.length; i ++)

    {

    var d = rowd.item (i). ActualPatients.rawValue;

    var dd = rowd.item (i). Actual_patient. RawValue;

    if(a==d)

    var z = dd;

    }

    this.rawValue = x + y + z;

    If (this.) RawValue == 0)

    this.rawValue ="";

    In addition, I use acrobat X pro. another field of data in the same form to be saved.

    I extended my sample to manage the numbers Actual_patient as well, it looks like now.

    If (!.) Itemnumber.isNull)

    {

    this.rawValue = 0;

    rowb var = xfa.resolveNode ("form1.page1.subform2.Table2.Row2. (()_Calculation.rawValue_==_«_«_+_Itemnumber.rawValue+_»_») ");

    If (rowb! == null)

    {

    this.rawValue += rowb. Total_dispensing. RawValue;

    }

    rowc var = xfa.resolveNode ("form1.page1.subform3.Table3.Row2. (()_ActualPatients.rawValue_==_«_«_+_Itemnumber.rawValue+_»_») ");

    If (rowc! == null)

    {

    this.rawValue += rowc. Actual_patient. RawValue;

    }

    }

    And if the number can be duplicated, then it would look like.

    this.rawValue = 0;

    If (!.) Itemnumber.isNull)

    {

    rowb var = xfa.resolveNodes ("form1.page1.subform2.Table2.Row2. (()_Calculation.rawValue_==_«_«_+_Itemnumber.rawValue+_»_») ");

    for (var i = 0; i)

    {

    this.rawValue += rowb.item (i). Total_dispensing. RawValue;

    }

    rowb var = xfa.resolveNodes ("form1.page1.subform3.Table3.Row2. (()_ActualPatients.rawValue_==_«_«_+_Itemnumber.rawValue+_»_») ");

    for (var i = 0; i)

    {

    this.rawValue += rowb.item (i). Actual_patient. RawValue;

    }

    }

    I updated my sample https://acrobat.com/#d=uQmAFWaVoHydJQ1Xtf0QhQ

    I still don't know how the values of number, calculation and ActualPatient are created in my example, you have to key in, once indexed in the match of calculation the expected results, you posted.

    Concerning

    Bruce

  • Custom using netStream video player not working not

    I have problems playing movies using the flash in a way that is not sinking tons of memory (http://forums.adobe.com/thread/851908). So, I tried to build my own, but I can't allow him to play anything... What don't I get on the netStream working with the VideoDisplay?

    customComponents package < code >
    {
    import flash.events.Event;
    import flash.events.NetStatusEvent;
    import flash.events.TimerEvent;
    import flash.media.SoundTransform;
    import flash.media.Video;
    import flash.net.NetConnection;
    to import flash.net.NetStream;
    import flash.utils.Timer;

    Import mx.core.UIComponent;
    Import mx.events.FlexEvent;

    / * Explanation of the component: VideoDislplayCustom is a replacement for s:VideoDisplay, because our load method in video memory leaks in the order of several hundred megabytes every time a new video has been loaded. It provides a video object that attaches to a netStream, which allows us to broadcast the video files on the hard drive to play rather than load them into the player. By preventing the caching of all kinds, overcome us the leaks memory of this magnitude and are a tool that can last throughout the day switching between videos often. */

    SerializableAttribute public class VideoDisplayCustom extends UIComponent
    {
    / * Constructor * /.
    public void VideoDisplayCustom()
    {
    Super();



    videoPlayer = new VideoDisplay();
    this.addChild (videoPlayer);
    this.addEventListener (FlexEvent.CREATION_COMPLETE, init)


    netConnection = new NetConnection();
    netConnection.addEventListener (NetStatusEvent.NET_STATUS, netStatusHandler);
    NetConnection.connect() (null);

    netStream = new NetStream (netConnection);
    netStream.addEventListener (NetStatusEvent.NET_STATUS, netStatusHandler);
    netStream.client = this;
    netStream.bufferTime = BUFFER_TIME;

    setVolume (defaultVolume);
    }

    / * Necessary, because we need allow all this time to initialize before you start trying to create certain things or parts of some components addressing.
    * Called from: this. Creation_Complete event that is raised after this component is all assembled. */
    private void init(event:Event):void
    {
    this.removeEventListener (FlexEvent.CREATION_COMPLETE, init);
    videoPlayer.visible = true;
    videoPlayer.source = "";
    videoPlayer.videoObject.attachNetStream (netStream);
    }

    / * Global variables * /.
    Define our constants.

    Time to buffer, in seconds. Subsequently assigned to the netstream object
    protected const BUFFER_TIME:Number = 8;

    Public variables.

    We must be able to define a source for our video player.
    public var source: String = "";
    Maintains the boot volume when the player starts, defined in terms of percentage of the total volume of the system.
    public var defaultVolume:Number =. 60;
    Because when we turn it off to save the previous volume. This wil enable us to check with our drop-down list component or other components to make sure that
    We have the right to 'lastVolume '.
    public var lastVolume:Number = defaultVolume;
    When we turn off our video, we know that she is mute. Checking to see if the volume 0 is accurate, not enough, so we have a variable for it. In addition,
    the s:VideoDisplay uses a variable 'muted', if we want to keep the same looking for outside like this component.
    public var muted: Boolean = false;
    When we want the video loop, you have to know that, so here is our Boolean loop. In fact, when we reached the end of playback, either deliver us
    a "complete" event, or we start playing again from the beginning. This value determines what.
    public var loop: Boolean = false;
    We need to know if we can soften the video or not (to improve the quality of reading).
    public var smoothing: Boolean = true;

    Private and protected variables.

    We need a video object to attach the netStream to. So, here it is.
    protected var videoPlayer:VideoDisplay;
    We must be able to access netConnection and NetStream objects from outside this component (to set the source and check on things), so here is our
    objects.
    protected var netConnection:NetConnection;
    protected var netStream:NetStream;
    We need to know if the stream is loaded or not before we can read.
    protected var loaded: Boolean = false;
    We need store metadata for the video that load us up, so here's our storage object metadata.
    protected var vidInfo:Object;

    / * Meathods of this component (aka public functions), visible to the whole program. */
    public void play (): void
    {
    Words of the var: String = «»
    If (!) Loaded)
    {
    netStream.play (source);
    load = true;
    } else {}
    netStream.resume ();
    }
    }

    public void pause (): void
    {
    netStream.pause ();
    }

    public void stop (): void
    {
    netStream.pause ();
    netStream.seek (0);
    }

    public void seek(timeToSeekTo:Number):void
    {

    }

    public void setVolume(volumeToSet:Number):void
    {
    var soundTransform:SoundTransform = new SoundTransform (volumeToSet);
    netStream.soundTransform = soundTransform;
    }

    public function mute (): void
    {
    if(!muted)
    {
    lastVolume = videoPlayer.volume;
    setVolume (0);
    Mute = true;
    } else {}
    setVolume (lastVolume);
    Mute = false;
    }
    }

    / * We store the metadata collected by the NetStream object, information so that we can him later in this program. This isn't really a meathod, but it
    * should be made public so that the NetStream could find it.
    * Called from: NetStream object, as soon as he gets the metadata and information loaded file. */
    public void onMetaData(info:Object):void
    {
    vidInfo = info;
    }

    / * Functions private and protected this component, closed to the rest of the program. */
    protected function netStatusHandler(event:NetStatusEvent):void
    {
    Switch (event.info.code)
    {
    case "NetStream.Play.StreamNotFound":
    trace ("Error. Stream not found: "+ source);
    break;
    case "NetStream.Play.Stop":
    Stop();
    break;
    }
    }

    < code >

    Any help?

    Here is the code for the component. I hope there is nothing odd about that. I have included my contact information at the top. Please send me an email me or Adobe PM if you have questions or comments about this code. Hope this helps someone. It took me a good while to tinker until I found this.

    You can also find this useful if you do not need to completely rebuild the component. http://bryanheisey.com/blog/?p=21

    [CODE]

    /* Contact info: Jordan: [email protected] between 2010 and 2015. */
    
    /* The built-in video display object would not work for our purposes, because it would leak enormous amounts of memory (in the order of 200-300MB) every time a new
     * video was loaded in and played. It was almost as though it retained all previous videos played in memory, rather than replacing the video it had loaded.
     * After farther investigation, I believe it had to do with the fact that s:VideoDisplay discards the source and videoGateway, and creates a new one, meaning that
     * garbage collection has to get in there and fix it. However it doesn't unless RAM is also being lost in enough little chunks, so...it never cleaned up.
     * This is the first attempt to fix that, by directly manipulating the netStream, and streaming the video, rather than loading it in as was happening in s:VideoDisplay.
     * I have, however, followed the structure that was presented in s:VideoDisplay provided by Adobe in the Flex 4.0.1 framework as far as where events and public functions
     * and so forth are declared. This video player uses a lot of code and ideas from s:VideoDisplay and the player described at
     * http://www.flashwebdesigns.com.au/index.php/2010/07/custom-flex-4-spark-videodisplay. More details of what this actually is found right above the constructor. */
    
    /* TODO: Looping pauses for a moment before restarting.
              */
    package customComponents
    {
         /* Imports:
          * NetStatusEvent is used to react to specific events in the video stream. For example, when it starts to play, when it stops, and so forth.
          * SoundTransform is a class used to control the volume in the NetStream, and so when the volume is changed, we need to use this to create a new sound handler for the
               stream.
          * Video is used as the gateway through which the NetStream is visible. That is actually it's only purpose, because we wind up directly manipulating the NetStream when
               we need to do anything with the video.
          * NetConnection is used to initiate our NetStream. NetConnection is looking for a server connection. When we pass through null as the server, it knows we're after
               local content.
          * NetStream is what actually plays the videos off the computer. This is the central piece of this component. Using this class as our primary piece of this component
               is what allows us to circumvent memory leaks and other issues.
          * UIComponent is what this component extends, so it's needed for the basis of our component.
          * FlexEvent is required to allow us to listen for creation complete, allowing us to call an init() function here like we do with almost every other component we have.
          * TimeEvent was the original type of event used in s:VideoDisplay, so working on changing as little as possible, we kept that as our event types, and by the time we
               finished, there was no point to changing it. */
    
         import flash.events.Event;
         import flash.events.NetStatusEvent;
         import flash.media.SoundTransform;
         import flash.media.Video;
         import flash.net.NetConnection;
         import flash.net.NetStream;
    
         import mx.core.UIComponent;
         import mx.events.FlexEvent;
    
         import org.osmf.events.TimeEvent;
    
         /* Events */
    
         /* complete is dispatched when the playhead reaches the duration for playable media.
          * original eventType: org.osmf.events.TimeEvent.COMPLETE */
         [Event(name="complete", type="org.osmf.events.TimeEvent")]
         /* durationChange is dispatched when the duration property of the media has changed.
          * This event may not be dispatched when the source is set to null or a playback error occurs.
          * original eventType: org.osmf.events.TimeEvent.DURATION_CHANGE */
         [Event(name="durationChange", type="org.osmf.events.TimeEvent")]
         /* needToSeek is dispatched whenever play() is called. play() loads in the new video. If the video is the same one that was already playing, therefore not changing the
          * duration, we need to catch that, and the easiest way to do that is just to dispatch an event commanding that we seek. */
         [Event(name="needToSeek", type="flash.events.Event")]
    
         /* Explanation of component: VideoDislplayCustom is a replacement for s:VideoDisplay, since our method of loading in videos caused memory leaks in the order of hundreds
          * of megabytes each time a new video was loaded in. This one provides a simple video playing object that attaches to a netStream, which we use
          * to stream the video files off the hard driver rather than loading them into the player. By disallowing caching of any kind, we overcome memory leaks of
          * that magnitute, and provide a tool that can last all day switching between videos often. */
    
         public class VideoDisplayCustom extends UIComponent
         {
              /* Constructor */
              public function VideoDisplayCustom()
              {
                   super();
                   // We want to have an init() function, so we listen for it's dispatch.
                   this.addEventListener(FlexEvent.CREATION_COMPLETE, init);
                   // We build the actual stuff that plays our videos.
                   createUnderlyingVideoPlayer();
                   // The next three lines ensures that code farther down will work. We compare durations in vidInfo, which is just an array, so we first need to give it a duration
                   // value to compare (it's bad if we compare null to a number)
                   var tempArray:Array = new Array();
                   tempArray["duration"] = 0;
                   vidInfo = tempArray;
              }
    
              /* We need to allow everything time to initialize before we start trying create some things or addressing parts of some components. Looking towards expandability,
               * also, this only makes sense to have.
               * Called from: this.Creation_Complete, which event is fired after this component is all put together. */
              private function init(event:FlexEvent):void
              {
                   // since we added the event listener, we need to pull it off.
                   this.removeEventListener(FlexEvent.CREATION_COMPLETE, init);
                   videoPlayer.visible = true;
              }
    
              /* Global variables */
    
              // Define our constants \\
    
              // Time to buffer, in seconds, before it begins playback. Later assigned to the NetStream object. Since all our files loaded are on the local host, we
              // don't need to set this very high. And if we use a black screen, we can specify a minimum buffer size.
              protected const BUFFER_TIME:Number = 8;
    
              // Public variables \\
    
              // Holds the start volume when the player starts, defined in terms of percentage of total system volume.
              public var defaultVolume:Number = .50;
              // For when we mute, we need to save the previous volume. This wil let us double-check with our dropDown component or other components to make sure that
              // we have the right "lastVolume".
              public var lastVolume:Number = defaultVolume;
              // When we mute our video, we need to know it's muted. Checking to see if it the volume is 0 is not accurate enough, so we have a variable for it. Also,
              // the s:VideoDisplay uses a "muted" variable, and since we want to keep it looking the same from the outside as this component, we keep that variable.
              public var muted:Boolean = false;
              // When we want to loop the video, we need to know that, so here's our loop boolean. Basically, when we hit the end of the video playing, either we issue
              // a "complete" event, or we start playing it again from the beginning. This boolean determines which.
              public var loop:Boolean = false;
              // We need to know if we can smooth the video or not (to improve playback quality). Also something from s:VideoDisplay
              public var smoothing:Boolean = true;
              // We needed a way to carry through the height and width, and for some reason, this.width and this.height were both cleared and reset to 0 before the component is
              // created, or sometime during creation, so we needed to create these variables instead to carry it through. Breaks our "looking the same from outside" attempt.
              public var playerWidth:Number = 1024;
              public var playerHeight:Number = 768;
    
              // Private and protected variables \\
    
              // We need to be able to define a source for our video player. This would be a public variable, but that wasn't allowing for both playing the first video and the
              // subsiquant subclips, so we had to write getter and setter functions for the source, so we can maintain the previous source to know how to act. Thus, we have
              // our newSource and our oldSource.
              protected var newSource:String = "";
              // We also need to know if we have a new source loaded in, so this variable holds the old source.
              protected var oldSource:String = "";
              // We need a video object to attach the NetStream to. So, here that is.
              protected var videoPlayer:Video;
              // We need to have a NetStream to be able to use it, and to create one, we need to have a NetConnection. So, here they are.
              protected var netConnection:NetConnection;
              protected var netStream:NetStream;
              // We need to store the metadata for the video that we load up, so here's our metadata storing object.
              protected var vidInfo:Object;
    
              /* Meathods of this component (aka public functions), visible to the whole program. */
    
              /* This function checks our sources, and if they haven't actually changed, we don't want to reload the stream, so we just tell the hosing component (which for
               * us is the VideoScreenCustom component) that we need to seek. If we load in the new video (netStream.play(newSource), then we can't seek until the video is
               * actually loaded, and we can't always seek from the onMetaData functions below, so this seemed the best way to do it.
               * Called from: play() and playScreenSaver() in VideoScreenCustom.mxml. */
              public function play():void
              {
                   if(newSource == oldSource)
                   {
                        dispatchNeedToSeek();
                   } else {
                        netStream.play(newSource);
                   }
              }
    
              /* Pretty straightforward--we pause the video by pausing the netStream.
               * Called from: pause() in VideoScreenCustom.mxml. */
              public function pause():void
              {
                   netStream.pause();
              }
    
              /* Pretty straightforward--we need to unpause the video where we left off, so we call resume() on the netStream to unpause.
               * Called from: resume() in VideoScreenCustom.mxml. */
              public function resume():void
              {
                   netStream.resume();
              }
    
              /* We don't currently use this, because closing the netStream makes it hard to restart videos and seek, since it's still opening the stream when the seek command
               * is sent, and it stops the screen saver from working properly. It's just best to avoid closing our stream unless we are unloading it or something.
               * Called from: nowhere. This is a place holder / view into other uses. */
              public function stop():void
              {
                   netStream.pause();
                   netStream.close();
              }
    
              /* We need to be able to move around a video and to enter at different entryPoints, so seeking is vital. Here, we make it accessable from outside this component.
               * Called from: loopVideo() in this component, play(), rewindVideo() and fastForwardVideo(), and seekToPoint() from VideoScreenCustom.mxml */
              public function seek(timeToSeekTo:Number):void
              {
                   netStream.seek(timeToSeekTo);
              }
    
              /* Function that mutes the video. When it is called again, it restores the previous volume.
               * Called from: set volume() below, and currently nowhere else. This is a place holder until that feature is requested. */
              public function mute():void
              {
                   if(!muted)
                   {
                        lastVolume = netStream.soundTransform.volume;
                        setVolume(0);
                        muted = true;
                   } else {
                        setVolume(lastVolume);
                        muted = false;
                   }
              }
    
              /* Getter and setter functions */
    
              /* Used by VideoScreenCustom to know what the current time in the video is so that it can rewind, fastforward (by passing through a new time to seek to), and so
               * we can watch for stop points in the video clips. */
              public function get currentTime():Number
              {
                   return netStream.time;
              }
    
              /* Used by the videoScreenCustom to know if it is even possible to fast forward any (if within the skip interval from the end, then FFing is not possible). Also
               * here if ever needed for any other reason. */
              public function get duration():Number
              {
                   return vidInfo.duration;
              }
    
              /* Since we're remembering both the previous and the current source, we need to specify that we are returning the newSource through this getter function.
               * Externally, this looks just like a public variable. */
              public function get source():String
              {
                   return newSource;
              }
    
              /* Since we remember both the old and the current source, when the source is changed (.source = "somePath"), we need to copy the current source, then set the new
               * one so that we can use it in this to know whether to load the video or not (we don't want to load it if it is already loaded in and playing). Externally, this
               * looks just like a public variable.*/
              public function set source(sourceToSet:String):void
              {
                   oldSource = newSource;
                   newSource = sourceToSet;
              }
    
              /* From videoScreenCustom, we set the volume only through videoDisplay.volume=NUM. So, we handle all volume stuff here. It is possible to have the videoScreen
               * call mute() seperately in the future, so we add a little logic here to unmute if muted. Otherwise, we se the volume. */
              public function set volume(volumeToSet:Number):void
              {
                   if(muted)
                   {
                        mute();
                   } else {
                        setVolume(volumeToSet);
                   }
              }
    
              /* We store the metadata information gathered by the NetStream object, so that we can get to it later in this program. This isn't truly a meathod (meaning available
               * to the component hosting this one), but it had to be made public so that the NetStream object could find it. You'll note that we have too onSomeDate() functions.
               * The reason for that is that some video conatiners return one type of data (MetaData), and another returns a different set of metadata (XMPData).
               * Called from: NetStream object, as soon as it gets the metadata and information from the loaded file. */
              public function onMetaData(info:Object):void
              {
                   var oldVidInfo:Number = vidInfo.duration;
                   vidInfo = info;
                   if(oldVidInfo != vidInfo.duration)
                   {
                        dispatchDurationChange();
                   }
                   resizeVideo();
              }
    
              /*See above on onMetaData() for info about this. It does the same thing, but for different file formats (mostly flash-based containers). */
              public function onXMPData(info:Object):void
              {
                   var oldVidInfo:Number = vidInfo.duration;
                   vidInfo = info;
                   if(oldVidInfo != vidInfo.duration)
                   {
                        dispatchDurationChange();
                   }
                   resizeVideo();
              }
    
              /* Private and protected functions of this component, closed off to the rest of the program. */
    
              /* We need to build the essential pieces of the player and leave them in all the time. The basic concept for this player is that we have a Video object to
               * serve as a gateway for the NetStream object, which is what actually connects to the video file and passes it through. The Video object is just the reciever--
               * that means that all calls and commands that we want to deliver to the playing video we instead direct towards to NetStream.
               * Called from: the constructor function. */
              protected function createUnderlyingVideoPlayer():void
              {
                   // create our Video object, attach it to the stage, and resize it (critical--since otherwise, both height and width would be 0).
                   videoPlayer = new Video();
                   addChild(videoPlayer);
                   videoPlayer.width = playerWidth;
                   videoPlayer.height = playerWidth;
    
                   // NetConnection is needed to open the NetStream. When anything changes in this stream, we can handle those changes in netStatusHandler(). When we connect and
                   // pass through null, it means that we have no server and the files will be hosted on the local box.
                   netConnection = new NetConnection();
                   netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                   netConnection.connect(null);
    
                   // The main piece. Through this netStream, we control video playback, volume, and so forth.
                   netStream = new NetStream(netConnection);
                   netStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                   // the client is who the NetStream turns to to find functions for it's events. There is one event that requires handling--the one that calls onMetaData
                   // (or MXPData). It finds those functions in the client object.
                   netStream.client = this;
                   // How long it will buffer before it starts to play the video. Since we're on the local box, our buffer can pretty much be as low as we want.
                   netStream.bufferTime = BUFFER_TIME;
    
                   setVolume(defaultVolume);
                   // Final step: attach the NetStream object to the Video so that the Video knows to pay attention and do something.
                   videoPlayer.attachNetStream(netStream);
              }
    
              /* We need to change the size of the video to fit on the screen. However, it must be noted that sometimes, if it must be stretched too far, then video quality
               * becomes horrible, and so far, no workaround has been discovered.
               * Called from: onMetaData (of all kinds, including XMP and other types of metadata), called whenever a new video is loaded in. */
              protected function resizeVideo():void
              {
                   videoPlayer.width = playerWidth;
                   videoPlayer.height = ((playerWidth * vidInfo.height) / vidInfo.width);
                   videoPlayer.x = 0;
                   videoPlayer.y = ((playerHeight - videoPlayer.height) / 2);
              }
    
              /* In order to change the volume, we have to apply a new soundTransform object. So, here we create it and do that.
               * Called from: mute(), createUnderlyingVideoPlayer(), and the setter function set volume(). */
              protected function setVolume(volumeToSet:Number):void
              {
                   var soundTransform:SoundTransform = new SoundTransform(volumeToSet);
                   netStream.soundTransform = soundTransform;
              }
    
              /* For our screensaver, we needed to allow the video to loop. This function will handle that. The only problem is, since we wait for it to .Stop (see Called from:),
               * there is a pause between the end of the video, and when it starts over.
               * Called from: netStatusHandler for NetStream.Play.Stop */
              protected function loopVideo():void
              {
                   netStream.seek(0);
              }
    
              /* We need to pay attention to what the NetStream is saying and react accordingly. Especially when the video ends. All NetStream andNetConnection events on
               * documentation at Adobe are listed as a comment at the end of the class (very end of this file).
               * Called from: the NetStream and NetConnection event when they spit out an event. */
              protected function netStatusHandler(event:NetStatusEvent):void
              {
                   switch (event.info.code)
                   {
                        case "NetStream.Play.StreamNotFound":
                             trace("Error. Stream not found: " + source);
                             break;
                        case "NetStream.Play.Stop":
                             if(loop)
                             {
                                  loopVideo();
                             } else {
                                  var playedTime:Number = int(netStream.time);
                                  var totalTime:Number = int(vidInfo.duration);
                                  // if we're within 2 seconds of the end, assume we're at the end.
                                  if(Math.abs(totalTime - playedTime) <= 1)
                                  {
                                       dispatchComplete();
                                  }
                             }
                             break;
                   }
              }
    
              /* Event Dispatching Functions */
    
              /* Sent out to let the hosting component (VideoScreenCustom) know that the end of the video clip has been reached.
               * Called from: NetStream's NetStream.Play.Stop event code, sent out whenever the end of the video playing through the stream is reached. */
              protected function dispatchComplete():void
              {
                   var eventObj:TimeEvent = new TimeEvent("complete");
                   dispatchEvent(eventObj);
              }
    
              /* When the new and old sources have different durations (meaning a new video has been loaded), this is called to let the hosing component know we have a new vid.
               * Called from: onMetaData (onXMPData), which is called whenever a video is loaded. */
              protected function dispatchDurationChange():void
              {
                   var eventObj:TimeEvent = new TimeEvent("durationChange");
                   dispatchEvent(eventObj);
              }
    
              /* When we don't have a new video, we still need to call seek() after the NetStream is aware that the video is the same. Or something. I'm not sure why, but we need
               * to seek after things have been set and run for a few microseconds. This is used for FFing, RRing, but mostly for seeking to a new "chapter" in a continuous
               * video during playback.
               * Called from: play() above. */
              protected function dispatchNeedToSeek():void
              {
                   var eventObj:Event = new Event("needToSeek");
                   dispatchEvent(eventObj);
              }
    
         }
    }
    
    /*
    The following table describes the possible string values of the code and level properties.
    Code property Level property Meaning
    "NetStream.Play.Start" "status" Playback has started.
    "NetStream.Play.Stop" "status" Playback has stopped.
    "NetStream.Play.Failed" "error" An error has occurred in playback for a reason other than those listed elsewhere in this table, such as the subscriber not having read access.
    "NetStream.Play.StreamNotFound" "error" The FLV passed to the play() method can't be found.
    "NetStream.Play.Reset" "status" Caused by a play list reset.
    "NetStream.Play.PublishNotify" "status" The initial publish to a stream is sent to all subscribers.
    "NetStream.Play.UnpublishNotify" "status" An unpublish from a stream is sent to all subscribers.
    "NetStream.Play.InsufficientBW"  "warning" Flash Media Server only. The client does not have sufficient bandwidth to play the data at normal speed.
    "NetStream.Play.FileStructureInvalid" "error" The application detects an invalid file structure and will not try to play this type of file. For AIR and for Flash Player 9.0.115.0 and later.
    "NetStream.Play.NoSupportedTrackFound" "error" The application does not detect any supported tracks (video, audio or data) and will not try to play the file. For AIR and for Flash Player 9.0.115.0 and later.
    "NetStream.Play.Transition" "status" Flash Media Server only. The stream transitions to another as a result of bitrate stream switching. This code indicates a success status event for the NetStream.play2() call to initiate a stream switch. If the switch does not succeed, the server sends a NetStream.Play.Failed event instead. For Flash Player 10 and later.
    "NetStream.Play.Transition" "status" Flash Media Server 3.5 and later only. The server received the command to transition to another stream as a result of bitrate stream switching. This code indicates a success status event for the NetStream.play2() call to initiate a stream switch. If the switch does not succeed, the server sends a NetStream.Play.Failed event instead. When the stream switch occurs, an onPlayStatus event with a code of "NetStream.Play.TransitionComplete" is dispatched. For Flash Player 10 and later.
    "NetStream.Pause.Notify" "status" The stream is paused.
    "NetStream.Unpause.Notify" "status" The stream is resumed.
    "NetStream.Record.Start" "status" Recording has started.
    "NetStream.Record.NoAccess" "error" Attempt to record a stream that is still playing or the client has no access right.
    "NetStream.Record.Stop" "status" Recording stopped.
    "NetStream.Record.Failed" "error" An attempt to record a stream failed.
    "NetStream.Seek.Failed" "error" The seek fails, which happens if the stream is not seekable.
    "NetStream.Seek.InvalidTime" "error" For video downloaded with progressive download, the user has tried to seek or play past the end of the video data that has downloaded thus far, or past the end of the video once the entire file has downloaded. The message.details property contains a time code that indicates the last valid position to which the user can seek.
    "NetStream.Seek.Notify" "status" The seek operation is complete.
    "NetConnection.Call.BadVersion" "error" Packet encoded in an unidentified format.
    "NetConnection.Call.Failed" "error" The NetConnection.call method was not able to invoke the server-side method or command.
    "NetConnection.Call.Prohibited" "error" An Action Message Format (AMF) operation is prevented for security reasons. Either the AMF URL is not in the same domain as the file containing the code calling the NetConnection.call() method, or the AMF server does not have a policy file that trusts the domain of the the file containing the code calling the NetConnection.call() method.
    "NetConnection.Connect.Closed" "status" The connection was closed successfully.
    "NetConnection.Connect.Failed" "error" The connection attempt failed.
    "NetConnection.Connect.Success" "status" The connection attempt succeeded.
    "NetConnection.Connect.Rejected" "error" The connection attempt did not have permission to access the application.
    "NetStream.Connect.Closed" "status" The P2P connection was closed successfully. The info.stream property indicates which stream has closed.
    "NetStream.Connect.Failed" "error" The P2P connection attempt failed. The info.stream property indicates which stream has failed.
    "NetStream.Connect.Success" "status" The P2P connection attempt succeeded. The info.stream property indicates which stream has succeeded.
    "NetStream.Connect.Rejected" "error" The P2P connection attempt did not have permission to access the other peer. The info.stream property indicates which stream was rejected.
    "NetConnection.Connect.AppShutdown" "error" The specified application is shutting down.
    "NetConnection.Connect.InvalidApp" "error" The application name specified during connect is invalid.
    "SharedObject.Flush.Success" "status" The "pending" status is resolved and the SharedObject.flush() call succeeded.
    "SharedObject.Flush.Failed" "error" The "pending" status is resolved, but the SharedObject.flush() failed.
    "SharedObject.BadPersistence" "error" A request was made for a shared object with persistence flags, but the request cannot be granted because the object has already been created with different flags.
    "SharedObject.UriMismatch" "error" An attempt was made to connect to a NetConnection object that has a different URI (URL) than the shared object. 
    
    If you consistently see errors regarding the buffer, try changing the buffer using the NetStream.bufferTime property.
    
    */
    

    [/ CODE]

Maybe you are looking for