Creating separate storage for temporary table spaces

You can dedicate a separate storage area for temporary table spaces on the Db2 pod to reduce I/O bottlenecks and improve performance.

Procedure

To create a storage volume for temporary table spaces, specify the storage volume in the Db2uCluster or Db2uInstance custom resource (CR) definition:
  • Use the name tempts for the storage volume
  • For storageClassName, specify the name of the storage class that you are using for data storage.

Examples

The following example shows the syntax to specify a separate storage area for temporary table spaces for a Db2uCluster CR. The storage class used in the example is ocs-storagecluster-ceph-rbd for OpenShift® Data Foundation.

apiVersion: db2u.databases.ibm.com/v1
kind: Db2uCluster
metadata:
  name: db2wh-sample
spec:
...
  storage:
    - name: tempts
      type: "template"
      spec:
        storageClassName: "ocs-storagecluster-ceph-rbd"
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
The following example shows the location of the temps storage area in a Db2uInstance CR:
spec:
...
  environment:
    databases:
    - name: BLUDB
      storage:
        - name: tempts
          type: template
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 10Gi
            storageClassName: ocs-storagecluster-ceph-rbd