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!

Partition query help

Status
Not open for further replies.

insurancereports

Programmer
Jul 31, 2003
10
US
Hello all,

I am trying to query against a tale that has many (hundreds) of partitions (Oracle 9i).

The usual way to query against a table with partitions is usually:

select * from table1 partition part_one;

But, I need to query the hundreds of partitions, around 50 at a time. Is there anyway that I could speed up the querying without having to write unions?
i.e.
select* from table1 partition part_one
union all
select * from table1 partition part_two;

thank you,
AM
 
Hi.
If you need "adjected" partitions check the execution plan for
Code:
select * 
from table1
where <your_partition_key> between <your_lowest_value> and <your_highest_value>
to see if the optimizer can prune partitions. If you have a list of partition keys you can use the IN-operator instead of BETWEEN.

Stefan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top