APEX's use of indexes

Hi. We are considering a move to APEX, but I'm noticing that APEX will require underlying tables to have single column primary key values selected from a sequence. Many of our tables are setup with multiple column primary keys such as project_code and participant_id. We use this type of Primary Key in order to make sure there are no duplicate records on the table sharing the same project_code and participant_id.
A couple of questions. Any help answering one or more would be much appreciated...
1) What is the point of using a single column primary key value selected from a sequence?
2) And why does APEX only work with these types of primary keys and is it going to be a difficult transition for us the way we are setup now?
3) Is there a good doc to describe each type of Primary Key to help me understand them better?

Hi "sharpe",
I am saying that with Application Express 4.1 or later, you could have a 30-member composite primary key and it doesn't matter. It would not present a problem. You would simply choose to specify ROWID as the unique row identifier when building forms and tabular forms.
Joel

Similar Messages

  • APEX app using Oracle Text  to index pages that require authorzation

    Hi Gurus and APEX Dev team
    My team need to develop an APEX App that will index all our documents spread across various servers. Some of the documents require Single sign on access (e.g. KIX.oraclecorp.com) and some require other authorization methods (e.g. Metalink) . The Question is , Is it possible to index the pages that require authorization using Oracle text. If yes How? I have implemented the demo app which can index pages that do not require authorization.
    Thanks a million
    regards
    Bala

    Hello,
    Unless I misunderstand you, the fact that the pages require authentication doesn't really matter, it is the underlying data you want to index correct? If so then you would index them in exactly the same way that you would index any table data using Oracle Text/interMedia.
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Calling Apex Application using a php script

    Hi guys,how can i directly call my Apex Application using a php script.i have apex 2.1 intalled on my system.i created an application and i want my application users to connect directly to the applications login page.I mean somthing like this
    (http://127.0.0.1:8080/apex/f?p=103)
    and i want users to connect using somthing like this
    (http://my system/index.php) or localhost/index.php?
    i can run a script query and access my data stored on the database,but what i really want is to connect directly to the login page of my application,so that the staffs in HR can connect direstly to there HR application while those in Sales Will connect direcly to there applications page so it will look like this
    http://my system/hr.php
    http://mysystem/sales.php

    Originally, I had problems w/ the file being placed in
    C:/whatever.ext b/c I wasn't using relative paths.
    This is the code I use:
    $MAXIMUM_FILESIZE = 1024 * 1024 * 2; // 2MB
    $newFileLoc = "./wherever/file.jpg"
    if ($_FILES['Filedata']['size'] <= $MAXIMUM_FILESIZE) {
    move_uploaded_file($_FILES['Filedata']['tmp_name'],
    "./temporary/".$_FILES['Filedata']['name']);
    rename( "./temporary/".$_FILES['Filedata']['name'],
    $newFileLoc );
    chmod( $newFileLoc, 0777 );
    Modified from this article by Adobe:
    http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=17_Networking_and_communications_173_6.html

  • Can I refactor this query to use an index more efficiently?

    I have a members table with fields such as id, last name, first name, address, join date, etc.
    I have a unique index defined on (last_name, join_date, id).
    This query will use the index for a range scan, no sort required since the index will be in order for that range ('Smith'):
    SELECT members.*
            FROM members
            WHERE last_name = 'Smith'
            ORDER BY joindate, idIs there any way I can get something like the following to use the index (with no sort) as well:
    SELECT members.*
            FROM members
            WHERE last_name like 'S%'
            ORDER BY joindate, idI understand the difficulty is probably; even if it does a range scan on every last name 'S%' (assuming it can?), they're not necessarily in order. Case in point:
    Last_Name:  JoinDate:
    Smith          2/5/2010
    Smuckers     1/10/2010An index range scan of 'S%' would return them in the above order, which is not ordered by joindate.
    So is there any way I can refactor this (query or index) such that the index can be range scanned (using LIKE 'x%') and return rows in the correct order without performing a sort? Or is that simply not possible?

    xaeryan wrote:
    I have a members table with fields such as id, last name, first name, address, join date, etc.
    I have a unique index defined on (last_name, join_date, id).
    This query will use the index for a range scan, no sort required since the index will be in order for that range ('Smith'):
    SELECT members.*
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindate, idIs there any way I can get something like the following to use the index (with no sort) as well:
    SELECT members.*
    FROM members
    WHERE last_name like 'S%'
    ORDER BY joindate, idI understand the difficulty is probably; even if it does a range scan on every last name 'S%' (assuming it can?), they're not necessarily in order. Case in point:
    Last_Name:  JoinDate:
    Smith          2/5/2010
    Smuckers     1/10/2010An index range scan of 'S%' would return them in the above order, which is not ordered by joindate.
    So is there any way I can refactor this (query or index) such that the index can be range scanned (using LIKE 'x%') and return rows in the correct order without performing a sort? Or is that simply not possible?Come on. Index column order does matter. "LIKE 'x%'" actually is full table scan. The db engine accesses contiguous index entries and then uses the ROWID values in the index to retrieve the table rows.

  • How to use cfloop index value as part of another variable

    Hello,
    I have a RATE form that first asks "how many rates will you
    be adding?" that answer generates a series of form elements based
    on the answer. You then have a form grid to populate, 3 values for
    each rate (price, code, name).
    This part works fine. The issue is now I need to INSERT the
    values into the table, so I need to use the INDEX value of the
    cfloop to recreate the amount (and names) of the fields in the
    INSERT statement. How do I escape, or re-create the evaluated form
    elements ( in which their count is #i# as the loop goes) when I
    need to evaluate for #i# AND evaluate for #form.sku_i_name# at the
    same pass?
    I am passing, for example, #form.sku_2_Name# where that might
    equal "Half Page". The number 2 in that variable was assigned
    during the form creation by the current index of a cfloop. Since my
    action (insert) page does not know how many (out of 50 possible)
    sku's are coming, how do I use the skuCount (another hidden value
    passed as well) to create a proper INSERT SQL command when I need
    to eval the form element and the index at the same time?
    Obviously #sku_#i#_Name# does not work, and #sku_i_Name# does
    not either... I know this can be done, and that I am just doing it
    wrong.
    Thanks for any help!

    bigbrain28 wrote:
    > Thank You, cfsearching! I don't quite understand 100%
    how it works
    As all three of us indicated you use array notation for this
    type of
    requirement. In ColdFusion you can use array notation or dot
    notation
    to access structure data. Almost all data in ColdFusion is
    now some
    type of structure.
    I.E. #Form['myField']# is the same as #Form.myField#.
    The advantage is that with array notation you can do things
    you can not
    do with dot notation. You can reference elements that have
    keys that
    are illegal variable names such as one with a space.
    I.E. #url['my field'] is allowed, #url.my field# would fail
    or course.
    And you can concatenate the key string as we did with your
    example.
    I.E. #Form['aString' & aVariable]#
    There are many powerful things one can do with this
    knowledge. One can
    access record sets with array notations. This can allow for
    very
    sophisticated parsing of a record set.
    I.E. #myQuery['column'][row]#
    You can dynamical call a variable. Thus creating dynamic code
    that does
    not even need to know what variables exist until run time.
    I.E. #variables[anyName]#
    This just scratches the surface.

  • Why cant we use sy-index in loop and endloop?where exactly we used sy-index

    hi
    can u help me for this

    Hi...
    Genereally Sy-index is used in iterative cases like
    while....endwhile
    and
    Do.... Enddo
    In LOOP ..... Endloop.... We should use SY-TABIX....
    It would be more consistent we use sy-tabix as we loop at internal table so this SY-TABIX points to the current record its reading...
    we can use sy-index but rarely depends on condition.....
    SY-INDEX and SY-TABIX will not be same always in LOOP and ENDLOOP
    Rewards points if satisfied..
    Regards
    Narin Nandivada

  • Use of index based on an attribute when doing an order by

    Hi,
    I create a table and its indexes like this:
    create table poc_wip2 of xmltype
    xmlschema "http://www.derwent.co.uk/wpi.xsd" element "WPI"
    alter table poc_wip2
    add constraint poc_wip2_pk primary key
    (XMLDATA."BibPt"."PDOC_COUNTRY",
    XMLDATA."BibPt".pdoc_serial, XMLDATA."BibPt".pdoc_kind)
    create index pan_index on poc_wip2 t
    (extractvalue(value(t),'/WPI/BibPt/@pan'))
    Now when I run the query:
    select extractvalue(value(t),'/WPI/BibPt/@pan')
    from poc_wip2 t
    order by extractvalue(value(t),'/WPI/BibPt/@pan')
    I can see that a full table scan occurs. I cannot get the query to use the index built on the pan attribute.
    I tried adding a INDEX_FFS hint, but this does not work when I name the pan_index, it only works with
    INDEX_FFS(t), in which case the query then uses the primary key index.
    Is it possible to get the query to use the pan_index index?
    Thanks
    Pete

    Hi
    Create a restricted key figure with the ZSE_BPNV1 and mention the values of the attribute and display the values
    Here you can mention your charecteristic and attrribute value both with the key figure
    Assign points if useful
    Regards
    N Ganesh

  • Use of Index, Histograms, etc

    Hi all,
    We're using Oracle 9.2.04.
    I have a table with 500000 rows.
    So I have a query that returns only 30242 for a month, like:
    SELECT * FROM T1
    WHERE TO_CHAR(DT, 'MM/YYYY') = TO_CHAR(ADD_MONTHS(SYSDATE, -1), 'MM/YYYY')
    I have a index for this column:
    CREATE INDEX IND_T1_DT_FMT ON T1 (TO_CHAR(DT, 'MM/YYYY'))
    TABLESPACE TBS_SOME_USER;
    There are statistics for this table.
    Looking the table data, I have the following distribution:
    Qty     MON/YY  %
    1         Feb-09     0.000219142
    99         Apr-09     0.021695016
    38439     May-09     8.42358314
    98231     Jun-09     21.52649641
    1         Jul-06     0.000219142
    139959     Jul-09     30.6708362
    1         Aug-02     0.000219142
    1         Aug-07     0.000219142
    141362     Aug-09     30.97829184
    30242     Sep-09      6.62727962
    7990              1.750941213But when a perform the query (that returns 30242 rows - 6.63% of table):
    SELECT * FROM T1
    WHERE TO_CHAR(DT, 'MM/YYYY') = TO_CHAR(ADD_MONTHS(SYSDATE, -1), 'MM/YYYY')
    Oracle uses FTS:
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=432 Card=45633 Bytes
    =3011778)
    1 0 TABLE ACCESS (FULL) OF 'T1' (Cost=432 Card=45633 Bytes
    =3011778)
    So, Oracle should not use the index in this case?
    Is there any way to gather statistics for this table with a index based function?
    Something like this:
    EXECUTE DBMS_STATS.GATHER_TABLE_STATS(ownname => 'U1',
    tabname => 'T1', method_opt => 'FOR COLUMNS TO_CHAR(DT, ''MM/YYYY'')',
    cascade => true, degree => 4);
    How can I create histograms for this case?
    Or other solution, like Partition?
    thank you very much!!!!

    Always treat dates like dates.
    This
    SELECT * FROM T1
    WHERE TO_CHAR(DT, 'MM/YYYY') = TO_CHAR(ADD_MONTHS(SYSDATE, -1), 'MM/YYYY')Should be more like this:
    SELECT * FROM T1
    WHERE DT BETWEEN TRUNC(ADD_MONTHS(SYSDATE,-1),'MM') AND TRUNC(SYSDATE,'MM')-1 ;Then you should index DT.
    But, should this query use the index?
    Touch and go at 6.63%.
    Give it a go using dates as dates and see if it makes a difference.
    Is there a problem with the performance of the FTS?

  • Use of Index although a great number of rows is returned....

    Hi ,
    I have created the following table:
    create table all_obj select * from all_objects;
    Then i created some indexes:
    create index idx_obj on all_obj (object_name)
    create index idx_owner on all_obj (owner)
    Then i issued the sql statement:
    SQL> select count(object_name),owner from all_obj group by owner;
    COUNT(OBJECT_NAME) OWNER
                   719 MDSYS
                   266 SCOTT_BI
                   266 INFO_BI
                     2 TSMSYS
                   118 DMSYS
    20146 PUBLIC
                     6 OUTLN
                   171 CTXSYS
                   612 OLAPSYS
                   400 SYSTEM
                   168 EXFSYS
    43 SCOTT
                    32 DBSNMP
                  1638 ORDSYS
                     5 ORDPLUGINS
                   866 SYSMAN
                   284 XDB
    20993 SYS
                   264 INFORMATICS
                   212 WMSYS
    COUNT(OBJECT_NAME) OWNER
                     8 SI_INFORMTN_SCHEMA
    21 rows selectedand...:
    SQL> analyze table all_obj compute statistics;
    Table analyzedAt last , i issued the following pair of sql statements:
    SQL> select object_name,owner from scott.all_obj where owner='SCOTT'
      2  /
    43 ãñáììÝò åðéëÝ÷èçêáí.
    Ðñüãñáììá åêôÝëåóçò
    Plan hash value: 2272571446
    | Id  | Operation                   | Name      | Rows  | Bytes | Cost (%CPU)| T
    ime     |
    |   0 | SELECT STATEMENT            |           |  2249 | 65221 |    68   (0)| 0
    0:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| ALL_OBJ   |  2249 | 65221 |    68   (0)| 0
    0:00:01 |
    |*  2 |   INDEX RANGE SCAN          | IDX_OWNER |  2249 |       |     6   (0)| 0
    0:00:01 |
    Predicate Information (identified by operation id):
       2 - access("OWNER"='SCOTT')
    ÓôáôéóôéêÜ
              0  recursive calls
              0  db block gets
             12  consistent gets
              0  physical reads
              0  redo size
           1692  bytes sent via SQL*Net to client
            407  bytes received via SQL*Net from client
              4  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
             43  rows processedand
    SQL> select object_name,owner from scott.all_obj where owner='SYS';
    20993 ãñáììÝò åðéëÝ÷èçêáí.
    Ðñüãñáììá åêôÝëåóçò
    Plan hash value: 2272571446
    | Id  | Operation                   | Name      | Rows  | Bytes | Cost (%CPU)| T
    ime     |
    |   0 | SELECT STATEMENT            |           |  2249 | 65221 |    68   (0)| 0
    0:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| ALL_OBJ   |  2249 | 65221 |    68   (0)| 0
    0:00:01 |
    |*  2 |   INDEX RANGE SCAN          | IDX_OWNER |  2249 |       |     6   (0)| 0
    0:00:01 |
    Predicate Information (identified by operation id):
       2 - access("OWNER"='SYS')
    ÓôáôéóôéêÜ
              0  recursive calls
              0  db block gets
           3345  consistent gets
              0  physical reads
              0  redo size
         801069  bytes sent via SQL*Net to client
          15774  bytes received via SQL*Net from client
           1401  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          20993  rows processed
    The question is: why the second query uses the index since a great number of records is returned......????
    I use Oracle10g.v.2
    Thanks...
    Sim

    You were right.....
    using:
    SQL> EXEC DBMS_STATS.gather_schema_stats(ownname => 'SCOTT');
    the optimizer does follow the 'waited' access path....for the 'PUBLIC' records.....
    It seems that using the analyze table statement does not permit to gather all the necessary statistics.....(that's why it is depreciated)...!!!!
    Thanks.....
    Sim

  • Restrict the use of index while quering

    Hi All
    I have a simple emp table with columns empid, name, sal. Empid has a primary key imposed.
    Now when i write a statement like this,
    select * from emp where empid = <value>;
    the optimizer will make use of index.
    The question is........... is there anyway to make oracle bypass the use of index without change in above query.

    Why do you worry of performance issues when the table size is small , when it is huge and the column you r trying use in the query is also indexed the oracle finds the Best execution method to do the execution whether index exists or not , Oracle has a very intelligent Optimizer and no need to use hints unless and until it is really mandatory or when u r using a very complex query where Oracle is not able to deduce the best Execution plan . But by all means you should look at the execution plan how a cerain query Oracle knows of doing it or when u have a diferering opinion then only at that point you force a Optomizer Hint . For other normal cases like the one you are asking it is best to get the results how Oracle executes it and no forcing is required .

  • What is use of index by binaary_integer

    Hi All,
    I have created to program of collection where we use index by binaary_integer in one program and not use index by binaary_integer in second program, but result is same, any body help me what is use of index by binaary_integer here
    1- Declare
    Type emp_table_type is table of
    emp%rowtype index by binary_integer;
    my_emp_table emp_table_type;
    Begin
    select * bulk collect into my_emp_table from emp;
    for i in my_emp_table.first..my_emp_table.last
    loop
    dbms_output.put_line(my_emp_table(i).ename);
    end loop;
    end;
    2- Declare
    Type emp_table_type is table of
    emp%rowtype;
    my_emp_table emp_table_type;
    Begin
    select * bulk collect into my_emp_table from emp;
    for i in my_emp_table.first..my_emp_table.last
    loop
    dbms_output.put_line(my_emp_table(i).ename);
    end loop;
    end;
    your suggestion would be greatly appreciated.

    here is one for you.
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/composites.htm#CHDEIDIC

  • Amount of temporary tablespace size used for index rebuild

    Hi All,
    I want to know approximate amount of temporary tablespace size used for index rebuild. I need this information to avoid the insufficient temporary tablespace error during the huge index rebuild.
    Is there a query or procedure to find it out.
    Thank you.

    Hi,
    While creating the index, the temporary segment is created in the permanent tablespace. So permanent tablespace must have sufficient space.
    http://www.oracle-base.com/articles/10g/SpaceObjectTransactionManagement10g.php
    http://aprakash.wordpress.com/2010/01/05/numeric-segment-name/
    Anand

  • Can multiple APEX application use the same parsing schema?

    Hi,
    I have 4.2 APEX thru pl/sql Gatewat, 11gr2 DB and using theme 24.
    Due to the APEX limitation for version control I would be splitting 1 big ERP applications into 24 different APEX applications and each application would be considered as 1 unit for version control.
    I have about 800 tables and I would assume that all of these would need to be stored in 1 schema since a lot of these table are linked thru FK.
    Can I have multiple APEX APPS using the same parsing schema? or is there a better way to do this?
    Thanks in advance!

    Hi,
    Multiple applications can have same (one) parsing schema.
    You can test that on e.g. apex.oracle.com, where normally you have only one schema and you create multiple applications and all use that same schema.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai
    Edited by: jarola on Jan 28, 2013 7:15 PM

  • How to use the index method for pathpoints object in illustrator through javascripts

    hii...
    am using Illustrator CS2 using javascripts...
    how to use the index method for pathpoints object in illustrator through javascripts..

    Hi, what are you trying to do with path points?
    CarlosCanto

  • How do I use the Index Values property node with a multidimensional array.

    I am using a 2D array to store operator inputs on my front panel.  I only want to display one element to the operator at a time.  I am trying to use the Index Values property node to change the displayed element.  However, I can only get the Rows index to work.  How do I direct the Columns index as well?  The help says to use one per dimension.  I need clarification on what this is talking about.  I've tried adding a second element to the property node, 2 seperate property nodes, and diferent wiring techniques. (series, parallel)

    If you only wire up one of the inputs (col or row) what you get out is a 1D array of either the column or row. If you wire controls to both, then you will get one element out of the array. Getting a single element in a 2D array requires you to specify both a row and column.
    Message Edited by Dennis Knutson on 02-08-2007 08:34 AM
    Attachments:
    Index 2D Array.PNG ‏2 KB

Maybe you are looking for

  • Objects to show at different times on a slide not showing up

    Hi  Everyone, I hope this problem is minor and that I'm just missing a small step but here it goes- I'm using Captivate 4 and I've only been using it on one particular computer. I updated a captivate project that I've been working on since September

  • Installing Windows 7 with Bootcamp question

    Hey guys, I recently switched over from a PC to a Mac this year and wanted to install Windows 7 with Bootcamp so I could do some gaming every once and a while. I've read that I can't use the restore discs that I got with my ASUS to install Vista, so

  • TRM (Task and resource management) extractor

    Hi people!! I would like to know, if is there some TRM extractor for sap bw, or what could be the procces to load TRM information in BW. Regards!

  • Inspire 5.1 5100 dri

    Hai there?After a crash I can't find my driver for the "inspire 5. 500 "?Can some one help me with this... Is there anybody who has the driver... I need my sound.........:smileyvery-happy:?ThanksMessage Edited by neanderthaler on 03-0-200605:57 AM

  • Repeated requests for email password

    Every now and then (months apart) msn asks me to fill in my email password on my MBP (Lion) every 2 seconds or so for hours at a time - then it usually stops at some point on it's own - and starts doing it again arbitrarily. Has anyone heard of this