Hi markgeer,
Thx for your detailed reply. Some doubts
1) why do one wish to seperate the table and index tablespaces? OR even something like small, big, medium..??
2) why not define tablespace for each oracle dbuser? By having tablespace for each oracle dbuser, one can clearly identify which tablespace is bundled with which dbuser.
Main Topics
Browse All Topics





by: markgeerPosted on 2006-04-17 at 06:19:44ID: 16468807
Usually no maintenance or tuning is required on tablespaces *IF* they were initially created based on a plan to use tablespaces wisely and efficiently. This planning work must be done before the tablespaces are created, and before the tables and indexes are assigned to tablespaces.
I'm assuming you are talking about "locally-managed" tablespaces, with equally-sized extents in each tablespace, and not the older "dictionary-managed" tablespaces tablespaces. I don't recommend them at all.
In a simple system, you will need just three manually-created tablespaces in addition to the default ones in Oracle, and you can name them: small, medium and large. They will have different extent sizes, and you then place your tables and indexes into an appropriate tablespace based on the size of the table/index. Many DBAs like to have tables and indexes separate from each other, so you may want six tablespaces for your application, with three for indexes and three for tables.
What exact sizes should you use for extents in your "small", "medium" and "large" tablespaces, and what should the size of the datafiles be? That will vary depending on your numbers of tables and indexes, your disk system and your OS. For example, your OS and/or disk system may or may not be able to support individual datafiles over 2GB in size, so that may be a constraint you have to work around. If that is an issue, you may need multiple separate datafiles per tablespace, or you may want multiple tablespaces of each size.
We use a slightly more complex system for tablespaces, with five different sizes: small, medium-small, medium, medium-large, and large. We also have separate tablespaces for tables and indexes. Because of the number of tables in our application, and our desire to have just one datafile per tablepace and to keep the individual datafiles under 2GB, we have multiple tablespaces for some of the sizes. Just FYI, we using the following extent sizes, but you may want other sizes depending on your data volumes and/or your block sizes:
Tables Indexes
small 8k 8k
medium-small 40k 20k
medium 400k 200k
medium-large 4000k 2000k
large 40000k 20000k
If your application has any tables that are used for large amounts of transactions, then the tables are deleted (or truncated) before the next interface or batch job, you will want to separate these tables from the more permanent tables, probably into a "work" or "scratch" tablespace, so these objects don't cause excessive fragmentation among your more-permanent objects.