Apress.Expert.Oracle.Database.Architecture.9i.and.10g.Programming.Techniques.and.Solutions.Sep.2005
CHAPTER 10 ■ DATABASE TABLES 419 We looked at cluster objects, of which Oracle has three kinds: index, hash, and sorted hash. The goals of the cluster are twofold: • To give us the ability to store data from many tables together on the same database block(s). • To give us the ability to force like data to be stored physically “together” based on some cluster key. In this fashion all of the data for department 10 (from many tables) may be stored together. These features allow us to access related data very quickly, with minimal physical I/O. We observed the main differences between index clusters and hash clusters, and discussed when each would (and would not) be appropriate. Next, we moved on to cover nested tables. We reviewed the syntax, semantics, and usage of nested tables. We saw how they are in a fact a system-generated and -maintained parent/ child pair of tables, and we discovered how Oracle physically does this for us. We looked at using different table types for nested tables, which by default use a heap-based table. We found that there will probably never be a reason not to use an IOT instead of a heap table for nested tables. Then we looked into the ins and outs of temporary tables, including how to create them, where they get their storage from, and the fact that they introduce no concurrency-related issues at runtime. We explored the differences between session-level and transaction-level temporary tables, and we discussed the appropriate method for using temporary tables in an Oracle database. This chapter finished with a look at the inner workings of object tables. As with nested tables, we discovered there is a lot going on under the covers with object tables in Oracle. We discussed how object views on top of relational tables can give us the functionality of an object table, while at the same time offering easy access to the underlying relational data.
- Page 413 and 414: 368 CHAPTER 10 ■ DATABASE TABLES
- Page 415 and 416: 370 CHAPTER 10 ■ DATABASE TABLES
- Page 417 and 418: 372 CHAPTER 10 ■ DATABASE TABLES
- Page 419 and 420: 374 CHAPTER 10 ■ DATABASE TABLES
- Page 421 and 422: 376 CHAPTER 10 ■ DATABASE TABLES
- Page 423 and 424: 378 CHAPTER 10 ■ DATABASE TABLES
- Page 425 and 426: 380 CHAPTER 10 ■ DATABASE TABLES
- Page 427 and 428: 382 CHAPTER 10 ■ DATABASE TABLES
- Page 429 and 430: 384 CHAPTER 10 ■ DATABASE TABLES
- Page 431 and 432: 386 CHAPTER 10 ■ DATABASE TABLES
- Page 433 and 434: 388 CHAPTER 10 ■ DATABASE TABLES
- Page 435 and 436: 390 CHAPTER 10 ■ DATABASE TABLES
- Page 437 and 438: 392 CHAPTER 10 ■ DATABASE TABLES
- Page 439 and 440: 394 CHAPTER 10 ■ DATABASE TABLES
- Page 441 and 442: 396 CHAPTER 10 ■ DATABASE TABLES
- Page 443 and 444: 398 CHAPTER 10 ■ DATABASE TABLES
- Page 445 and 446: 400 CHAPTER 10 ■ DATABASE TABLES
- Page 447 and 448: 402 CHAPTER 10 ■ DATABASE TABLES
- Page 449 and 450: 404 CHAPTER 10 ■ DATABASE TABLES
- Page 451 and 452: 406 CHAPTER 10 ■ DATABASE TABLES
- Page 453 and 454: 408 CHAPTER 10 ■ DATABASE TABLES
- Page 455 and 456: 410 CHAPTER 10 ■ DATABASE TABLES
- Page 457 and 458: 412 CHAPTER 10 ■ DATABASE TABLES
- Page 459 and 460: 414 CHAPTER 10 ■ DATABASE TABLES
- Page 461 and 462: 416 CHAPTER 10 ■ DATABASE TABLES
- Page 463: 418 CHAPTER 10 ■ DATABASE TABLES
- Page 467 and 468: 422 CHAPTER 11 ■ INDEXES An Overv
- Page 469 and 470: 424 CHAPTER 11 ■ INDEXES Figure 1
- Page 471 and 472: 426 CHAPTER 11 ■ INDEXES big_tabl
- Page 473 and 474: 428 CHAPTER 11 ■ INDEXES analyze
- Page 475 and 476: 430 CHAPTER 11 ■ INDEXES Before w
- Page 477 and 478: 432 CHAPTER 11 ■ INDEXES ( s.next
- Page 479 and 480: 434 CHAPTER 11 ■ INDEXES Table 11
- Page 481 and 482: 436 CHAPTER 11 ■ INDEXES Oracle w
- Page 483 and 484: 438 CHAPTER 11 ■ INDEXES In the s
- Page 485 and 486: 440 CHAPTER 11 ■ INDEXES 6 end lo
- Page 487 and 488: 442 CHAPTER 11 ■ INDEXES In my da
- Page 489 and 490: 444 CHAPTER 11 ■ INDEXES The resu
- Page 491 and 492: 446 CHAPTER 11 ■ INDEXES have the
- Page 493 and 494: 448 CHAPTER 11 ■ INDEXES laid out
- Page 495 and 496: 450 CHAPTER 11 ■ INDEXES Select c
- Page 497 and 498: 452 CHAPTER 11 ■ INDEXES This exa
- Page 499 and 500: 454 CHAPTER 11 ■ INDEXES column i
- Page 501 and 502: 456 CHAPTER 11 ■ INDEXES ■Note
- Page 503 and 504: 458 CHAPTER 11 ■ INDEXES ops$tkyt
- Page 505 and 506: 460 CHAPTER 11 ■ INDEXES Now that
- Page 507 and 508: 462 CHAPTER 11 ■ INDEXES Fetch 0
- Page 509 and 510: 464 CHAPTER 11 ■ INDEXES 2 from e
- Page 511 and 512: 466 CHAPTER 11 ■ INDEXES ops$tkyt
- Page 513 and 514: 468 CHAPTER 11 ■ INDEXES Executio
CHAPTER 10 ■ DATABASE TABLES 419<br />
We looked at cluster objects, of which <strong>Oracle</strong> has three kinds: index, hash, <strong>and</strong> sorted<br />
hash. The goals of the cluster are twofold:<br />
• To give us the ability to store data from many tables together on the same database<br />
block(s).<br />
• To give us the ability to force like data to be stored physically “together” based on some<br />
cluster key. In this fashion all of the data for department 10 (from many tables) may be<br />
stored together.<br />
These features allow us to access related data very quickly, with minimal physical I/O. We<br />
observed the main differences between index clusters <strong>and</strong> hash clusters, <strong>and</strong> discussed when<br />
each would (<strong>and</strong> would not) be appropriate.<br />
Next, we moved on to cover nested tables. We reviewed the syntax, semantics, <strong>and</strong> usage<br />
of nested tables. We saw how they are in a fact a system-generated <strong>and</strong> -maintained parent/<br />
child pair of tables, <strong>and</strong> we discovered how <strong>Oracle</strong> physically does this for us. We looked at<br />
using different table types for nested tables, which by default use a heap-based table. We<br />
found that there will probably never be a reason not to use an IOT instead of a heap table for<br />
nested tables.<br />
Then we looked into the ins <strong>and</strong> outs of temporary tables, including how to create them,<br />
where they get their storage from, <strong>and</strong> the fact that they introduce no concurrency-related<br />
issues at runtime. We explored the differences between session-level <strong>and</strong> transaction-level<br />
temporary tables, <strong>and</strong> we discussed the appropriate method for using temporary tables in an<br />
<strong>Oracle</strong> database.<br />
This chapter finished with a look at the inner workings of object tables. As with nested<br />
tables, we discovered there is a lot going on under the covers with object tables in <strong>Oracle</strong>. We<br />
discussed how object views on top of relational tables can give us the functionality of an<br />
object table, while at the same time offering easy access to the underlying relational data.