Category: Uncategorized

  • How Advanced Index Compression Works

    Advanced index compression works at the block level to provide the best compression for each block. The database uses the following technique:

    • During index creation, as a leaf block becomes full, the database automatically compresses the block to the optimal level.
    • When reorganizing an index block as a result of DML, if the database can create sufficient space for the incoming index entry, then a block split does not occur. During DML without advanced index compression, however, an index block split always occurs when the block becomes full.

    Advanced Index Compression HIGH

    managed it services

    In releases previous to Oracle Database 12c Release 2 (12.2), the only form of advanced index compression was low compression (COMPRESS ADVANCED LOW). Now you can also specify high compression (COMPRESS ADVANCED HIGH), which is the default. Advanced index compression with the HIGH option offers the following advantages:

    mobile app development

    • Gives higher compression ratios in most cases, while also improving performance for queries that access the index
    • Employs more complex compression algorithms than advanced low
      quote
    • Stores data in a compression unit, which is a special on-disk format

    Note

    When you apply HIGH compression, all blocks have compression. When you apply LOW compression, the database may leave some blocks uncompressed. You can use statistics to determine how many blocks were left uncompressed.

    Example 3-5 Creating an Index with Advanced High Compression

    This example enables advanced index compression for an index on the hr.employees table:

    CopyCREATE INDEX hr.emp_mndp_ix
      ON hr.employees(manager_id, department_id)
      COMPRESS ADVANCED;

    The following query shows the type of compression:

    CopySELECT COMPRESSION FROM DBA_INDEXES WHERE INDEX_NAME ='EMP_MNDP_IX';
    
    COMPRESSION
    -------------
    ADVANCED HIGH

    school management

  • Specifying Database Block Sizes

    The DB_BLOCK_SIZE initialization parameter specifies the standard block size for the database.

    oracle java training courses malaysia

    • Set the DB_BLOCK_SIZE initialization parameter.

    java programming training courses malaysia

    This block size is used for the SYSTEM tablespace and by default in other tablespaces. Oracle Database can support up to four additional nonstandard block sizes.

    dynamics 365 marketing training courses malaysia

    • DB_BLOCK_SIZE Initialization Parameter
      The most commonly used block size should be picked as the standard block size. In many cases, this is the only block size that you must specify.
    • Nonstandard Block Sizes
      You can create tablespaces of nonstandard block sizes.

    java ee enterprise edition training courses malaysia

  • Advanced Index Compression

    Starting with Oracle Database 12c Release 1 (12.1.0.2), advanced index compression improves on traditional prefix compression for supported indexes on heap-organized tables.

    infrastructure services

    Benefits of Advanced Index Compression

    Prefix compression has limitations for types of indexes supported, compression ratio, and ease of use. Unlike prefix compression, which uses fixed duplicate key elimination for every block, advanced index compression uses adaptive duplicate key elimination on a per-block basis. The main advantages of advanced index compression are:

    it consulting

    • The database automatically chooses the best compression for each block, using a number of internal algorithms such as intra-column level prefixes, duplicate key elimination, and rowid compression. Unlike in prefix compression, advanced index compression does not require the user to know data characteristics.
      it support
    • Advanced compression works on both non-unique and unique indexes. Prefix compression works well on some non-unique indexes, but the ratios are lower on indexes whose leading columns do not have many repeats.
    • The compressed index is usable in the same way as an uncompressed index. The index supports the same access paths: unique key lookups, range scans, and fast full scans.
    • Indexes can inherit advanced compression from a parent table or containing tablespace.

    loyalty

  • Specifying Control Files

    Every database has a control file, which contains entries that describe the structure of the database (such as its name, the timestamp of its creation, and the names and locations of its data files and redo files). The CONTROL_FILES initialization parameter specifies one or more names of control files, separated by commas.

    kubernetes training courses malaysia

    • Set the CONTROL_FILES initialization parameter.

    When you execute the CREATE DATABASE statement, the control files listed in the CONTROL_FILES parameter are created.

    juniper networks training courses malaysia

    If you do not include CONTROL_FILES in the initialization parameter file, then Oracle Database creates a control file in the same directory as the initialization parameter file, using a default operating system–dependent file name. If you have enabled Oracle Managed Files, the database creates Oracle managed control files.

    jboss training courses malaysia

    If you want the database to create new operating system files when creating database control files, the file names listed in the CONTROL_FILES parameter must not match any file names that currently exist on your system. If you want the database to reuse or overwrite existing files when creating database control files, ensure that the file names listed in the CONTROL_FILES parameter match the file names that are to be reused, and include a CONTROLFILE REUSE clause in the CREATE DATABASE statement.

    Oracle strongly recommends you use at least two control files stored on separate physical disk drives for each database.

    jboss enterprise application platform training courses malaysia

  • Specifying a Fast Recovery Area

    The Fast Recovery Area is a location in which Oracle Database can store and manage files related to backup and recovery. It is distinct from the database area, which is a location for the current database files (data files, control files, and online redo logs).

    Kubernetes containerization training courses malaysia

    Specify the Fast Recovery Area with the following initialization parameters:

    • DB_RECOVERY_FILE_DEST: Location of the Fast Recovery Area. This can be a directory, file system, or Automatic Storage Management (Oracle ASM) disk group.In an Oracle Real Application Clusters (Oracle RAC) environment, this location must be on a cluster file system, Oracle ASM disk group, or a shared directory configured through NFS.
    • DB_RECOVERY_FILE_DEST_SIZE: Specifies the maximum total bytes to be used by the Fast Recovery Area. This initialization parameter must be specified before DB_RECOVERY_FILE_DEST is enabled.

    cloud computing training courses malaysia

    In an Oracle RAC environment, the settings for these two parameters must be the same on all instances.

    You cannot enable these parameters if you have set values for the LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST parameters. You must disable those parameters before setting up the Fast Recovery Area. You can instead set values for the LOG_ARCHIVE_DEST_n parameters.

    ai artificial intelligence training courses malaysia

    Oracle recommends using a Fast Recovery Area, because it can simplify backup and recovery operations for your database.

    lean it certification training courses malaysia

  • Index Compression

    To reduce space in indexes, Oracle Database can employ different compression algorithms.

    Prefix Compression

    Oracle Database can use prefix compression, also known as key compression, to compress portions of the primary key column values in a B-tree index or an index-organized table. Prefix compression can greatly reduce the space consumed by the index.

    erp

    An uncompressed index entry has one piece. An index entry using prefix compression has two pieces: a prefix entry, which is the grouping piece, and a suffix entry, which is the unique or nearly unique piece. The database achieves compression by sharing the prefix entries among the suffix entries in an index block.

    feature

    Note

    If a key is not defined to have a unique piece, then the database provides one by appending a rowid to the grouping piece.

    By default, the prefix of a unique index consists of all key columns excluding the last one, whereas the prefix of a nonunique index consists of all key columns. Suppose you create a composite, unique index on two columns of the oe.orders table as follows:

    CopyCREATE UNIQUE INDEX orders_mod_stat_ix ON orders ( order_mode, order_status );
    

    In the preceding example, an index key might be online,0. The rowid is stored in the key data portion of the entry, and is not part of the key itself.

    financial

    Note

    If you create a unique index on a single column, then Oracle Database cannot use prefix key compression because no common prefixes exist.

    Alternatively, suppose you create a nonunique index on the same columns:

    CopyCREATE INDEX orders_mod_stat_ix ON orders ( order_mode, order_status );
    

    Also assume that repeated values occur in the order_mode and order_status columns. An index block could have entries as shown in the follow example:

    Copyonline,0,AAAPvCAAFAAAAFaAAa
    online,0,AAAPvCAAFAAAAFaAAg
    online,0,AAAPvCAAFAAAAFaAAl
    online,2,AAAPvCAAFAAAAFaAAm
    online,3,AAAPvCAAFAAAAFaAAq
    online,3,AAAPvCAAFAAAAFaAAt
    

    In the preceding example, the key prefix would consist of a concatenation of the order_mode and order_status values, as in online,0. The suffix consists in the rowid, as in AAAPvCAAFAAAAFaAAa. The rowid makes the whole index entry unique because a rowid is itself unique in the database.

    hrms

    If the index in the preceding example were created with default prefix compression (specified by the COMPRESS keyword), then duplicate key prefixes such as online,0 and online,3 would be compressed. Conceptually, the database achieves compression as follows:

    Copyonline,0
    AAAPvCAAFAAAAFaAAa
    AAAPvCAAFAAAAFaAAg
    AAAPvCAAFAAAAFaAAl
    online,2
    AAAPvCAAFAAAAFaAAm
    online,3
    AAAPvCAAFAAAAFaAAq
    AAAPvCAAFAAAAFaAAt
    

    Suffix entries (the rowids) form the compressed version of index rows. Each suffix entry references a prefix entry, which is stored in the same index block as the suffix.

    Alternatively, you could specify a prefix length when creating an index that uses prefix compression. For example, if you specified COMPRESS 1, then the prefix would be order_mode and the suffix would be order_status,rowid. For the values in the index block example, the index would factor out duplicate occurrences of the prefix online, which can be represented conceptually as follows:

    Copyonline
    0,AAAPvCAAFAAAAFaAAa
    0,AAAPvCAAFAAAAFaAAg
    0,AAAPvCAAFAAAAFaAAl
    2,AAAPvCAAFAAAAFaAAm
    3,AAAPvCAAFAAAAFaAAq
    3,AAAPvCAAFAAAAFaAAt
    

    The index stores a specific prefix once per leaf block at most. Only keys in the leaf blocks of a B-tree index are compressed. In the branch blocks the key suffix can be truncated, but the key is not compressed.

  • DB_NAME Initialization Parameter

    The DB_NAME initialization parameter specifies a database identifier.

    Microsoft certification malaysia

    DB_NAME must be set to a text string of no more than 8 characters. The database name must start with an alphabetic character. During database creation, the name provided for DB_NAME is recorded in the data files, redo log files, and control file of the database. If during database instance startup the value of the DB_NAME parameter (in the parameter file) and the database name in the control file are different, then the database does not start.

    juniper certification malaysia

    DB_DOMAIN Initialization Parameter

    In a distributed database system, the DB_DOMAIN initialization parameter specifies the logical location of the database within the network structure.

    istqb certification malaysia

    DB_DOMAIN is a text string that specifies the network domain where the database is created. If the database you are about to create will ever be part of a distributed database system, then give special attention to this initialization parameter before database creation. This parameter is optional.

    database training courses malaysia

  • Ascending and Descending Indexes

    In an ascending index, Oracle Database stores data in ascending order. By default, character data is ordered by the binary values contained in each byte of the value, numeric data from smallest to largest number, and date from earliest to latest value.

    crm

    For an example of an ascending index, consider the following SQL statement:

    CopyCREATE INDEX emp_deptid_ix ON hr.employees(department_id); 
    

    Oracle Database sorts the hr.employees table on the department_id column. It loads the ascending index with the department_id and corresponding rowid values in ascending order, starting with 0. When it uses the index, Oracle Database searches the sorted department_id values and uses the associated rowids to locate rows having the requested department_id value.

    cyber security

    By specifying the DESC keyword in the CREATE INDEX statement, you can create a descending index. In this case, the index stores data on a specified column or columns in descending order. If the index in Table 3-3 on the employees.department_id column were descending, then the leaf blocking containing 250 would be on the left side of the tree and block with 0 on the right. The default search through a descending index is from highest to lowest value.

    data analytics

    Descending indexes are useful when a query sorts some columns ascending and others descending. For an example, assume that you create a composite index on the last_name and department_id columns as follows:

    CopyCREATE INDEX emp_name_dpt_ix ON hr.employees(last_name ASC, department_id DESC); 
    

    If a user queries hr.employees for last names in ascending order (A to Z) and department IDs in descending order (high to low), then the database can use this index to retrieve the data and avoid the extra step of sorting it.

    digital transformation

  • Determining the Global Database Name

    The global database name consists of the user-specified local database name and the location of the database within a network structure.

    • Set the DB_NAME and DB_DOMAIN initialization parameters.

    Veeam certification malaysia

    The DB_NAME initialization parameter determines the local name component of the database name, and the DB_DOMAIN parameter, which is optional, indicates the domain (logical location) within a network structure. The combination of the settings for these two parameters must form a database name that is unique within a network.

    red hat certification malaysia

    For example, to create a database with a global database name of test.us.example.com, edit the parameters of the new parameter file as follows:

    DB_NAME = test
    DB_DOMAIN = us.example.com

    oracle certification malaysia

    You can rename the GLOBAL_NAME of your database using the ALTER DATABASE RENAME GLOBAL_NAME statement. However, you must also shut down and restart the database after first changing the DB_NAME and DB_DOMAIN initialization parameters and recreating the control files. Recreating the control files is easily accomplished with the command ALTER DATABASE BACKUP CONTROLFILE TO TRACE. See Oracle Database Backup and Recovery User’s Guide for more information.

    • DB_NAME Initialization Parameter
      The DB_NAME initialization parameter specifies a database identifier.
    • DB_DOMAIN Initialization Parameter
      In a distributed database system, the DB_DOMAIN initialization parameter specifies the logical location of the database within the network structure.

    Nutanix certification malaysia

  • Reverse Key Indexes

    A reverse key index is a type of B-tree index that physically reverses the bytes of each index key while keeping the column order.

    microsoft 365 certification training courses malaysia

    For example, if the index key is 20, and if the two bytes stored for this key in hexadecimal are C1,15 in a standard B-tree index, then a reverse key index stores the bytes as 15,C1.

    lpi linux administration certification training courses malaysia

    Reversing the key solves the problem of contention for leaf blocks in the right side of a B-tree index. This problem can be especially acute in an Oracle Real Application Clusters (Oracle RAC) database in which multiple instances repeatedly modify the same block. For example, in an orders table the primary keys for orders are sequential. One instance in the cluster adds order 20, while another adds 21, with each instance writing its key to the same leaf block on the right-hand side of the index.

    lean six sigma certification training courses malaysia

    In a reverse key index, the reversal of the byte order distributes inserts across all leaf keys in the index. For example, keys such as 20 and 21 that would have been adjacent in a standard key index are now stored far apart in separate blocks. Thus, I/O for insertions of sequential keys is more evenly distributed.

    application services

    Because the data in the index is not sorted by column key when it is stored, the reverse key arrangement eliminates the ability to run an index range scanning query in some cases. For example, if a user issues a query for order IDs greater than 20, then the database cannot start with the block containing this ID and proceed horizontally through the leaf blocks.