IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how many tablespace DB2 have?


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
haZardo0us

New User


Joined: 20 Apr 2006
Posts: 7

PostPosted: Thu Aug 10, 2006 4:29 pm
Reply with quote

how many tablespace do DB2 have?
which DB2's subsystem is the load module of a program embeded SQL stored?
thanks, in advance~~
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Thu Aug 10, 2006 4:55 pm
Reply with quote

For your first question,
there are 3 table spaces .1.simple,2.segmented,3.partitioned.
I am not clear about your second question.

Regards,
Muthuvel.
Back to top
View user's profile Send private message
haZardo0us

New User


Joined: 20 Apr 2006
Posts: 7

PostPosted: Fri Aug 11, 2006 7:15 am
Reply with quote

thanks very much for your help~~
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Fri Sep 08, 2006 4:51 pm
Reply with quote

Hi muthuvel, can you please let me know what is
simple, segmented, and partitioned tablespaces.

Thanks!
Rathna.
Back to top
View user's profile Send private message
venkatm99

New User


Joined: 01 Jun 2006
Posts: 23
Location: Sinagpore

PostPosted: Thu Sep 14, 2006 12:21 pm
Reply with quote

TABLE SPACE
----------------

Simple table space
-----------------------
In the early days of DB2 on the mainframe, there were only two types of table spaces; simple was one of them. You could put multiple tables into the simple table space, but there was no way to automatically segregate the rows of one table from the rows of another. Therefore, rows of two (or more) tables could be interleaved on a single page. When DB2 used a table-space scan to access the rows of one table, it actually had to read all of the rows of every table in the space. Maintaining the cluster order of the tables was difficult, if not impossible. Even if there was only one table in the table space, the performance wasn't as good as it could be for inserts or mass deletes. IBM recommends that you no longer use simple table spaces.

Segmented table space
----------------------------

DB2 V2R1 introduced a smarter type of table space. Today, a new parameter (SEGSIZE) allows the DBA to allocate a second type of table space, one with pages grouped by segment. And one segment can only belong to one table. A table-space scan can now identify, at the segment level, which segments to scan; a table-space scan is actually a table scan. Oddly enough, even if there's only one table in the table space, the segmented table space is better because the information needed for insert logic is twice as robust. Also, rows can be mass deleted by merely maintaining entries in a space-map page rather than accessing, locking, and logging the maintenance of each individual page and row. And there are other benefits of the segmented table space; for example, the image copy utility recognizes which pages are active and which are not, and only backs up the active ones.

Partitioned table space
--------------------------

The other type of table space that has been around from the beginning is the partitioned table space. Because DB2 datasets are really VSAM files and because the maximum size of a VSAM file allocation back in those days was 4GB, there needed to be a style of table space that could control more than one allocation gracefully. The partitioned table space allows the DBA to control the fragmentation of data when the table size exceeds 4GB.
In our analogy, the three table-space types represent the architectural concepts of the types of houses we are going to build in Happy Acres: basic ranch-style houses, three-story colonials, and condominiums with multiple towers. In other words, we have three basic architectural drawings and, with minor modifications to each, we can build many unique structures in our new subdivision.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts force tablespace using LISTDEF input DB2 1
No new posts Map VSAM Dataset to a Table/Tablespace DB2 5
No new posts DB2 tablespace space limitation DB2 3
No new posts Issue While Recovering a Tablespace DB2 4
No new posts Need inputs on DB2 tablespace/table r... DB2 3
Search our Forums:

Back to Top