TimesTen vs. Oracle SQL Execution Time

Source: Internet
Author: User

Just made a simple test.


TimesTen 11g and Oracle 11.2.0.4 are installed on the same physical machine with two hardware environments

Create a table on both sides of the database

CREATE TABLE Test (a number,b varchar2 (20));

Commit

And then insert the data

Declare

Z number;

X varchar2: = ' abc ';

Begin

For z in 1..1000000 loop

INSERT into test values (Z,X);

End Loop;

End

/

Then open the execution plan in Oracle

Set Autot on;

Sql> Select COUNT (*) from test;

COUNT (*)

----------

1000000

Execution Plan

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

Plan Hash value:1950795681

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

| Id | Operation | Name | Rows | Cost (%CPU) | Time |

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

| 0 |     SELECT STATEMENT |     |   1 | 581 (7) | 00:00:07 |

|  1 |     SORT AGGREGATE |     |            1 |          | |

|   2 | TABLE ACCESS Full |  Test|   8725k| 581 (7) | 00:00:07 |

Then update to see the time.

sql> Update test set a=123 where b= ' abc ';

1000000 rows updated.

Execution Plan

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

Plan Hash value:839355234

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

| Id | Operation | Name | Rows | Bytes | Cost (%CPU) | Time |

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

| 0 |      UPDATE STATEMENT |  |    1128k|   26m| 552 (2) | 00:00:07 |

|  1 | UPDATE |       TEST |       |            |          | |

|* 2 | TABLE ACCESS full|  TEST |    1128k|   26m| 552 (2) | 00:00:07 |

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

Perform the same operation on TimesTen 11g.

CREATE TABLE Test1 (a number,b varchar2 (20));

Commit

And then insert the data

Declare

Z number;

X varchar2: = ' abc ';

Begin

For z in 1..1000000 loop

INSERT into test1 values (z,x);

End Loop;

End

/

Execute select and query execution time

sqlcmdid:33556034320

private_command_connection_id:2048

Executions:5

Prepares:5

reprepares:0

Freeable:1

size:3912

Owner:shawn

Querytext:select Count (*) from test1

Fetchcount:5

Starttime:2014-11-18 13:22:53.263000

Maxexecutetime:. 1

Lastexecutetime:. 1

minexecutetime:0

Only 0.1s is much faster than Oracle's 7s.

Perform an update and query the time

sqlcmdid:33556105440

private_command_connection_id:2048

Executions:2

Prepares:2

reprepares:0

Freeable:1

size:2576

Owner:shawn

Querytext:update test1 set a=123 where b= ' abc '

fetchcount:0

Starttime:2014-11-18 13:51:18.141000

maxexecutetime:14.044

lastexecutetime:13.944

minexecutetime:0

Here's the problem!

TimesTen update the fastest in 13.944 seconds, faster than Oracle?

I hope the great God can help answer the next ~ Thank you. Just contact TimesTen.


TimesTen vs. Oracle SQL Execution Time

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.