If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > create user table in a table space?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-29-12, 07:24
ratnalein ratnalein is offline
Registered User
 
Join Date: May 2012
Posts: 151
create user table in a table space?

Hallo everyone,

I have succeded create an instance and a database, I am about to create a table now. As I look in the documentation, there is an interesting issue I am concerning about:

Should I create a table in a particular table space? What would be the differences if I dont put my table in a particular table space? And if I do create a table in a table space, should I create the table space first or I should create the table in the table spaces created from CREATE DATABASE?

Thank you for the comments.

Regards,
Ratna
Reply With Quote
  #2 (permalink)  
Old 06-29-12, 08:38
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,721
Each table is always in some table space. If you do not specify a table space explicitly in the CREATE TABLE statement, DB2 will choose a table space for you. The rules used for that are documented for the CREATE TABLE statement.

Which table space you choose depends on your requirements for managing the table objects and underlying storage (like important tables on fast devices etc.)
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 06-29-12, 11:50
ratnalein ratnalein is offline
Registered User
 
Join Date: May 2012
Posts: 151
Hallo stolze,

thank you for the comment. The table space is not a must. I think, for beginner, this should also not be an issue too? Rather the issue for the administration than application admin, I think.

Viele Grüße,
Ratna
Reply With Quote
  #4 (permalink)  
Old 07-02-12, 02:27
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,755
yes, tablespace is a must
if not specified, you will have no control where the table will be created
most of the time, in a tablespace you did not wanted to use for this table
always specify the ts for create table ....
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #5 (permalink)  
Old 07-02-12, 07:49
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,721
I agree that placement of tables is a question for the database administrator. The application developer/admin shouldn't be concerned about that. But the app admin should talk to the dba so that the proper choices can be made correctly because the dba may not know the access profile of your application.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On