TomJava
TomJava

Reputation: 529

Partitioning query is full table scan or partition range

Created a table with daily partitioning. In the select condition I am using the column used for daily partitioning(for getting two days data till now)

SELECT * FROM MY_TABLE
WHERE CREATED_TIME > TRUNC (sysdate -1)

But will this query go for full table scan or will it only scan fixed partitions?

In the explain plan I see the following

SELECT STATEMENT
|----PARTITION RANGE (ITERATOR)
|-------HASH (UNIQUE)
|------------TABLE ACCESS (FULL)  

Doe this table access full means full table scan or full scan in partition?

Upvotes: 1

Views: 3681

Answers (1)

William Robertson
William Robertson

Reputation: 15991

It means it will scan the partition. (It could be one or more partitions.)

Look for "Viewing Partitioned Objects with EXPLAIN PLAN" in Database SQL Tuning Guide: Reading Execution Plans.

Upvotes: 2

Related Questions