开发者

Tablespace after Create Table. What does it mean?

Im rea开发者_开发技巧ding some Oracle scripts, and I found one with this

Create Table XXY(...)

Tablespace SOME_TABLESPACE
....
NOCOMPRESS
NOPARALLEL
..

What does this mean? What is if for? There are many CreateTable statemsnts, but the Tablespace statement after is exactly the same.

As I understand SOME_TABLESPACE must exist when this script is excecuted, but thats all I could get. Is the purpose of the statement to store all the tables in the same place?

EDIT I read this

http://www.adp-gmbh.ch/ora/concepts/tablespaces.html


"Same place" doesn't quite describe it ...

A tablespace is a grouping of common data files. With your "Create" statements you can define in which tablespace an object gets stored. Usually different types of oracle objects are stored in different tablespaces that can have different capabilities.

Some examples:

  • "Data" (your tables and the rows stored in these tables) are stored in a different tablespace than "system information" (such as transaction logs or "caches"). This allows you to store system information on a local drive (quick, but somewhat limited in space) and data in a Storage Area network (basically unlimited space, but not quite as fast).
  • Table Data and Indexes can be stored in different tablespaces which may be on different disks. Therefore, table lookup and index lookup can use different disks and be faster than if both were on the same disk.

Tablespaces and their different characteristics are oen of the many ways of tuning an Oracle DB. Lots of capabilities, lots of complexity. If all you're doing is a little development machine, there is little need to worry about it.


It creates the table in that tablespace. In the case of partitioned tables it defines that tablespace as the default for new partitions and subpartitions also.


Please read:

http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜