Q
Problem solve Get help with specific problems with your technologies, process and projects.

Multiple tablespaces or one tablespace with multiple datafiles?

Is it better to have multiple tablespaces than one tablespace with multiple datafiles? I'm on a Windows platform so I try to keep my datafiles to a 2GB max. Is it not a performance penalty to have only one tablespace with many datafiles for all the objects?

Is it better to have multiple tablespaces than one tablespace with multiple datafiles? I'm on a Windows platform so I try to keep my datafiles to a 2GB max. Is it not a performance penalty to have only one tablespace with many datafiles for all the objects?

I usually do not take performance into account when deciding the number of tablespaces or datafiles, for the most part. You should use your tablespaces to logically segregate your segments. For instance, the HR application's data is in one tablespace and the Accounts Receivable data is in another tablespace. Also keep in mind that your tablespace is the smallest unit of backup you should be performing. If your database is very large, then you might back up one tablespace tonight and another tablespace tomorrow night. From a manageability perspective, I prefer one datafile per tablespace, but that is not possible in many situations. Provided your OS supports files larger than 2GB, the max datafile size is 32GB for a tablespace defined with an 8K block size and 64GB for a tablespace defined with a 16K block size. So if your tablespace is larger than these max file sizes, you will need multiple datafiles.

When I do think about performance, I keep two things in mind. You can spread out an I/O load by placing your tablespace's datafiles on different disk units. You can also use one of the RAID levels that implements striping to perform this action for you automatically.

Another performance problem, which typically only presents itself with very large databases, concerns the checkpoint process, CKPT. When a checkpoint occurs, the database writes changed blocks in the buffer cache to their datafiles. The CKPT process also updates all datafiles with the latest SCN of the checkpoint, even if that file had no changed blocks. The more datafiles you have, the longer it will take CKPT to complete this process. So if your database is very large, you may want to start using the max datafile size your tablespace can support. Note: CKPT will not update the datafiles that are part of a READ ONLY tablespace.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close