Operating System - HP-UX
1748000 Members
4525 Online
108757 Solutions
New Discussion

Re: tablespace/datafile layout

 
Volker Borowski
Honored Contributor

Re: tablespace/datafile layout

Hi,

In the old days a SAP application was installed with seperate TS for
SYSTEM / TEMP / ROLLBACK.
This is the still the same for new releases. (and it still makes a good sense)

Concerning the data, the old layout seperated
masterdata and transactiondata and had seperate indexes for each as well.
The idea was, that an application usually reads masterdata to access corresponding transactiondata afterwards so the goal was to minimize disk-head movements. This was the time of xxxMB or xxxxMB disks.

Typically we now have 70GB or 140GB disks in raid or stripe configuration. So the IO is done in parallel anyway and we have lots of diskcache on each disk in addition. So do not care about it any more.

The new layout for SAP seperates only data, that might need to be frequently deleted to avoid fragmentation. I.E. the release dependend data is in a single tablespace and when you upgrade the application you get a new tablespace and drop the old one.

It is worth to seperate queue-like tables/indexes, that get a lot of deletes and inserts for the same reason. -> These might require reorgs for fragmentation reasons. Keeping them seperate avoids to drill holes in your datafiles.

As far as distribution of storage is required, a tablespace does not really have to do with the location on disk any more.
You can manage it on datafile level like
ALTER TABLE ALLOCATE EXTENT IN DATAFILE ...
but who likes to do so, if the datafiles are striped ?

I agree with your point of the backup access for big datafiles. This is a reason to have a few more of them to balance the backup sessions. I also agree, that a lot of datafiles is costy for a checkpoint. (there is always one death to die).

Concerning the point where data of a table is located, keep in mind that due to the use of partitions a table does not need to reside only in a single tablespace any more.
This is still valid for non-partitioned tables, but if a table is partitioned it can very well spread about several tablespaces. http://www.bikle.com/TThier/DBAtips/partitionDemo1.html

Summary:
1) I'd vote for a reasonable number of datafiles (for backup and handling reasons).
In fact I still stay with 2000M datafiles, because I faced some 2GB bugs in the early days of this boundary being broken.
2) I'd never care in which tablespace they are beside they might be reorg-candidates.

No real hard data to decide...
Make your choice :-)
Volker