OpenScript / functional HTTP / what is the index?

Hello

I'm designing functional tests of http and I found that the read failed because the index number has changed (I think)


Action, click:

I used (button properties)


[/ web:window[@index='1' or @title = "Export']/web:document[@index='0 information" or @name = "avye2ck58_16"] / web: a [@href ='{{db.] URL. URL}} / Mednext/faces/ADF. Task-Flow? [ADF.tfDoc=%2Fpages%2Fclmres%2Ftask-flows%2FCLMClaimInfoReportTaskFlow.xml & adf.tfId = CLMClaimInfoReportTaskFlow & inIsFromMain = true #' or @index = "6"]



now, I have:

[/ web:window[@index='1' or @title = "Export']/web:document[@index='0 information" or @name = "109lhcxnuz_11"] / web: a [@href ='{{db.] URL. URL}} / Mednext/faces/ADF. Task-Flow? [ADF.tfDoc=%2Fpages%2Fclmres%2Ftask-flows%2FCLMClaimInfoReportTaskFlow.xml & adf.tfId = CLMClaimInfoReportTaskFlow & inIsFromMain = true & _afrLoop = 947316640529847 & _afrWindowMode = 0 & _afrWindowId = null #' or @index = "7"]


Please what is this index = "7"? because even looking in the html code, I can't find such index.

Why is he changing of 6 to 7?


Thank you.


Michael.

Michael

The index is just a number to find an object with, so if you are looking for a link with index 3, which would be the third link on the page, note that we use a statement or when looking for attributes, so it will search for a NAME or ID or the HREF attribute and if she is not one of them, it will search the index.

Usually, I tend to recommend people to remove the index of the path that the pages are today very dynamic and that can cause all sorts of unpredictable behavior, if we cannot find an object using its HTML attributes chances are that's not there, if its there attributes are dynamic you can use wildcards or regular expressions to generate a string of research better.

Concerning

Alex

Tags: Oracle Development

Similar Questions

  • What is the index that is created automatically on the partitioning key?

    What is the index that is created automatically on the partitioning key?
    CREATE TABLE sales
    ( prod_id NUMBER(6)
    , cust_id NUMBER
    , time_id DATE
    , channel_id CHAR(1)
    , promo_id NUMBER(6)
    , quantity_sold NUMBER(3)
    , amount_sold NUMBER(10,2)
    )
    STORAGE (INITIAL 100K NEXT 50K) LOGGING
    PARTITION BY RANGE (time_id)
    ( PARTITION sales_q1_2006 VALUES LESS THAN (TO_DATE('01-APR-2006','dd-MON-yyyy'))
    TABLESPACE tsa STORAGE (INITIAL 20K NEXT 10K)
    , PARTITION sales_q2_2006 VALUES LESS THAN (TO_DATE('01-JUL-2006','dd-MON-yyyy'))
    TABLESPACE tsb
    , PARTITION sales_q3_2006 VALUES LESS THAN (TO_DATE('01-OCT-2006','dd-MON-yyyy'))
    TABLESPACE tsc
    , PARTITION sales_q4_2006 VALUES LESS THAN (TO_DATE('01-JAN-2007','dd-MON-yyyy'))
    TABLESPACE tsd
    )
    ENABLE ROW MOVEMENT;

    N ° you must create indexes for yourself.

  • I constantly get this pop-up, ' Exc in ev handl: TypeError: oSAPlg.oRoot.log is not a function. " What is the problem and how can I solve this problem?

    I received a lot of emails from trash and other deleted all my cookies and history. Now, I'm getting this pop-up and it is interfering with my use of the internet, ' Exc in ev handl: TypeError: oSAPlg.oRoot.log is not a function. " What is it and how can it be fixed, removed, managed to get rid of, etc. Thank you

    I've been working on what's wrong. She can do with McAfee Siteadvisor. I disabled suitable siteadvisor who never stopped popping up messages.

  • 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

  • What is the index of modularity?

      Index of modularity In "The Labview Style Book", p 13.
     
         1.1 equation
    Modularity Index = (user # screw / total number of nodes) * 100

    Way?

    It is a measure that is the VI Analyzer.  Something to assess quantitatively so your VI is very modular or not.  It looks at the number of under VI used compared to the overall size of the program (including the total number of nodes).  If you use enough of the Subvi, this means that you probably code modular and will have a higher index.  If you put all your code in a large diagram and fail to use Subvi to break it down into smaller modules, then your index of modularity will be close to zero.

  • What is the use of the DUMP function

    Hi friends,

    What is the Dump function? What is the use of dump? where can I use dump?

    ex:

    Select (sysdate) dump of double;

    Please expline with good example,


    By,.
    Symph.

    Sometimes you can have data in your database that you expect to be returned or excluded by a query, but you do not know why it does not work as expected. With the help of DUMP, you can examine the contents of the byte-by-byte data to help identify issues...

    SQL> with t as (select '&data' as dta from dual)
      2  --
      3  -- end of test data
      4  --
      5  select dta, dump(dta), dump(dta,16) from t;
    Enter value for data: Fred Smith
    old   1: with t as (select '&data' as dta from dual)
    new   1: with t as (select 'Fred Smith' as dta from dual)
    
    DTA
    ----------
    DUMP(DTA)
    ---------------------------------------------------------
    DUMP(DTA,16)
    ---------------------------------------------------------
    Fred Smith
    Typ=96 Len=10: 70,114,101,100,255,83,109,105,116,104
    Typ=96 Len=10: 46,72,65,64,ff,53,6d,69,74,68
    

    So my entry of "Fred Smith" looks like it's just two names separated by a space, but in reality in this example, the 'space' is the character ascii 255 (FF hex). This can be seen in the DUMP information. If it's data to my database, I would now be able to determine why, for example, I wasn't getting it back in my query when you query for "Fred Smith" by using a space character.

    There are other options as well, for example, to examine the character set...

    SQL> select dump('Fred Smith',1017) from dual;
    
    DUMP('FREDSMITH',1017)
    ------------------------------------------------------------
    Typ=96 Len=10 CharacterSet=WE8MSWIN1252: F,r,e,d, ,S,m,i,t,h
    
    SQL> select dump('Fred Smith',1016) from dual;
    
    DUMP('FREDSMITH',1016)
    ----------------------------------------------------------------------
    Typ=96 Len=10 CharacterSet=WE8MSWIN1252: 46,72,65,64,20,53,6d,69,74,68
    

    Take the result of the DUMP function you can use for all sorts of things based on what your needs are... example...

    In binary or hex string conversion...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with x as (select 'Fred' as txt from dual)
      2  --
      3      ,t as (select txt, regexp_substr(dump(txt),'[0-9,]*$') as bytes from x)
      4      ,s as (select txt, rownum rn, to_number(regexp_substr(bytes,'[^,]+',1,rownum)) as byte
      5             from   t
      6             connect by rownum <= length(regexp_replace(bytes,'[^,]*'))+1
      7            )
      8      ,b as (select txt, rn, byte, to_char(byte, 'fm0x') as hx
      9                   ,bitand(byte,128)/128||
     10                    bitand(byte,64)/64||
     11                    bitand(byte,32)/32||
     12                    bitand(byte,16)/16||
     13                    bitand(byte,8)/8||
     14                    bitand(byte,4)/4||
     15                    bitand(byte,2)/2||
     16                    bitand(byte,1) as bin
     17             from s)
     18  --
     19  select txt
     20        ,ltrim(sys_connect_by_path(byte,','),',') as bytes
     21        ,replace(sys_connect_by_path(bin,','),',') as bin
     22        ,replace(sys_connect_by_path(hx,','),',') as hx
     23  from b
     24  where connect_by_isleaf = 1
     25  connect by rn = prior rn + 1
     26* start with rn = 1
    SQL> /
    
    TXT  BYTES                          BIN                                      HX
    ---- ------------------------------ ---------------------------------------- --------------------
    Fred 70,114,101,100                 01000110011100100110010101100100         46726564
    
    SQL>
    

    or the conversion from the internal representation of a date in binary.

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select sysdate as dt, regexp_substr(dump(sysdate),'[0-9,]*$') as bytes from dual)
      2      ,s as (select dt, rownum rn, to_number(regexp_substr(bytes,'[^,]+',1,rownum)) as byte
      3             from   t
      4             connect by rownum <= length(regexp_replace(bytes,'[^,]*'))+1
      5            )
      6      ,b as (select dt, rn, byte
      7                   ,bitand(byte,128)/128||
      8                    bitand(byte,64)/64||
      9                    bitand(byte,32)/32||
     10                    bitand(byte,16)/16||
     11                    bitand(byte,8)/8||
     12                    bitand(byte,4)/4||
     13                    bitand(byte,2)/2||
     14                    bitand(byte,1) as bin
     15             from s)
     16  --
     17  select dt
     18        ,ltrim(sys_connect_by_path(byte,','),',') as bytes
     19        ,replace(sys_connect_by_path(bin,','),',') as bin
     20  from b
     21  where connect_by_isleaf = 1
     22  connect by rn = prior rn + 1
     23* start with rn = 1
    SQL> / 
    
    DT                  BYTES                     BIN
    ------------------- ------------------------- ------------------------------------------------------------------
    06/01/2010 08:56:46 218,7,1,6,8,56,46,0       1101101000000111000000010000011000001000001110000010111000000000
    

    If you have a real need for it is another matter, but it is good to know that it is possible.

  • What is the equivalent of the Oracle of the FIRST of Microsoft Access function?

    Use: Oracle 10 g 2 RAC on SUSE Linux 9 (10.2.0.3)

    In the process of conversion of a Microsoft Access database to Oracle, an Access query uses the FIRST function.
    What is the equivalent of the Oracle of the FIRST of Microsoft Access function?

    In the conversion attempt, FIRST_VALUE Oracle has been used. However, the same results was not reached.
    Thank you
    (BLL)

    Query:
    H2. ACCESS:
    SELECT
    TRE. GCUSNO,
    UCASE ([DCUSNO]) AS DCUSNO_STD,
    * FIRST (UCASE ([DNAME])) AS DNAME_STD *.
    * FIRST (UCASE ([DADDR])) AS DADDR_STD *.
    * FIRST (UCASE ([DCITY])) AS DCITY_STD *.
    TRE. DSTATE,
    FIRST (TRE. DZIP) AS DZIP,.
    TRE. DREGN,
    TRE. DDIST,
    TRE. DSLSMN,
    TRE. DCHAIN,
    TRE. MARKET,
    TRE. MKTPGM,
    TRE. EUMKT
    Of
    TRE
    GROUP BY
    TRE. GCUSNO,
    UCASE ([DCUSNO]),
    TRE. DSTATE,
    TRE. DREGN,
    TRE. DDIST,
    TRE. DSLSMN,
    TRE. DCHAIN,
    TRE. MARKET,
    TRE. MKTPGM,
    TRE. EUMKT;



    H2. ORACLE:
    SELECT DISTINCT
    TRE. GCUSNO,
    SUPERIOR (TRIM (TRE. DCUSNO)) AS DCUSNO_STD,
    SUPERIOR (TRIM (TRE. DNAME)) AS DNAME_STD,
    SUPERIOR (TRIM (TRE. DADDR)) AS DADDR_STD,
    FIRST_VALUE (UPPER (TRIM (TRE. (DNAME)) IGNORE NULL VALUES) (TRE ORDER. GCUSNO) AS DNAME_STD,.
    FIRST_VALUE (UPPER (TRIM (TRE. (DADDR)) IGNORE NULL VALUES) (TRE ORDER. GCUSNO) AS DADDR_STD,.
    FIRST_VALUE (UPPER (TRIM (TRE. (DCITY)) IGNORE NULL VALUES) (TRE ORDER. GCUSNO) AS DCITY_STD,.
    TRE. DSTATE,
    TRE. DZIP,
    FIRST_VALUE (UPPER (TRIM (TRE. (DZIP)) IGNORE NULL VALUES) (TRE ORDER. DZIP ASC) AS DZIP,.
    TRE. DREGN,
    TRE. DDIST,
    TRE. DSLSMN,
    TRE. DCHAIN,
    TRE. MARKET,
    TRE. MKTPGM,
    TRE. EUMKT
    CRM. TREUP100R TRE
    GROUP BY
    TRE. GCUSNO,
    SUPERIOR (TRIM (TRE. DCUSNO)),
    TRE. DNAME,
    TRE. DADDR,
    TRE. DCITY,
    TRE. DSTATE,
    TRE. DZIP,
    TRE. DREGN,
    TRE. DDIST,
    TRE. DSLSMN,
    TRE. DCHAIN,
    TRE. MARKET,
    TRE. MKTPGM,
    TRE. EUMKT;

    A slight correction to the post of odie. I think you mean min max to replicate the primary function of access, but see below for sure. So:

    min(upper(trim(tre.dname))) keep (dense_rank first order by tre.gcusno) as dname_std
    

    user10860953 wrote: how it ignores null values?

    The min and max functions automatically ignores nulls, so if there is a null value in tre.dname, it will not be returned, unless all values are null. For example:

    SQL> WITH t AS (
      2     SELECT 65 id, 'ABCD' col FROM dual UNION ALL
      3     SELECT 37, 'DEFG' FROM dual UNION ALL
      4     SELECT 65, 'DEFG' FROM dual UNION ALL
      5     SELECT 65, null FROM dual UNION ALL
      6     SELECT 70, null FROM dual UNION ALL
      7     SELECT 70, null FROM dual UNION ALL
      8     SELECT 37, 'ABC' from dual)
      9  SELECT id,
     10         MIN(col) keep (DENSE_RANK FIRST ORDER BY id) min_dname_std,
     11         MAX(col) keep (DENSE_RANK FIRST ORDER BY id) max_dname_std
     12  FROM t
     13  GROUP BY id;
    
            ID MIN_ MAX_
    ---------- ---- ----
            37 ABC  DEFG
            65 ABCD DEFG
            70
    

    John

  • How can I delete the index.html file automatically added my domain homepage?

    I noticed recently that muse adds index.html to my homepage. I want to remove it and revert back to the way it was. This is the 2nd site with that I have this problem

    Hello

    I'm afraid, it's default system process and it is not possible to change the file name for the first page created in Adobe Muse of index.html at home or any other file name.

    You can also refer to some articles about why it is important to have the index.html page in your site: what is the index.HTML Page - default Web Pages , the Homepage - Wikipedia, the free encyclopedia

  • dynamic SQL to drop the indexes on the table

    Hello world

    Please tell me how to remove the indexes on a table by using a dynamic sql code

    for example, I have a dummy table with two index idx1, idx2

    I need a procedure or a function where I will be passing in the name of the table, the function/procedure should remove the indexes on the table

    Thank you

    Not tested:

    create or replace
    procedure drop_indexes_of_table(p_table_owner varchar2,
                                    p_table_name varchar2)
    as                              
    
    cursor c_drop_statements is
    select 'drop index '||owner||'.'||index_name stmt
    from all_indexes
    where table_owner=p_table_owner
    and table_name=p_table_name;
    
    begin
      for r in c_drop_statements loop
        execute immediate r.stmt;
      end loop;
    end;
    
  • What is the purpose of the function Array Index in the example attached?

    Hello

    I'm fighting with the Array Index function. I found the attached VI on the OR site which was exactly what I wanted to do, but rather than simply accept that it works and use it, I wanted to understand.

    What is the purpose of the function Index of table inside the while loop? If I put a probe on part and on the other, the values are the same, but if I remove the service and connect directly to the > function, I get an error.

    I do not understand the tables but I don't understand what is happening here. Any help would be appreciated gratefully.

    Thanks in advance.

    It is just picking the first reading of the table in the waveform.  If it's good enough (I'd take at least the average of N samples), why not cela?

  • CVI 2013 SP1 - function calls repeated with pointer on a variable array parameter causes a shift of the index

    I have some functions will be pointers as parameter and CVI 2012 SP1, they work as before without problems but with CVI 2013 SP1 they are now incorrect.

    Here the description of what is happening - I found a cure, but a duty adopt the old code and I think it's clear that nobody don't "captures" all lines in a 'big old code' which are affected (maybe):

    I have functions

    'function_XYZ(int *p_paraArr) '.

    with 'p_paraArr' as pointers on a table (int).

    Suppose I have another function

    "fct_TOP (void)".

    where is a local array variable which is inizialized by

    "int TheArray [25] = {0};

    and inside of this "TOP"-function-body I call a function ".

    "function_XYZ (TheArray).

    There are no complains of the compiler (CVI 2012 or 2013) and the code works (but the CVI 2013 only once!).

    But if I put 'fct_TOP' loop I have a lag in the "TheArray' -memory.  (The loop surrounds the function "TOP"! "")

    This means that the result "TheArray" obtained from "function_XYZ (TheArray)" starts at index '1' not on the index '0' - as the first time that the function "function_XYZ (TheArray)" was performed. ".

    The solution is:

    I only replaced

    "function_XYZ (TheArray)" (<1>)

    by

    "function_XYZ (&(TheArray[0]))" (<2>)

    overall the program now works every time (in the whole loop)-the first time (in the loop).

    In the second version (<2>) everything is necessary to "work well":

    The '&' and parentheses "(...)", which contains the element that may be designated by the '& '.

    And I hope that you believe me: I've tested several times, it was only "little" change that solved the problem.

    So it seems that the ICB 2013 (SP1) is a kind of internal offset index by a repeated execution of the

    "function_XYZ (TheArray).

    but I don't know how or why but I see in debug mode by observing the expected against the values in the table received!

    At the first time the (implicit) internal index of 'TheArray' is '0', but the following times (during the execution of the loop) the internal index passes to '1' (seen in the debugger because that all the expected values were shiftet like that!).

    So there's an explicit index in the table ("function_XYZ (&(TheArray[0]))") necessary to make the first time of this clear code execution.

    There are some good improvements in 2013 CVI (SP1) and I like this environment more than the 2012 version - but:

    There are other "changes" also, in the compiler (or linker...?) that are more rigid than "in ancient times.

    The problem of this kind of error is always the 'old code '!

    It is expected of such behavior.

    The compiler/linker do not complain (a complaint would be good!) writing but he made this mistake (in a loop).

    By the way: my 'compilation Options' are set to 'Extended' (without change in the "..." ("- button - Options) and that all of the boxes, except the" OpenMP_support "-box are checked!"» So I think that I put the very rigid compiler - maybe there are some «...» ' - button - settings to get rid of this problem, but I have not found them/it.

    My request:

    -Check the stiffer compiler by the need of an explicit index

    - or switch to the 'old' behavior with "function_XYZ (TheArray)" always refers to implicit index '0' of the element "TheArray". "."

    Thank you for your messages, comments and suggestions.

    -As I wrote before - maybe it's the style of programming or error"self made"... maybe...
    .. But if I replace 'function_XYZ (TheArray)' by "function_XYZ (&(TheArray[0]))" and
    then it works... Why so and not, if bothe the same? ...

    But as long as I do not post sample code, nobody is going to accept - I accept it. So consider this post more as an allusion to the fact that of the LW/CVI 2012-2013 LW/CVI more changed than just the LW - GUI or certain features: the compiler changed its 'way to'... or almost.

    For this problem, I think that I will use the solution 'use no implicit and explicit pointers'.
    Who should be a good idea taking into account
        http://forums.NI.com/T5/LabWindows-CVI/fatal-run-time-error-dereference-of-out-of-bounds-pointer/TD-...

    mybe also only caused by wrong code... who knows... but for me it is a sufficient reason to act as I suggest above.

    Best regards,
    F.

  • What are the functional differences between 'Microsoft Research détours' and the alternative open-source 'EasyHook?

    What are the functional differences, if any, between MS detours and the alternative open source EasyHook?

    http://www.microsoftstore.com/store/msusa/en_US/PDP/Microsoft-Research-detours-v3-professional/ProductID.253663300

    https://easyhook.github.IO/index.html

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • What is the function of PTC?

    Dear friends,

    What is the part of the PTC function in the management of the computer...?

    Can someone explain in details...?

    Help, please...

    Thanks in advance

    Hi Han_BFY,

    IPC is the abbreviation of 'Inter - Process Communication'

    It is used to start a logon session, password/user
    data before you connect to a share (file/print etc.)

    "A capability supported by some operating systems that allows a process to communicate with another process. The process can run on the same computer or on different computers connected via a network.
    IPC allows an application to control another application and for multiple applications to share the same data without interfering with each other. »
    http://www.webopedia.com/index.php/term/I/interprocess_communication_IPC.html

  • Invalidation of the index based on a function because the recompilation

    Hello

    one of our customers has two indices according to the functions that fall under the State "off" in some situations. After looking more closely at the situation, there are some things that my opinion are different from what I expected of a function-based index. Because I am unable to find anything about either on metalink (or I'm not asking the right question) I would appreciate a second opinion of you.

    To keep things simple, I gave an example to illustrate the behavior. I use Oracle 12.1.0.2, although it can also be reproduced on versions 10.2 and 11.2.

    It's my environment and three parameters that I find relevant to the discussion:

    SQL> select banner from v$version;
    
    BANNER
    ----------------------------------------------------------------------------
    
    Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
    PL/SQL Release 12.1.0.2.0 - Production
    CORE    12.1.0.2.0      Production
    TNS for Linux: Version 12.1.0.2.0 - Production
    NLSRTL Version 12.1.0.2.0 - Production
    
    SQL> show parameter remote_dependencies
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ----------
    remote_dependencies_mode             string      TIMESTAMP
    
    SQL> show parameter query_rewrite
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- -------------
    query_rewrite_enabled                string      TRUE
    query_rewrite_integrity              string      enforced
    

    Test case:

    SQL> CREATE OR REPLACE FUNCTION f1 (p_string IN VARCHAR2)
      2  RETURN VARCHAR2
      3  DETERMINISTIC
      4  IS
      5  BEGIN
      6    RETURN lower(p_string);
      7  END f1;
      8  /
    
    Function created.
    
    SQL> CREATE TABLE tmp_t1 (a_string VARCHAR2(10));
    
    Table created.
    
    SQL> INSERT INTO tmp_t1 VALUES ('a');
    
    1 row created.
    
    SQL> COMMIT;
    
    Commit complete.
    
    SQL> CREATE INDEX x1_tmp_t1 ON tmp_t1(f1(a_string));
    
    Index created.
    
    SQL> set linesize 80;
    SQL> column index_name format a10;
    SQL> SELECT index_name, index_type, status, funcidx_status
      2    FROM user_indexes;
    
    INDEX_NAME INDEX_TYPE                  STATUS   FUNCIDX_
    ---------- --------------------------- -------- --------
    X1_TMP_T1  FUNCTION-BASED NORMAL       VALID    ENABLED
    

    We have our table and our based on an index function which basically converts the values to lowercase. From here on things, download a little weird. What happens with the index based on a function if the underlying function is recompiled? I always thought (and which is also stated in the Concepts and the use of function index (Doc ID 66277.1)) that the index would change its status to "disabled". Here is an excerpt of the said Doc ID:

    The index depends on the State of the PL/SQL function. The index can be

    struck down or rendered useless by changes to the function. The index is marked

    People with DISABILITIES, if he is brought to the function or function is re-created.

    The timestamp of the function is used to validate the index.

    To allow the index after it is created, the function if the signature of the

    the function is identical to the front:

    ALTER INDEX ENABLE;

    If the signature of functions is changed, to make the changes effective

    in the index, the index must be renewed to make it valid.

    ALTER INDEX REBUILD.

    It seems that this is not the case, as the index remains valid and activate.

    SQL> alter function f1 compile;
    
    Function altered.
    
    SQL> SELECT index_name, index_type, status, funcidx_status
      2    FROM user_indexes;
    
    INDEX_NAME INDEX_TYPE                  STATUS   FUNCIDX_
    ---------- --------------------------- -------- --------
    X1_TMP_T1  FUNCTION-BASED NORMAL       VALID    ENABLED
    

    OK, explicitly recompiling function F1 single timestamp changed. What if we replace the function completely and we change the output of the function - for example we will switch from a LOWER function to SUPERIOR function in the body of the F1. Again, it is change that I thought would be not only to disable the index based on a function, but also force its reconstruction. At least that is my understanding of the explanation in Doc ID).

    SQL> CREATE OR REPLACE FUNCTION f1 (p_string IN VARCHAR2)
      2  RETURN VARCHAR2
      3  DETERMINISTIC
      4  IS
      5  BEGIN
      6    RETURN UPPER(p_string);
      7  END f1;
      8  /
    
    Function created.
    
    SQL> SELECT index_name, index_type, status, funcidx_status
      2    FROM user_indexes;
    
    INDEX_NAME INDEX_TYPE                  STATUS   FUNCIDX_
    ---------- --------------------------- -------- --------
    X1_TMP_T1  FUNCTION-BASED NORMAL       VALID    ENABLED
    
    

    Should not be. Because of the function "create or replace" F1 never go through a "invalid" phase which may be necessary for index becomes unusable? What about queries on the TMP_T1 table? Does optimizer always uses access index or not? What about the results?

    SQL> EXPLAIN PLAN SET statement_id='s1' FOR
      2  SELECT a_string, f1(a_string) as f1_a_string, f1('a') as f1_literal
      3    FROM tmp_t1
      4   WHERE f1(a_string) = 'a';
    
    Explained.
    
    SQL> SELECT * from table(dbms_xplan.display(statement_id=>'s1'));
    
    PLAN_TABLE_OUTPUT                                                                                                   
    ------------------------------------------------------------------------------------------------------------------------
    Plan hash value: 3133804460                                                                                         
                                                                                                                        
    -------------------------------------------------------------------------------------------------                   
    | Id  | Operation                           | Name      | Rows  | Bytes | Cost (%CPU)| Time     |                   
    -------------------------------------------------------------------------------------------------                   
    |   0 | SELECT STATEMENT                    |           |     1 |  2024 |     2   (0)| 00:00:01 |                   
    |   1 |  TABLE ACCESS BY INDEX ROWID BATCHED| TMP_T1    |     1 |  2024 |     2   (0)| 00:00:01 |                   
    |*  2 |   INDEX RANGE SCAN                  | X1_TMP_T1 |     1 |       |     1   (0)| 00:00:01 |                   
    -------------------------------------------------------------------------------------------------
    

    The index is used by the optimizer, see the results.

    SQL> column f1_a_string format a15;
    SQL> column f1_literal format a15;
    SQL> SELECT a_string, f1(a_string) as f1_a_string, f1('a') as f1_literal
      2    FROM tmp_t1
      3   WHERE f1(a_string) = 'a';
    
    A_STRING   F1_A_STRING     F1_LITERAL
    ---------- --------------- ---------------
    a          a               A
    

    A_STRING = value in the table

    F1_A_STRING = value of f1 (a_string) but the value is not evaluated because it comes from an index, so tiny value (remember, at the time index created the function returned small values)

    F1_LITERAL = value of the function f1 newly evaluated, using literal instead of the value in the table.

    Predicate f1 (a_string) = 'a' should return no rows because no character uppercase is equivalent to "a". Query with f1 (a_string) = 'A' should return a line, but it doesn't.

    SQL> SELECT a_string, f1(a_string) as f1_a_string, f1('a') as f1_literal
      2    FROM tmp_t1
      3   WHERE f1(a_string) = 'A';
    
    no rows selected
    

    Anyone know if this is an expected behavior? And, is it possible to disable the index based on a function whenever the underlying function signature is changed? The parameter query_rewrite_integrity = applied from

    DOC-ID 66277.1 does not seem to do the trick:

    (c) session variables

    ~~~~~~~~~~~~~~~~~~~~

    QUERY_REWRITE_ENABLED (true, false),

    QUERY_REWRITE_INTEGRITY (confidence, forced, stale_tolerated)

    determines the optimizer to use index based on a function with

    expressions using SQL, user defined functions functions.

    TRUST: Oracle allows rewrites using relationships that have

    was declared.

    APPLIED: Oracle ensures and guarantees consistency and integrity.

    STALE_TOLERATED: Oracle allows rewrites using vessels of the relationship not applied.

    Used in the case of materialized views.

    Set session variable cost function optimizer to choose the

    a function-based index

    Kind regards

    SAMO

    From the Manual 11.2 ( https://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_indexes.htm#ADFNS254 )

    "If you change the semantics of a DETERMINISTIC run and recompile, then you must manually rebuild all addicts depending on index and materialized views." Otherwise, they report results for the previous version of the function. »

    This note is not that I made my initial comment well - which was based on an incorrect memory the relationship between function-oriented and autonomous pl/sql functions, so I won't try to explain it. In fact, I went back to Oracle 8i practice to see if something had changed between yesterday and today and found that I had described exactly the behavior that the OP has been seeing. It's the way it is supposed to be.

    Concerning

    Jonathan Lewis

  • What is the function local folders are used in TB? When should I use/non use?

    What is the 'local folders' function does TB? How is it related to the 'archives '. 2015 archives disappear after 2015 or 2016 pop up? Why not just add subfolders Archives rather than 2015 Archives? Documentation on these topics?

    Archives and local folders are not related. You can create an Archive folder under "Local folders" account however.

    See http://kb.mozillazine.org/Local_Folders and https://support.mozilla.org/en-US/kb/archived-messages for more information.

Maybe you are looking for