Ask stealing a query

Hi Solomon et al.,.
I am grateful to Solomon in this forum that gave me this query... I am a novice in oracle... I ask Salomon or one to explain this request related sup of co...

delete employee_stat1 e1
where 2 =)
SELECT count (distinct e2.emp_status)
of employee_stat1 e2
where e2.emp_key = e1.emp_key
and e2.emp_status in ('P', 'C')
)

Here, I need to under stand why use '2' in 'where 2 ='... What does this number "2"... When I use different number, it gets me results have...

The main query selects an employee (one at a time). Assume that this employee has used key K. Then the subquery selects all employees with employee key K and 'P' or 'C' status and calculates number (separate status). This count can be:

(1) 0 - when there is no employees with employee key K and status 'P' or 'C ',.
(2) 1 - when among all employees with employee key K there are employees with the status 'P' and no employees with the status 'C' or vice versa
(3) 2 - when there is among all employees with employee key K employees are employed with the status 'P' and 'C' status

As you can see, WHERE 2 = subquery clause will result in TRUE only when the employee has the same key used as employees with the status 'P' and 'C' status Then these employees will be deleted.

SY.

Tags: Database

Similar Questions

  • Date ranges query

    Hi Experts,

    A very happy new year to all of you (a little in advance)!

    I have a table where I have the id of employee and the task assigned with the start dates and end dates. Overlap in the dates of the tasks is a data delivers however I know how to spot them and eliminate. There is therefore no date of tasks that overlap

    Employee_id

    Task_No

    Task_Start_date

    Task_End_Date

    Examples of data

    1 T1 1 January 2014 February 28, 2014

    1 T2 March 1, 2014 31 December 2014

    2 T1 23 January 2014 31 December 2014

    2 T2 1 January 2015 December 31, 2073 (means end of time)

    3 T3 1 January 2014 July 15, 2014

    3 T4 August 1, 2014 31 December 2014

    T5 4 1 January 2014 December 31, 2073

    I want to design a query where I provide the end date and it will list all the employees that are free for the same day from 1 January 2014. Thus, for example, if I give December 31, 2014, it will list the

    EmpId (first day where the employee is free)

    2 January 1, 2014

    3 July 16, 2014

    If I give the end = end date of time(31-Dec-2013), result-

    EmpId (first day where the employee is free)

    1 January 1, 2015

    2 January 1, 2014

    3 July 16, 2014

    If I give the end = date January 31, 2014, expected - result

    EmpId (first day where the employee is free)

    1 January 1, 2015

    I conceived after the request, but he intercepted not 2 employee ID. Also, it provides no flexibility to change end date-

    Select *.

    from (select employe_id,

    task_start_date,

    task_end_date,

    lag (task_end_date, 1, task_start_date) on prev_end_date (partition by employee_id arrested by task_start_date)

    of shop.employee_tasks

    where task_end_date > = trunc (sysdate))

    where task_start_date - prev_end_date > 1

    Thanks in advance!

    Kind regards

    This is an example of what I call the query 'free time': you have the dates when you are busy and you want the dates where you are free.

    You can find a nice solution for the problem of base here: ask Tom "SQL Query to find gaps in the date ranges" (search for solution of Anthony Boucher). Please note that this solution works even with the date ranges overlap.

    To apply the solution here, first create the test data (please do it yourself in the following questions).

    create table t(Employee_id, task_no, Task_Start_date, task_end_date)
    as select
    1, 'T1', to_date('01-jan-2014'), to_date('28-feb-2014') from dual union all select
    1, 'T2', to_date('01-Mar-2014'), to_date('31-Dec-2014') from dual union all select
    2, 'T1', to_date('23-jan-2014'), to_date('31-dec-2014') from dual union all select
    2, 'T2', to_date('01-jan-2015'), to_date('31-dec-2073') from dual union all select
    3, 'T3', to_date('01-jan-2014'), to_date('15-jul-2014') from dual union all select
    3, 'T4', to_date('01-aug-2014'), to_date('31-dec-2014') from dual union all select
    4, 'T5', to_date('01-Jan-2014'), to_date('31-Dec-2073') from dual;
    

    In the query, you must add records for yesterday and for the "end date" you want. This allows you to "free time" before and after the date ranges in your table.

    Now, you partition by order of Task_Start_date and employe_id. Using the analytical function of the max (task_end_date), you get the last date of end so far. Add 1 and you get the first time (maybe). To make sure that the date is free, it must be before the next start date.

    variable end_date varchar2(64)
    exec :end_date := '31-Dec-2073';
    --
    with boundaries as (
      select trunc(sysdate)-1 task_start_date, trunc(sysdate)-1 task_end_date from dual
      union all
      select to_date(:end_date)+1, to_date(:end_date)+1 from dual
    ), data as (
      select * from t
    where task_end_date >= trunc(sysdate)
      and task_start_date < :end_date
      union all
      select distinct a.employee_id, null, b.task_start_date, b.task_end_date
      from t a, boundaries b
    )
    select employee_id, min(free_start) free_start
    from (
      select employee_id,
      max(task_end_date) over (partition by employee_id order by task_start_date)+1 free_start,
      lead(task_start_date) over (partition by employee_id order by task_start_date)-1 free_end
      from data
    )
    where free_start <= free_end
    group by employee_id;
    
    EMPLOYEE_ID FREE_START
    1 JANUARY 1, 15
    2 1 JANUARY 14
    3 16 JULY 14
  • ask the last disk in per_assignments_v

    Hello

    I would like to ask how to query the per_assignments_v table to return only the last record.

    When pointed out that it will create another record whenever you update from the form.

    Thank you

    Rey

    Hey Rey,

    The feature you're looking for is called follow-up Date.

    Check-

    https://blogs.Oracle.com/manojmadhusoodanan/entry/date_tracking_in_oracle_hrms

    Basically all _F tables store data for a period of time, so you always get data from a timestamp.

    SQL, you include sysdate between effective_start_date and effective_end_date for all the joins of tables _F.

    Hope that helps,

    See you soon,.

    Vignesh

  • Need of a query with all the clauses

    Hi all

    I have been asked for a query to write using clauses in sql as a group by, where, having, order by in a single query. I just write the query below but I have no out put. Please do not correct where I'm missing.

    Select deptno, max (sal) in the group by deptno emp having deptno > (select distinct deptno from emp where deptno > = 20)

    Thank you for your time and information.

    Removed the ' > ' your subquery that is causing the "ORA-01427: einreihig subquery returns more than one line.

    SELECT deptno,

    Max (SAL)

    WCP

    GROUP BY deptno

    HAVING deptno >

    (SEPARATE FROM SELECT Deptno emp WHERE deptno = 20

    );

    Another example

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

    SELECT deptno,

    Sum (SAL)

    WCP

    -WHERE deptno = 20

    Deptno group

    HAVING SUM (sal) > 9000

    ORDER BY deptno;

  • Query referring to itself

    Hello ~

    This is probably a very simple question, but here's the query I am trying to run, without success:

    < name cfquery = "updatePage" datasource = "#application.db #" >
    UPDATE
    admin_nav_test
    SET
    LFT =
    < cfif parentLevel GT lft >
    LFT + 2
    < cfelse >
    LFT
    < / cfif >
    WHERE
    rght > = #parentLevel #.
    < / cfquery >

    Basically, I want to refer to the current value of lft in the table I ask in the query itself, if that makes sense. However, all I get is a error that says "LFT Variable is not defined." I tried to use admin_nav_test.lft and all other combo I can think of self-reference that variable, but no luck! What Miss me? Thank you!

    UPDATE admin_nav_test
    SET lft = lft + 2

    where lft > parentlevel

    and rght = #parentlevel #.

  • Analysis with os 5.0 and Qr code barcode

    Hi friends,

    I want to develop code barcodes and qr code scanner with blackberry os 5.0?

    Please, give me suggestion for this direction.

    BlackBerry has predict library barcode but its on os 6.0.

    I'm zxing library felt now. but not exact solution,

    give me an answer.

    Thank you.

    I did the code barcode scanning after all the stuff.

    I found the solution.

    http://aliirawan-Wen.blogspot.com/2011/05/barcode-scanner-for-BlackBerry-OS-50.html

    See this thread its nice with auto scan camera.

    ask if no query

  • ORA-00932: inconsistent data types: expected NUMBER obtained DATE

    Hi all

    I have problem in the creation of report of the foregoing, it is can someone help me in this.

    Here is the code

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

    Select ar_tab.account_number,

    ar_tab.party_name,

    ar_tab.trans_type,

    ar_tab.trans_type_name,

    ar_tab.invoice_currency_code,

    ar_tab.trx_num,

    ar_tab.trans_date,

    ar_tab.gl_date,

    ar_tab.due_date,

    (nvl (ar_tab.fcy_amt, 0) - nvl (ar_tab.ar_fcy_amt_due, 0)) outstanding_amount,.

    (case when trunc(:p_to_date) - trunc (ar_tab.trans_date) < = 0 then (ar_tab.inr_amt - ar_tab.ar_acctd_amt_due) end else 0) current_bal

    of (hca.account_number select account_number,)

    Party_name HP.party_name,

    CTA.customer_trx_id customer_trx_id,-, acl.name, collector_name

    Decode (ps.class,

    "INV', 'the Bill."

    "MD", "Débit Memo"

    "CM", "Credit memo")

    trans_type,

    rctt. Name trans_type_name,

    rctt.cust_trx_type_id cust_trx_type_id,

    CTA.invoice_currency_code invoice_currency_code,

    Hou.location_code location_code,

    PS.trx_number trx_num,

    PS.trx_date trans_date,

    PS.gl_date gl_date,

    PS.due_date end_date,

    PS.amount_due_original fcy_amt,

    round ((ps.amount_due_original * nvl (ps.exchange_rate, 1)), 2) inr_amt.

    PS.exchange_rate exchange_rate,

    PS.amount_due_remaining amount_due_remaining_fcy,

    PS.acctd_amount_due_remaining amount_remaining_inr,

    (select round (sum (nvl (a.amount_applied * nvl (ps.exchange_rate, 1), 0)), 2))

    of ar_receivable_applications_all one

    where a.applied_payment_schedule_id = ps.payment_schedule_id

    -a.APPLIED_CUSTOMER_TRX_ID = ps. CUSTOMER_TRX_ID

    and a.display = 'Y '.

    and trunc (a.gl_date) between: p_from_date and: p_to_date

    Group of a.applied_payment_schedule_id)

    ar_acctd_amt_due,

    (select round (sum (nvl (a.amount_applied, 0)), 2))

    of ar_receivable_applications_all one

    where a.applied_payment_schedule_id = ps.payment_schedule_id

    and a.display = 'Y '.

    and trunc (a.gl_date) between: p_from_date and: p_to_date

    Group of a.applied_payment_schedule_id)

    ar_fcy_amt_due

    of apps.ar_payment_schedules_all ps,.

    Apps.hz_cust_accounts AOB,

    HP apps.hz_parties,-, acl apps.ar_collectors

    Apps.ra_customer_trx_all cta,

    Apps.ra_cust_trx_types_all rctt,

    hr_organization_units_v hou

    where hca.cust_account_id = ps.customer_id

    and ps.customer_trx_id = cta.customer_trx_id

    and cta.cust_trx_type_id = rctt.cust_trx_type_id

    and ps.class <>"LMP".

    and hca.account_number = nvl (: p_cust_code, hca.account_number)

    and ps.class = nvl (: p_class, ps.class)

    and ps.class in ('INV', 'DM')

    and cta.invoice_currency_code <>'INR '.

    and hou.organization_id = cta.org_id

    and cta.org_id = nvl (: p_org_id, cta.org_id)

    and hp.party_id = hca.party_id

    and ps.invoice_currency_code <>'INR '.

    and rctt.org_id = cta.org_id

    and ps.amount_adjusted is null - added July 10, 2012

    and trunc (ps.gl_date) between nvl (: p_from_date, trunc (ps.gl_date))

    and nvl (: p_to_date, trunc (ps.gl_date))) ar_tab

    - AND AR_TAB. Amount_Remaining_INR <>0

    where (nvl (ar_tab.inr_amt, 0) - nvl (ar_tab.ar_acctd_amt_due, 0)) <>0

    OK well understood.

    But I asked you the query that you have changed as suggested by me.

    I guess you changed your query into a toad and copy then paste into the generator. So I want to check the query how you changed according to my suggestion.

    because, I've modified your request and took the new report and inserted, works very well.

  • Join WITH NULL

    I have table1 and table2.what is the number of lines if I join table1 and table2 col1-based. I told 2 rows. Interview then asked write a query if you want that NULL, NULL in release and I don't know how to do this since Null will not match


    TABLE1:

    COL1, COL2

    1, HAS

    2, B

    NULL, NULL

    TABLE2:

    COL1, COL2

    1 C,

    2, D

    NULL, NULL

    Don't know what the interviewer was looking for

    SQL> with t1
      2  as
      3  (
      4  select 1 id, 'A' name from dual union all
      5  select 2 id, 'B' name from dual union all
      6  select null id, null name from dual
      7  ),
      8  t2
      9  as
     10  (
     11  select 1 id, 'C' name from dual union all
     12  select 2 id, 'D' name from dual union all
     13  select null id, null name from dual
     14  )
     15  select *
     16    from t1
     17    join t2
     18      on nvl(t1.id, -1) = nvl(t2.id, -1);
    
            ID NAME               ID NAME
    ---------- ---------- ---------- ----------
             1 A                   1 C
             2 B                   2 D
    NULL       NULL       NULL       NULL
    
    SQL> with t1
      2  as
      3  (
      4  select 1 id, 'A' name from dual union all
      5  select 2 id, 'B' name from dual union all
      6  select null id, null name from dual
      7  ),
      8  t2
      9  as
     10  (
     11  select 1 id, 'C' name from dual union all
     12  select 2 id, 'D' name from dual union all
     13  select null id, null name from dual
     14  )
     15  select *
     16    from t1
     17    left join t2
     18      on t1.id = t2.id;
    
            ID NAME               ID NAME
    ---------- ---------- ---------- ----------
             1 A                   1 C
             2 B                   2 D
    NULL       NULL       NULL       NULL
    
  • pulling the Notes field

    Excuse the greenery in my powercli skills so I'm not even sure, is that I can explain what I'm missing so I'll give you an example of what I'm looking for

    I would like to shoot the "field notes" - If POSSIBLE like this

    $vms = "" | Select-Object VMName, OS, (Notes

    $vms. VMName = $vm. Name
    $vms. OS = $vm. Config.GuestFullName

    $vms. Notes =?

    but I do not know what to ask that by querying for the vmname ($vm. Name)

    Or am I just WAYYYYY in left field and not even on the right track?

    Thus, one, I can do it and I have question with

    two, is there an easy way for a dummy like me to know what I mark from virtual machines... I would like to collect information so I don't know that I have the same question about something else.

    Thank you!!!

    Drivera, you do it very well! No need to be frustrated

    Let me know what is not clear, because I see only the "main" question In regards to IP addresses, you can check how I did in some post me

    http://psvmware.WordPress.com/2012/10/24/report-for-all-VMs-regarding-network-card-MACAddress-IPAddress-network-card-type-e1000vmxnet-in-a-CSV/

    You can test this part of the code that describes the intellectual property and put to yourscript.

    Let me know if you have any other questions.

    I used this code and it works, ip is pressed:

    $Report = @)

    {foreach ($vm in get - vm)

    $vms = "" | Select-Object VMName, Notes, Hostname, IPAddress
    $vms. VMName = $vm. Name
    $vms. Host name = $vm.guest.hostname
    $vms. Notes = $vm.notes
    $vms. IPAddress = $vm.guest.ipAddress

    $Report += $vms
    }

    PowerCLI C:\ > $report | Select vmname, ipaddress

    VMName IPAddress
    ------                                  ---------
    testVM1 {192.168.0.9
    testvm4                          {}
    testx                               {}
    vmtest1 {192.168.0.4, fe80..:}

    It's just that the IP address can have several elements, when it has, it becomes an object array. So what to do

    .IPAddress $report [3] is an array that keeps 2 ips, 1 ip which is ipv4, and then which is ipv6.

    So basically to get first this virtual machine ip address you must use:

    $report [3] .ipaddress [0]-> this will be ip ipv4

    .IPAddress $report [3] [1]-> it will be the second ip address which is in this case some ipv6.

    IF you don't want to have ipv6 included ips you can filter

    $Report = @)

    foreach ($vm to {$x [0.10])}

    $vms = "" | Select-Object VMName, Notes, Hostname, IPAddress
    $vms. VMName = $vm. Name
    $vms. Host name = $vm.guest.hostname
    $vms. Notes = $vm.notes
    $vms. IPAddress = $vm.guest.ipAddress |? {$_ - like "*."} * "}-> This will make ipv6 went as they have: instead of."

    $Report += $vms
    }

    Let me know what does not work for you with these ips.

    Greg

  • Selected display + year previous data (parametric)

    Hey all,.

    I was wondering if you could show me a couple of different ways to display data from several different years, e.g., 2013, 2012, and 2011.

    I can do 'coded' like this:

    FILTER ("de facto billing Details". "' Price ' / sum ("billing details done '. " Prize") * using 100 ("darken the invoice of the month". (("" Bill of the year ' = 2013)) -> use the same formula for 2012 and 2011.

    It gives me the values of percentage for the year 2013 price. I tried to make it accept a variable presentation from a prompt of dashboard (user selects 2007 and gets the values for 2006 and 2005), but it did not work. Except if hard-coded, BI seems to only show data for the selected year with the dash prompt...

    Hope this makes sense; It's a bit confusing to explain in writing.

    Thank you!

    Published by: 966880 on February 11, 2013 05:44

    That you use to fill in the default selection.
    There is no value in the list, you can use a text field on the user for previous years hidden input field.
    Keep in mind that you use variable invites you to the hidden years, no guest column.

    When you change your column visible year prompt and ask a new query, the values of the variables will be modified.
    Keep the wick with the visible variable guests first to ensure that the values are ok.

    Don t forget to set the data type for the variable guests too.

  • Issue NUMBER and VARCHAR CONCATENATE

    I'm trying to concatenate a string and an integer. However, is the number that I'm trying to concatenate a number returned by the rank function, and it is part of a CASE statement. I realize that this seems a bit confusing, so here is an example of pseudo-device of what I'm trying to do:
    WITH temp_table AS
    (
     SELECT 1 AS col1 FROM DUAL UNION ALL
     SELECT 2 FROM DUAL UNION ALL
     SELECT 3 FROM DUAL UNION ALL
     SELECT 3 FROM DUAL 
    )
    SELECT CASE WHEN COUNT(*) OVER (PARTITION BY col1) > 1 
                THEN
                      RANK() OVER (ORDER BY col1) || 't'
                ELSE
                      RANK() OVER (ORDER BY col1)
           END AS test
    FROM   temp_table;
    Desired results set:
    TEST
    1
    2
    3t
    3t
    When I do the above, I get a ' incompatible data types: expected TANK got the NUMBER "exception. I tried to convert the "RANK() OVER (ORDER BY col1)' to a string via the function TO_CHAR and the CAST function, but none worked. I figure out how to reach my goal by creating a subquery, convert the column test tank and that the addition of the 't' character to it in the external SELECTION; I was wondering if it was possible to do what I asked in a query (without a subquery).

    Apart from this is one of the sql statement more sophisticated that I've seen for a long time you can try this 'trick '.

    WITH temp_table AS
    (
     SELECT 1 AS col1 FROM DUAL UNION ALL
     SELECT 2 FROM DUAL UNION ALL
     SELECT 3 FROM DUAL UNION ALL
     SELECT 3 FROM DUAL
    )
    SELECT CASE WHEN COUNT(*) OVER (PARTITION BY col1) > 1
                THEN
                      RANK() OVER (ORDER BY col1) || 't'
                ELSE
                      RANK() OVER (ORDER BY col1) || ''
           END AS test
    FROM   temp_table;
    
    TEST
    1
    2
    3t
    3t
    

    the result of the case statement must be the same type of data in each branch

    concerning

  • What is the difference between the 2 procedures pls. ?

    What is the difference between the 2 procedures in syntax and bussiness pls.

    CREATE OR REPLACE PROCEDURE Balance_quantity_update
        (V_STORE_ID IN NUMBER,  V_ITEM_SERIAL IN NUMBER) IS
      BEGIN
      UPDATE WH_T_ITEMS A
          SET BALANCE_QTY = ITEM_QTY
          WHERE STORE_ID = V_STORE_ID
          AND ITEM_SERIAL = V_ITEM_SERIAL
          AND ITEM_QTY = (SELECT MAX(ITEM_QTY)
                          FROM WH_T_ITEMS B
                          WHERE A.STORE_ID = B.STORE_ID
                         AND A.ITEM_SERIAL = B.ITEM_SERIAL);
       END;
       /
    CREATE OR REPLACE PROCEDURE Balance_quantity_update
        (V_STORE_ID IN NUMBER,  V_ITEM_SERIAL IN NUMBER) IS
      BEGIN
      UPDATE WH_T_ITEMS A
          SET BALANCE_QTY =MAX(ITEM_QTY)
          WHERE STORE_ID = V_STORE_ID
          AND ITEM_SERIAL = V_ITEM_SERIAL   ;
       END;
       /
    Kind regards

    Abdetu...

    I don't know exactly what you're asking. The query

    UPDATE WH_T_ITEMS A
       SET BALANCE_QTY =MAX(ITEM_QTY)
     WHERE STORE_ID = V_STORE_ID
       AND ITEM_SERIAL = V_ITEM_SERIAL   ;
    

    is not valid SQL from Oracle. As MAX aggregate functions cannot be used in a query like that because Oracle has no idea what you aggregate by. There is nothing preventing Oracle to change the syntax of the SQL language to allow an aggregate be used this way, but there is usually no reason to extend the SQL language like that.

    You can assign the result of a query that included a total of BALANCE_QTY column, i.e.

    UPDATE WH_T_ITEMS A
       SET BALANCE_QTY = (SELECT MAX(ITEM_QTY) FROM <> WHERE <>)
     WHERE STORE_ID = V_STORE_ID
       AND ITEM_SERIAL = V_ITEM_SERIAL   ;
    

    I think I mentioned in some of your previous discussions, a data model where you have a table of ELEMENTS that has an ITEM_QTY and the BALANCE_QTY looks suspicious. You assign the value of the ITEM_QTY column to the BALANCE_QTY on the same line does only increase anxiety.

    Justin

  • Database ADO Xtra

    I created a connection object and sucessfully recored in my database (access). When I create a recordset object to retrieve the data I seem to only get close to database fields. This is my code:
    Member ("Status"). Text = member("status").text & RETURN & rst.fields ["name"]
    Member ("Status"). Text = member("status").text & RETURN & rst.fields ["ID"]
    Member ("Status"). Text = member("status").text & RETURN & rst.fields ["dob"]
    Member ("Status"). Text = member("status").text & RETURN & rst.fields ["IDnumber"]
    Member ("Status"). Text = member("status").text & RETURN & rst.fields ["pass"]
    Member ("Status"). Text = member("status").text & RETURN & rst.fields ["score"]
    Member ("Status"). Text = member("status").text & RETURN & rst.fields ["attempts"]
    Member ("Status"). Text = member("status").text & RETURN & rst.fields ["userLevel"]
    I get the result for 'name' and 'id' but not others. Any help out there?
    Kind regards
    Duncan

    You ask in your query SQL fields named 'Id' and 'name ':
    >--> getThis = "SELECT Id, name FROM WHERE name = test'" & gname & "'."

    but trying to access to the fields/aren't / the part of your query
    >--> = rst.fields ["dob"] gdob
    >--> gIDnumber = rst.fields ["IDnumber"]
    >--> = rst.fields ["pass"] gpass
    >--> gscore = rst.fields ["score"]
    >--> gattempts = rst.fields ["attempts"]
    >--> guserLevel = rst.fields ["userLevel"]

    Maybe your SELECT statement should look like:
    getThis = "SELECT Id, name, date of birth, Idnumber, pass, score, tent,
    "userLevel FROM test WHERE name ='" & gname & "'."

  • space used in storage

    Hello
    in 10g,.
    any request to find total used space in storage?
    Thank you.

    Your welcome.

    "Only for the datas? Sorry, I don't get what you want to ask. The query I posted will tell you the total size db, its size in GB as the way is having a lot of data and the amount of space in the UK, it's free.

    Yes, it will show you the amount of data there.

    Concerning
    Girish Sharma

  • TimesTen and Oracle 11 g result cache

    Oracle 11g introduces the concept of cache the result whereby the result set of frequently executed queries are stored in the cache and used later when other users ask the same query. This is different from the caching of the data blocks and exceuting the query over and over again.

    Tom Kyte calls this materialized view just-in-time, in which case the results are dynamically evaluated without DBA intervention

    http://www.Oracle.com/technology/oramag/Oracle/07-Sep/o57asktom.html

    My point is that, given utilities like result_cache and possibility to use Solid State Disks in Oracle to accelerate physics I/O etc. is necessary for a product like TimesTen? It seems to me he could asdd just another layer of complexity?

    Oracle cache there result a useful tool, but it is significantly different from TimesTen. My understanding of the Oracle result cache is caching the results for rarely changing data such as search (currencies/identification code) tables, data reference that do not change often (list of counterparties) etc. It would be pointless to cache the result set when the data changes frequently.

    There is also another argument for the cache of SQL result that if you hit high on your CPU usage and that you have enough memory, then you can cache some defined thus results save on your cycles CPU.

    In view of the arguments on the wired RDBMS and drives (SSD), we can talk all day, but with SSDS does not eliminate the consideration for physical i/o optimizer. A table scan is a table scan if the data resides on disk SCSI or SSD. SSD will be faster, but we are still running physical IOs.

    What about TimesTen, the positioning of the product is different. TimesTen is closer to average than Oracle. It is designed to work closely at the application layer, while Oracle aims much more wide. There is no way one can replace TimesTen with any RDBMS wired for volumes of moderate and real-time response. Demand for the result cache has been around for a while. In areas like trading program and data on the market when the underlying data changes quickly, TimesTen will come handy, because time real/provisional data and calculations must be made almost in real time, with fewer complications of the execution engine. I don't see how we can deploy the result cache in this scenario. Due to underlying data change, Oracle is obliged to calculate queries almost everytime and the cache of result will be just wasted.

    Hope this helps,

    Mich

Maybe you are looking for