Oracle 11g IFS VS iffs Performance Comparison

Source: Internet
Author: User


I. Description

1, IFS (index full scan) single-block read, Iffs (index fast full scan) multi-block read.

2, at the same time in a table in a full scan of a column, the speed of more than a block of reading is significantly faster than a single block read, better performance.

3. The FTS (full table Scan) and Iffs (index fast full scan) are read multiple blocks.

4, Iffs (index fast full scan) for multi-block read, can be parallel, non-sorted

5, IFS (index full scan) is a single block read, orderly.

Second, the test process


Sql> alter system flush Buffer_cache;

System altered.

elapsed:00:00:00.17

Sql> alter system flush Shared_pool;

System altered.

elapsed:00:00:00.30

Sql> Select/*+ index (TT idx_object_id) */count (object_id) from TT;

COUNT (object_id)

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

5524288

elapsed:00:00:05.72

Sql> alter system flush Buffer_cache;

System altered.

elapsed:00:00:00.17

Sql> alter system flush Shared_pool;

System altered.

elapsed:00:00:00.07

Sql> Select COUNT (object_id) from TT;

COUNT (object_id)

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

5524288

elapsed:00:00:01.35

Sql> explain plan for select/*+ Index (TT idx_object_id) */count (object_id) from TT;

explained.

elapsed:00:00:00.07

Sql> select * FROM table (Dbms_xplan.display ());

Plan_table_output

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

Plan Hash value:3277332215

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

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

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

| 0 |               SELECT STATEMENT |     |     1 | 5 | 12269 (1) | 00:02:28 |

|  1 |               SORT AGGREGATE |     |     1 |         5 |          | |

|   2 | INDEX full SCAN|  idx_object_id |    2762k| 13m| 12269 (1) | 00:02:28 |

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

9 rows selected.

elapsed:00:00:00.33

Sql> explain plan for select COUNT (object_id) from TT;

explained.

elapsed:00:00:00.01

Sql> select * FROM table (Dbms_xplan.display ());

Plan_table_output

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

Plan Hash value:1131838604

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

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

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

| 0 |             SELECT STATEMENT |     |     1 |  5 | 3335 (1) | 00:00:41 |

|  1 |               SORT AGGREGATE |     |     1 |    5 |          | |

|   2 | INDEX FAST full SCAN|  idx_object_id |    2762k|  13m| 3335 (1) | 00:00:41 |

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

9 rows selected.

elapsed:00:00:00.01

Sql>


Oracle 11g IFS VS iffs Performance Comparison

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.