Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

BMC UNLOAD sorting w.r.t primary key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
vinuthna2004

New User


Joined: 30 Dec 2005
Posts: 6

PostPosted: Fri Oct 05, 2007 8:19 am    Post subject: BMC UNLOAD sorting w.r.t primary key
Reply with quote

We need to UNLOAD todays data from table-1 and LOAD into table-2 (this holds 1 weeks worth data). i.e after UNLOADing into a file, we will LOAD that file to table-2?

While UNLOADing data from table-1 using BMC utility, do we need to use 'ORDER BY' clause on SELECT statement to sort the primary keys?

My doubt is. Tables are defined with primary key always. So when we are loading, it will insert the rows into table taking primary key constraits. So why to use ORDER BY clause? Or will it take longer time for rearranging the loaded rows if ORDER BY clause is not given?
Back to top
View user's profile Send private message

vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 276
Location: Bang,iflex

PostPosted: Fri Oct 05, 2007 10:39 am    Post subject: Hi.
Reply with quote

Hi Vinutha......

ORDER BY statement gives you in which order the table data will be displayed in ASCENDING order or DESCENDEING order u must knw that default is ASCENDING order respective of the primary key definition.

I think u will be knowing that ASC or DESC parameter is given with INDEX key definition which helps the query to manipulate quickly.

If the table_2 is created in such a way, in which it contains all the attributes of table_1 sucha as data type, primary key definition as same as table_1 index should be created on the primary key to boost up your query. INDEX key will reduce your time and tune your query accodingly.


Regard's

Vasanth........ icon_smile.gif
Back to top
View user's profile Send private message
vinuthna2004

New User


Joined: 30 Dec 2005
Posts: 6

PostPosted: Wed Oct 10, 2007 10:07 pm    Post subject:
Reply with quote

Thanks for your advice. It was helpful
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us