Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing the same update on Hard Disks with Solid State Disks

Status
Not open for further replies.

dbalearner

Technical User
Aug 23, 2003
170
GB
I have Oracle 11.2.0.1.0 - 64bit

I created a table called T1 as follows:

select DBMS_METADATA.GET_DDL('TABLE','T1') from DUAL;

CREATE TABLE "MICH"."T1"
( "N1" NUMBER(5,0) NOT NULL ENABLE,
"IND_PAD" VARCHAR2(40) NOT NULL ENABLE,
"N2" NUMBER(5,0) NOT NULL ENABLE,
"SMALL_VC" VARCHAR2(10) NOT NULL ENABLE,
"PADDING" VARCHAR2(200) NOT NULL ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DE
FAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APP1"

Tablespace app1 is on solid state disks (SSD). I populated this table with 3 million rows (using sqlldr). Table has no indexes etc.

I then used the following SQL to update table T1.set autotrace on
set timing on
update T1
set padding = padding
where n1 = 2
and ind_pad <= rpad('x',39)||'x'
and n2 < 18;

I then built the same table on a tablespace app1_hdd which is on normal sata disk drives.

I then rebooted oracle and ran the query first against SSD table three times. The output is shown below:
107591 rows updated.

Elapsed: 00:00:08.61

Execution Plan
----------------------------------------------------------
Plan hash value: 2927627013

---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | UPDATE STATEMENT | | 113K| 26M| 30409 (1)| 00:06:05 |
| 1 | UPDATE | T1 | | | | |
|* 2 | TABLE ACCESS FULL| T1 | 113K| 26M| 30409 (1)| 00:06:05 |
---------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

2 - filter("N1"=2 AND "N2"<18 AND "IND_PAD"<='x
x')


Statistics
----------------------------------------------------------
360 recursive calls
191907 db block gets
244271 consistent gets
0 physical reads
97093360 redo size
1124 bytes sent via SQL*Net to client
1351 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
107591 rows processed

I then rebooted oracle and ran the same update against T1 on tablespace app1_hdd. I used two different logins each having tablespace app1 and app1_hdd as their default tablespace respectively.

When I ran the update against T1 on normal hard drives I get

107591 rows updated.

Elapsed: 00:00:03.75

Execution Plan
----------------------------------------------------------
Plan hash value: 2927627013

---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | UPDATE STATEMENT | | 113K| 26M| 30409 (1)| 00:06:05 |
| 1 | UPDATE | T1 | | | | |
|* 2 | TABLE ACCESS FULL| T1 | 113K| 26M| 30409 (1)| 00:06:05 |
---------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

2 - filter("N1"=2 AND "N2"<18 AND "IND_PAD"<='x
x')


Statistics
----------------------------------------------------------
402 recursive calls
239533 db block gets
259295 consistent gets
0 physical reads
120187180 redo size
1124 bytes sent via SQL*Net to client
1351 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
107591 rows processed


Note the timing that shows it takes 8,610 ms to run on SSD compared to 3,750 ms on Hard disk. All other parameters example consistent gets etc favor SSD?

Any ideas what can cause this? I wwould have expected the update to run much faster on Solid State Disks.

Thanks



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top