long query

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
ratna
Participant
Posts: 16
Joined: Mon Aug 13, 2007 3:33 am

long query

Post by ratna »

hello guys,
i have a problem here..
i have a pretty loooong query.. and when i paste to the oracle stage, it only can accept half my query... what should i do?

thanks.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I think you get a Windows error message when you do that, something to the effect that the data size exceeds the allocated space and it tells you the number of bytes. There is no solution but to reduce the query size. You can shorten the query (Use x.KeyCol instead of FullyQualfiedTablePathAndNameAsUsedInDevelopmentV2.KeyCol) or perhaps store the query in Oracle and reference that by name.
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

If this is a complex query with a lot of joins, subqueries, etc. versus many, many columns, you could also review the design of the query itself. If there are many joins perhaps these could be done in DataStage instead of in Oracle. SQL that cannot fit within the Oracle stage probably has some maintainability issues due to it's complexity. I can see all the heavy lifting being done in a single humongous SQL because of perceived performance reasons or resource constraints but is this really the case? Can you simplify by re-writing pieces in DataStage? Will the resources of your DS Server support doing that? Right size it.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

And, if none of those works, assemble your long query into a stored procedure and call the stored procedure from DataStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or, more simply, a view. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
dspxlearn
Premium Member
Premium Member
Posts: 291
Joined: Sat Sep 10, 2005 1:26 am

Post by dspxlearn »

If you have Unions split it into multiple stages. And if there are Joins in the Sql, use the stages as required.
Thanks and Regards!!
dspxlearn
dspxlearn
Premium Member
Premium Member
Posts: 291
Joined: Sat Sep 10, 2005 1:26 am

Post by dspxlearn »

If you have Unions split it into multiple stages. And if there are Joins in the Sql, use the stages as required.
Thanks and Regards!!
dspxlearn
Post Reply