16.10.2015 Views

Getting Started with IBM Data Studio for DB2

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3 – Maintaining the database 105<br />

When a query runs, the <strong>DB2</strong> system fetches the required data into main memory <strong>for</strong><br />

processing. The memory areas used to fetch the data from storage are called buffer pools.<br />

Again, because the per<strong>for</strong>mance requirements of tables and applications can differ, you<br />

may wish to have more control over memory usage by different tables.<br />

This section will define these storage and memory areas and explain how you can create<br />

and work <strong>with</strong> them.<br />

3.2.1 Creating and managing table spaces<br />

A table space is a logical database object that maps the logical objects like tables, indexes,<br />

and so on, to the physical storage memory. It consists of containers, which could be an<br />

operating system file, directory, or a raw device. In this section, we will concentrate on files<br />

and containers. Raw devices, although supported, are not widely used in a typical<br />

database due to advances in disk and file system per<strong>for</strong>mance.<br />

A <strong>DB2</strong> data server can have multiple types of table spaces depending on how the memory<br />

is managed and how the containers are defined:<br />

<br />

<br />

<br />

A system-managed table space is managed by the operating system and can have<br />

directories as its containers.<br />

A database-managed table space is managed by the database manager and can have<br />

files and raw devices as its containers.<br />

An automatic storage table space is the alternative system-managed and databasemanaged<br />

storage in which <strong>DB2</strong> itself manages the containers. You just need to specify<br />

the path where the containers should be created and the maximum size that the <strong>DB2</strong><br />

server can use <strong>for</strong> these containers.<br />

A table space can also be categorized based on the type of data it stores–regular, large, or<br />

temporary.<br />

3.2.1.1 Creating a table space<br />

To create a table space by using <strong>Data</strong> <strong>Studio</strong>:<br />

1. Right-click the Table Spaces folder and select Create Regular Table Space, as<br />

shown in Figure 3.2.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!