Page 1 of 1

Reading From DB2 Enterprise stage

Posted: Thu May 08, 2008 12:46 am
by sudeepmantri
Hi,
I am reading from Db2 Enterprise stage using "USER_DEFINED" query. The stage is operating in Sequential mode.

Is there any way by which I can make it operate in parallel so that data fetch can be optimized.


Regards,
Sudeep.

Posted: Thu May 08, 2008 12:55 am
by ray.wurlod
No. SQL is always sequential unless selecting from a partitioned table. I believe (without proof) that user-defined SQL is always sequential.

Posted: Thu May 08, 2008 1:08 am
by sudeepmantri
Yes thats true.
User defined SQL is always Sequential.
But My table is partitioned.
Is there any method by which I can atleast write SQL such that it reads from the 2 partitions simultaneously??

Posted: Thu May 08, 2008 9:02 am
by miwinter
Hi,

Yes, you can read from your table in parallel. Add in the option of Partition Table and input the fully qualified table name. This will access your table according to the partitioning defined upon it.

Posted: Thu May 08, 2008 10:51 am
by Minhajuddin
ray.wurlod wrote:No. SQL is always sequential unless selecting from a partitioned table. I believe (without proof) that user-defined SQL is always sequential. ...
Is this specific to DB2?

Because I have seen jobs with user-defined SQL run in Parallel mode when a Partition table property is added in case of Oracle Enterprise stage. However, the name of the partition table and the table used in user-defined SQL. I had once given a synonym in the partition table property and the actual name in the user-defined SQL and the job aborted with a lot of ugly warnings.