Oracle Partitioned Table

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mali_aydin
Charter Member
Charter Member
Posts: 6
Joined: Fri May 05, 2006 6:57 am

Oracle Partitioned Table

Post by mali_aydin »

Hi,
I have a partitioned Oracle table that partitioned by the monthly. How can I read only one partition via the Parallel Job.



Best Regards
MAli
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can hard code this partition into the table name. You could also create a parameter which represents the name and feed it into the job.

But I doubt if that was what you were really asking.
Mamu Kim
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Post by seanc217 »

How about a where clause on the partition key column. This will be very efficient.

I have a partitioned table that is partitioned on column extract_date. When I select out of it I select where extract = YYYYMMDD.

Hope this helps.
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Re: Oracle Partitioned Table

Post by prabu »

mali_aydin wrote:Hi,
I have a partitioned Oracle table that partitioned by the monthly. How can I read only one partition via the Parallel Job.
Best Regards
MAli
You need not specify the partition , if you have a "where clause" that confines your data within the partition. Say you have a month partition and your query has a "where clause" like month_id='AUG.2006", then the oracle optimizer is intelligent enough to access only that partition.

if your "where clause" doesnt have the month where clause, then specifiy the "PARTITION CLAUSE" in the select statement

regards,
Prabu
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Create user-defined sql query in the where clause assign a parameter with #month# and while running the job supply the month value. Oracle will then automatically does the magic...
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Post Reply