Category: Uncategorized

  • Attribute-Clustered Tables with Interleaved Ordering

    Interleaved ordering uses a technique that is similar to a Z-order.

    Interleaved ordering enables the database to prune I/O based on any subset of predicates in the clustering columns. Interleaved ordering is useful for dimensional hierarchies in a data warehouse.

    rooms

    As with attribute-clustered tables with linear ordering, Oracle Database supports interleaved ordering on single or multiple tables that are connected through a primary-foreign key relationship. Columns in tables other than the attribute-clustered table must be linked by foreign key and joined to the attribute-clustered table.

    dell emc certification malaysia

    Large data warehouses frequently organize data in a star schema. A dimension table uses a parent-child hierarchy and is connected to a fact table by a foreign key. Clustering a fact table by interleaved order enables the database to use a special function to skip values in dimension columns during table scans.

    comptia certification malaysia

    Example 2-10 Interleaved Ordering Example

    Suppose your data warehouse contains a sales fact table and its two dimension tables: customers and products. Most queries have predicates on the customers table hierarchy (cust_state_province, cust_city) and the products hierarchy (prod_category, prod_subcategory). You can use interleaved ordering for the sales table as shown in the partial statement in the following example:

    CopyCREATE TABLE sales
    (
       prod_id NUMBER NOT NULL
    ,  cust_id NUMBER NOT NULL
    ,  amount_sold NUMBER(10,2) ...
    )
    CLUSTERING sales
       JOIN products ON (sales.prod_id = products.prod_id)
       JOIN customers ON (sales.cust_id = customers.cust_id)
       BY INTERLEAVED ORDER
       (
         (  products.prod_category
         ,  products.prod_subcategory
         ),
         (  customers.cust_state_province
         ,  customers.cust_city
         )
       )
    WITH MATERIALIZED ZONEMAP;

    Note

    The columns specified in the BY INTERLEAVED ORDER clause need not be in actual dimension tables, but they must be connected through a primary-foreign key relationship.

    Suppose an application queries the sales, products, and customers tables in a join. The query specifies the customers.prod_category and customers_cust_state_province columns in the predicate as follows:

    CopySELECT cust_city, prod_sub_category, SUM(amount_sold)
    FROM   sales, products, customers
    WHERE  sales.prod_id = products.prod_id 
    AND    sales.cust_id = customers.cust_id
    AND    customers.prod_category = 'Boys' 
    AND    customers.cust_state_province = 'England - Norfolk' 
    GROUP BY cust_city, prod_sub_category;
    

    In the preceding query, the prod_category and cust_state_province columns are part of the clustering definition shown in the CREATE TABLE example. During the scan of the sales table, the database can consult the zone map and access only the rowids in this zone.

    citrix certification malaysia 2

  • Specifying the Database Time Zone and Time Zone File

    Oracle Database datetime and interval data types and time zone support make it possible to store consistent information about the time of events and transactions.

    rooms

    • Setting the Database Time Zone
      You can set the database time zone with the SET TIME_ZONE clause of the CREATE DATABASE statement.
    • About the Database Time Zone Files
      Two time zone files are included in a subdirectory of the Oracle home directory. The time zone files contain the valid time zone names.
    • Specifying the Database Time Zone File
      All databases that share information must use the same time zone data file.

    dell emc certification malaysia

    Setting the Database Time Zone

    You can set the database time zone with the SET TIME_ZONE clause of the CREATE DATABASE statement.

    • Set the database time zone when the database is created by using the SET TIME_ZONE clause of the CREATE DATABASE statement.

    CompTIA certification malaysia

    If you do not set the database time zone, then it defaults to the time zone of the host operating system.

    You can change the database time zone for a session by using the SET TIME_ZONE clause of the ALTER SESSION statement.

    citrix certification malaysia 2

  • Overriding the Default Tablespace Type

    The SYSTEM and SYSAUX tablespaces are always created with the default tablespace type. However, you optionally can explicitly override the default tablespace type for the UNDO and DEFAULT TEMPORARY tablespace during the CREATE DATABASE operation.

    devops certification training courses malaysia

    • Specify an UNDO TABLESPACE clause or a DEFAULT TEMPORARY TABLESPACE clause that overrides the default tablespace type.

    contact

    For example, you can create a bigfile UNDO tablespace in a database with the default tablespace type of smallfile as follows:

    CREATE DATABASE mynewdb
    …
    BIGFILE UNDO TABLESPACE undotbs1
    DATAFILE ‘/u01/oracle/oradata/mynewdb/undotbs01.dbf’
    SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

    ccna certification training courses malaysia

    You can create a smallfile DEFAULT TEMPORARY tablespace in a database with the default tablespace type of bigfile as follows:

    CREATE DATABASE mynewdb
    SET DEFAULT BIGFILE TABLESPACE
    …
    SMALLFILE DEFAULT TEMPORARY TABLESPACE tempts1
    TEMPFILE ‘/u01/oracle/oradata/mynewdb/temp01.dbf’
    SIZE 20M REUSE
    …

    careers

  • Attribute-Clustered Tables with Linear Ordering

    A linear ordering scheme for a table divides rows into ranges based on user-specified attributes in a specific order. Oracle Database supports linear ordering on single or multiple tables that are connected through a primary-foreign key relationship.

    devops certification training courses malaysia

    For example, the sales table divides the cust_id and prod_id columns into ranges, and then clusters these ranges together on disk. When you specify the BY LINEAR ORDER directive for a table, significant I/O reduction can occur when a predicate specifies either the prefix column or all columns in the directive.

    contact

    Assume that queries of sales often specify either a customer ID or a combination of a customer ID and product ID. You can create an attribute-clustered table so that such queries benefit from I/O reduction:

    CopyCREATE TABLE sales
    (
       prod_id     NOT NULL NUMBER
    ,  cust_id     NOT NULL NUMBER
    ,  amount_sold NUMBER(10,2) ...
    )
    CLUSTERING 
      BY LINEAR ORDER (cust_id, prod_id)
      YES ON LOAD YES ON DATA MOVEMENT
      WITH MATERIALIZED ZONEMAP;
    

    Queries that qualify both columns cust_id and prod_id, or the prefix cust_id experience I/O reduction. Queries that qualify prod_id only do not experience significant I/O reduction because prod_id is the suffix of the BY LINEAR ORDER clause. The following examples show how the database can reduce I/O during table scans.

    ccna certification training courses malaysia

    Example 2-8 Specifying Only cust_id

    An application issues the following query:

    CopySELECT * FROM sales WHERE cust_id = 100;
    

    Because the sales table is a BY LINEAR ORDER cluster, the database must only read the zones that include the cust_id value of 100.

    Example 2-9 Specifying prod_id and cust_id

    An application issues the following query:

    CopySELECT * FROM sales WHERE cust_id = 100 AND prod_id = 2300;
    

    Because the sales table is a BY LINEAR ORDER cluster, the database must only read the zones that include the cust_id value of 100 and prod_id value of 2300.

    careers

  • Specifying the Default Tablespace Type

    dynamics 365 sales training courses malaysia

    The SET DEFAULT...TABLESPACE clause of the CREATE DATABASE statement determines the default type of tablespace for this database in subsequent CREATE TABLESPACE statements.

    dynamics 365 finance training courses malaysia

    • Specify either SET DEFAULT BIGFILE TABLESPACE or SET DEFAULT SMALLFILE TABLESPACE.

    If you omit this clause, then the default is a smallfile tablespace, which is the traditional type of Oracle Database tablespace. A smallfile tablespace can contain up to 1022 files with up to 4M blocks each.

    dynamics 365 field service training courses malaysia

    The use of bigfile tablespaces further enhances the Oracle Managed Files feature, because bigfile tablespaces make data files completely transparent for users. SQL syntax for the ALTER TABLESPACE statement has been extended to allow you to perform operations on tablespaces, rather than the underlying data files.

    dynamics 365 customer service training courses malaysia

  • Zone Maps: Analogy

    For a loose analogy of zone maps, consider a sales manager who uses a bookcase of pigeonholes, which are analogous to data blocks.

    dynamics 365 sales training courses malaysia

    Each pigeonhole has receipts (rows) describing shirts sold to a customer, ordered by ship date. In this analogy, a zone map is like a stack of index cards. Each card corresponds to a “zone” (contiguous range) of pigeonholes, such as pigeonholes 1-10. For each zone, the card lists the minimum and maximum ship dates for the receipts stored in the zone.

    dynamics 365 finance training courses malaysia

    When someone wants to know which shirts shipped on a certain date, the manager flips the cards until she comes to the date range that contains the requested date, notes the pigeonhole zone, and then searches only pigeonholes in this zone for the requested receipts. In this way, the manager avoids searching every pigeonhole in the bookcase for the receipts.

    dynamics 365 field service training courses malaysia

    Zone Maps: Example

    This example illustrates how a zone map can prune data in a query whose predicate contains a constant.

    Assume you create the following lineitem table:

    CopyCREATE TABLE lineitem 
      ( orderkey      NUMBER        , 
        shipdate      DATE          ,
        receiptdate   DATE          ,
        destination   VARCHAR2(50)  ,
        quantity      NUMBER        );
    

    The table lineitem contains 4 data blocks with 2 rows per block. Table 2-3 shows the 8 rows of the table.

    Table 2-3 Data Blocks for lineitem Table

    Blockorderkeyshipdatereceiptdatedestinationquantity
    111-1-20141-10-2014San_Fran100
    121-2-20141-10-2014San_Fran200
    231-3-20141-9-2014San_Fran100
    241-5-20141-10-2014San_Diego100
    351-10-20141-15-2014San_Fran100
    361-12-20141-16-2014San_Fran200
    471-13-20141-20-2014San_Fran100
    481-15-20141-30-2014San_Jose100

    You can use the CREATE MATERIALIZED ZONEMAP statement to create a zone map on the lineitem table. Each zone contains 2 blocks and stores the minimum and maximum of the orderkey, shipdate, and receiptdate columns. Table 2-4 shows the zone map.

    dynamics 365 customer service training courses malaysia

    Table 2-4 Zone Map for lineitem Table

    Block Rangemin orderkeymax orderkeymin shipdatemax shipdatemin receiptdatemax receiptdate
    1-2141-1-20141-5-20141-9-20141-10-2014
    3-4581-10-20141-15-20141-15-20141-30-2014

    When you execute the following query, the database can read the zone map and then scan only blocks 1 and 2 because the date 1-3-2014 falls between the minimum and maximum dates:

    CopySELECT * FROM lineitem WHERE shipdate = '1-3-2014';
  • Supporting Bigfile Tablespaces During Database Creation

    Oracle Database simplifies management of tablespaces and enables support for extremely large databases by letting you create bigfile tablespaces.

    Hadoop training courses malaysia

    Bigfile tablespaces can contain only one file, but that file can have up to 4G blocks. The maximum number of data files in an Oracle Database is limited (usually to 64K files). Therefore, bigfile tablespaces can significantly enhance the storage capacity of an Oracle Database.

    exchange server certification training courses malaysia

    This section discusses the clauses of the CREATE DATABASE statement that let you include support for bigfile tablespaces.

    • Specifying the Default Tablespace Type
      The SET DEFAULT...TABLESPACE clause of the CREATE DATABASE statement determines the default type of tablespace for this database in subsequent CREATE TABLESPACE statements.

    dynamics 365 training courses malaysia

    • Overriding the Default Tablespace Type
      The SYSTEM and SYSAUX tablespaces are always created with the default tablespace type. However, you optionally can explicitly override the default tablespace type for the UNDO and DEFAULT TEMPORARY tablespace during the CREATE DATABASE operation.

    dynamics 365 supply chain training courses malaysia

  • Specifying Oracle Managed Files at Database Creation

    You can minimize the number of clauses and parameters that you specify in your CREATE DATABASE statement by using the Oracle Managed Files feature.

    • Specify either a directory or Oracle Automatic Storage Management (Oracle ASM) disk group in which your files are created and managed by Oracle Database.

    IBM infosphere datastage training courses malaysia

    By including any of the initialization parameters DB_CREATE_FILE_DEST, DB_CREATE_ONLINE_LOG_DEST_n, or DB_RECOVERY_FILE_DEST in your initialization parameter file, you instruct Oracle Database to create and manage the underlying operating system files of your database. Oracle Database will automatically create and manage the operating system files for the following database structures, depending on which initialization parameters you specify and how you specify clauses in your CREATE DATABASE statement:

    • Tablespaces and their data files
    • Temporary tablespaces and their temp files
    • Control files
    • Online redo logs
    • Archived redo log files
    • Flashback logs
    • Block change tracking files
    • RMAN backups

    IBM Informix training courses malaysia

    The following CREATE DATABASE statement shows briefly how the Oracle Managed Files feature works, assuming you have specified required initialization parameters:

    CREATE DATABASE mynewdb
    USER SYS IDENTIFIED BY sys_password
    USER SYSTEM IDENTIFIED BY system_password
    EXTENT MANAGEMENT LOCAL
    UNDO TABLESPACE undotbs1
    DEFAULT TEMPORARY TABLESPACE tempts1
    DEFAULT TABLESPACE users;

    IBM cognos bi training courses malaysia

    • The SYSTEM tablespace is created as a locally managed tablespace. Without the EXTENT MANAGEMENT LOCAL clause, the SYSTEM tablespace is created as dictionary managed, which is not recommended.
    • No DATAFILE clause is specified, so the database creates an Oracle managed data file for the SYSTEM tablespace.
    • No LOGFILE clauses are included, so the database creates two Oracle managed redo log file groups.
    • No SYSAUX DATAFILE is included, so the database creates an Oracle managed data file for the SYSAUX tablespace.
    • No DATAFILE subclause is specified for the UNDO TABLESPACE and DEFAULT TABLESPACE clauses, so the database creates an Oracle managed data file for each of these tablespaces.
    • No TEMPFILE subclause is specified for the DEFAULT TEMPORARY TABLESPACE clause, so the database creates an Oracle managed temp file.
    • If no CONTROL_FILES initialization parameter is specified in the initialization parameter file, then the database also creates an Oracle managed control file.
    • If you are using a server parameter file (see “Managing Initialization Parameters Using a Server Parameter File”), then the database automatically sets the appropriate initialization parameters.

    IBM aix system i training courses malaysia

  • Zone Maps

    A zone map is an independent access structure that divides data blocks into zones. Oracle Database implements each zone map as a type of materialized view.

    hadoop training courses malaysia

    Whenever CLUSTERING is specified on a table, the database automatically creates a zone map on the specified clustering columns. The zone map correlates minimum and maximum values of columns with consecutive data blocks in the attribute-clustered table. Attribute-clustered tables use zone maps to perform I/O reduction.

    exchange server certification training courses malaysia

    You can create attribute-clustered tables that do not use zone maps. You can also create zone maps without attribute-clustered tables. For example, you can create a zone map on a table whose rows are naturally ordered on a set of columns, such as a stock trade table whose trades are ordered by time. You execute DDL statements to create, drop, and maintain zone maps.

    dynamics 365 training courses malaysia

    See also

    • “Overview of Materialized Views”
    • Oracle Database Data Warehousing Guide to learn more about zone maps

    dynamics 365 supply chain training courses malaysia

  • Join Attribute Clustered Tables

    Attribute clustering that is based on joined columns is called join attribute clustering. In contrast with table clusters, join attribute clustered tables do not store data from a group of tables in the same database blocks.

    ibm infosphere datastage training courses malaysia

    For example, consider an attribute-clustered table, sales, joined with a dimension table, products. The sales table contains only rows from the sales table, but the ordering of the rows is based on the values of columns joined from products table. The appropriate join is executed during data movement, direct path insert, and CREATE TABLE AS SELECT operations. In contrast, if sales and products were in a standard table cluster, the data blocks would contain rows from both tables.

    ibm informix training courses malaysia

    See also

    Oracle Database Data Warehousing Guide to learn more about join attribute clustering

    I/O Reduction Using Zones

    A zone is a set of contiguous data blocks that stores the minimum and maximum values of relevant columns. When a SQL statement contains predicates on columns stored in a zone, the database compares the predicate values to the minimum and maximum stored in the zone to determine which zones to read during SQL execution.

    ibm cognos bi training courses malaysia

    I/O reduction is the ability to skip table or index blocks that do not contain data that the database needs to satisfy the query. This reduction can significantly reduce the I/O and CPU cost of table scans.

    ibm aix system i training courses malaysia