| As a review, the following list is the physical and logical data structures that Oracle uses. This is taken out of the Oracle 8i DBA Handbook - Internal database structures - a very brief overview of all Oracle internal structures:
- Tables, columns, constraints, datatypes
- Partitions & subpartitions
- Breaking up larger tables into smaller ones based on particular value
- Helps performance because optimizer will know where to look for particular entries
- Large partitions can be further subpartitioned.
- Index partitions – same concept
- Local: partitions match the table partitions
- Global: partitions don’t match the table partitions.
- Users
- Indexes, clusters, & hash clusters
- Views
- Sequences
- Procedures, functions, packages, and triggers.
- Synonyms
- Privileges and roles
- Database links
- Segments, extents, and blocks
- Rollback segments
- Snapshots and materialized views.
- Snapshot provides data replication from a remote database based on a query. Can be scheduled, read-only or updateable.
- Materialized view provides the same functionality for local databases. Apparently, the optimizer decides when to use a materialized view vs running the query as is.
- Internal memory structures
- System global area: Primarily composed of:
- Data block buffers: Holds the data. This is the cache hit/miss thing you keep hearing about.
- Redo log buffer: Redo log buffer: Tracks changes to the database.
- Shared sql pool: Important parts of which:
- Dictionary cache: Holds the dictionary. If the cache is too small, data dictionary will be queried, resulting in a recursive call.
- Library cache (sql & pl/sql parsed statements)
- The large pool: Optional memory area used to store large sql statements commonly used in backups, etc.
- The Java pool
- Multiple buffer pools
- Context areas
- Program global area (PGA): Used to store real values in place of bind variables for executing SQL code.
- Background processes:
- smon: System monitor
- Responsible for database recovery
- Coalesces contiguous extents (pctincrease = 0 in tables)
- pmon: User process monitor – cleans up failed user processes.
- dbwr: Database writer – manages the data block buffer cache.
- lgwr: Log writer – writes the redo log buffer cache to the redo logs.
- chkp: Checkpoints:
- Causes dbwr to write all dirty data blocks to disk
- Update the data file headers & control file with the timestamp of the checkpoint.
- arch: Archives redo logs before lgwr overwrites them.
- reco: Attempts to resolve problems with distributed databases.
- snp#: Snapshot refreshes
- lck# Lock processes for interinstance locking.
- S### Server processes: Executes data reads from disk on behalf of user processes in an MTS environment.
- D### Dispatcher processes: Connects user processes from SQL*Net listender via dispatcher to server (S###) process.
- P##: Parallel Query server processes:
- External structures:
- Files: Tablespace files are considered both internal, since they’re used for tablespaces, and external, since they’re OS dependent.
- Redo logs:
- A log of everything that happens on the database.
- Used in the event of a database crash
- Control files
- Contains the entire architecture of the database. Very important
- Maintained on separate disks (hopefully)
- Trace files – all background processes create trace files; used for indepth troubleshooting.
- Alert log: Alert log keeps track of major database events. Should be monitored daily
|
|