1 / 16

Estructuras de Almacenamiento y sus Relaciones

Estructuras de Almacenamiento y sus Relaciones. Estructuras Lógicas y Físicas. Bloque de Datos. Parámetros del Bloque - PCTFREE - PCTUSED - INITRAS - MAXTRAS. Estructura del bloque. Interacción PCTFREE y PCTUSED. Formato de un Row Piece. Migración Encadenamiento. registro. Nuevo reg.

gigi
Télécharger la présentation

Estructuras de Almacenamiento y sus Relaciones

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Estructuras de Almacenamiento y sus Relaciones

  2. Estructuras Lógicas y Físicas

  3. Bloque de Datos Parámetros del Bloque • - PCTFREE • - PCTUSED • - INITRAS • - MAXTRAS Estructura del bloque

  4. Interacción PCTFREE y PCTUSED

  5. Formato de un Row Piece

  6. Migración Encadenamiento registro Nuevo reg registro Viej r r r En el bloque original permanece el rowpiece con el apuntador a la nueva dirección

  7. Revisando Migración CREATE TABLE CHAINED_ROWS( OWNER_NAME VARCHAR2(30), TABLE_NAME VARCHAR(30), CLUSTAR_NAME VARCHAR(30), PARTITION_NAME VARCHAR(30), HEAD_ROWID ROWID, ANALYZE_TIMESTAMP DATE ); ANALYZE TABLE TABLA_NAME LIST CHAINED_ROWS; SELECT COUNT(*) FROM CHAINED_ROWS WHERE OWNER_NAME=’OWNER’ AND TABLE_NAME=’TABLE’;

  8. Eliminando Migración CREATE TABLE TABLE_NAME_TEMP AS SELECT * FROM OWNER.TABLE WHERE ROWID IN (SELECT HEAD_ROWID F FROM CHAINED_ROWS WHERE OWNER_NAME=’OWNER’ AND TABLE_NAME=’TABLE’); DELETE FROM OWNER.TABLE WHERE ROWID IN (SELECT HEAD_ROWID F FROM CHAINED_ROWS WHERE OWNER_NAME=’OWNER’ AND TABLE_NAME=’TABLE’); INSERT INTO OWNER.TABLE SELECT * FROM TABLE_NAME_TEMP; DROP TABLE TABLE_NAME_TEMP; DELETE FROM CHAINED_ROWS; ANALYZE TABLE OWNER.TABLE LIST CHAINED_ROWS;

  9. Estructuras Lógicas

  10. Manipulación de las estructuras ¿Cómo se manejan los extents en el tablespace? Diccionario de datos Localmente ¿Cómo se manejan los segmentos en tablespaces manejados localmente? Manual Automática ¿Cómo se asignan los extents? Manual Uniforme Autoallocate ¿Cómo se manejan los datafiles? Fijo Extensible

  11. ¿Cómo se manejan los extents en el tablespace? BMB BMB BMB … BMB BMB BMB … BMB … … … … Data block … Localmente (freelist o bitmap local) Diccionario de Datos … … … … { Extent Segment

  12. ¿Cómo se manejan los segmentos en tablespaces manejados localmente? Manual (PCTFREE, PCTUSE, FREELIST, FREELIST GROUPS). Automática PCTFREE = 10 FS2 FS3 FS1 FS1 FS2 Inserts,updates FS3 Deletes Deletes FS4 Full block Full block

  13. ¿Cómo se asignan los extents? Manual INITIAL NEXT PCTINCREASE MINEXTENTS Uniforme Autoallocate

  14. Reglas para tablespaces locally managed No clásula DEFAULT STORAGE →autoallocate. Clásula DEFAULT STORAGE  MINIMUM EXTENT=INITIAL=NEXT  PCTINCREASE=0 → uniforme ┐(MINIMUM EXTENT=INITIAL=NEXT  PCTINCREASE=0 ) →autoallocate no_especificado(MINIMUM EXTENT)  EXTENT=INITIAL=NEXT  PCTINCREASE=0 → uniforme no_especificado(MINIMUM EXTENT) ┐(INITIAL=NEXT  PCTINCREASE=0 ) →autoallocate

  15. Simple Algorithm for Fragmentation Elimination (SAFE) Oracle maneja bien segmentos con menos de 1024 extents Problema de fragmentación Recomendación Extentes uniformes de 4K, 128 K, 128M

  16. ¿Cómo se manejan los datafiles? Tamaño Fijo Extensibles

More Related