Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS forUNIX SQL Reference - NCR

NCR Teradata RDBMS forUNIX SQL Reference - NCR, 1997. - 913 p.
Download (direct link): teradataforunix1997.pdf
Previous << 1 .. 147 148 149 150 151 152 < 153 > 154 155 156 157 158 159 .. 241 >> Next

SORT to order Spool 1 by the sort key in spool field1...
Rows in the spool file are sorted by the value in field1. The contents of fieldl are determined by the column or columns defined in the ORDER BY or WITH...BY clause of the request being processed.
Spool n...
Identifies a spool file, which is a temporary file used to contain data during an operation. Spool 1 is normally used to hold a result before it is returned to the user. Spools 2, 3, etc., contain intermediate data that produces a result.
Spool_n.Field...
Identifies the field of the spooled rows that is being used in a join constraint or comparison operation. For example: PERSONNEL.Employee.EmpNo = Spool 2.MgrNo Statement 1... This term refers to the initiating request.

8-146

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

EXPLAIN Modifier

Term Explanation
The estimated time is nn seconds.
The time shown is not clock seconds; you should consider it to be an arbitrary unit of measure that compares different operations.
Two-AMP RETRIEVE step by way of unique index #n...
A row of a table is selected based on a unique secondary index: A single row in the unique secondary index subtable is selected using the index value that hashes to the AMP on which the subtable row is stored. The hash value in the index row ID determines the AMP on which the data row is stored.
We do a BMSMS... (bit map set manipulation step)
BMSMS is a method for handling weakly selective secondary indexes that have been ANDed; NUSI bit mapping.
We do an ABORT test ...
An ABORT or ROLLBACK statement was detected.
We do a SMS (set manipulation step)...
Combine rows under control of a UNION, EXCEPT, MINUS, or INTERSECT operator.
Which is duplicated on all AMPs
Relocating data in preparation for a join.
Which is resistributed by hash code to all AMPs
Relocating data in preparation for a join.

Examples showing the use of the EXPLAIN modifier are provided in Chapter 9, and also in Chapter 17 in the manual, Teradata RDBMS for UNIX Database Design and Administration

Teradata RDBMS for UNIX SQL Reference

8-147
Teradata SQL Syntax Guide

GIVE

GIVE

Function

Syntax

The GIVE statement transfers ownership of a database or user space to another user. GIVE is flagged as non-ANSI, when the SQL flagger is enabled.
where: FF07A025
Syntax Element... Specifies . . .
dborusername the name of the database or user whose ownership is being transferred.
TO an introduction to the name of the recipient.
recipientname the name of the new immediate owner for the transferred database or user.

Privileges and Access Rights

The user entering the GIVE statement for a database or user must have DROP DATABASE privileges on the given object, and CREATE DATABASE privileges on the recipient.

The GIVE statement does not revoke any explicit access rights that the old ownership hierarchy had on the given database or user. No rights on the given database or user are granted to the new ownership hierarchy as a result of the GIVE statement, nor does the database or user being given receive any explicit rights.

The recipient of a GIVE statement cannot be owned by the given object; if A owns B, A cannot be given to B.

Databases and Users Owned Are Also Transferred

All databases and users owned by the transferred database or user are also transferred.

8-148

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

GIVE

Transfer of Space Allocation

A transfer of ownership also transfers the space allocated to the named database or user; this affects space allocation in the Teradata RDBMS as follows:

The aggregate number of bytes available to the former owners (the owner who is entering the GIVE statement plus the owners above this owner in the hierarchy) is reduced by the number of bytes in the transferred database. This includes total space allocated to the database, plus that of all databases and users owned by the transferred database.

If the transferred database is dropped, then the number of bytes allocated to the new immediate owner of the transferred database is increased by the number of bytes in the transferred database. In addition, the aggregate number of bytes available to owners above this owner in the hierarchy is increased by the number of bytes that had been allocated to the transferred database.

For example, in the following hierarchy:

FF07A070

If ownership of database C is transferred to database D, the structure of the hierarchy would change as follows:

FF07A071

When database C is transferred, database F (which is owned by C) is also transferred.

Teradata RDBMS for UNIX SQL Reference

8-149
Teradata SQL Syntax Guide

GIVE

While the number or bytes allocated to database A remains the same, the aggregate number of bytes available to database A is reduced by 50 (the total number of bytes allocated to databases C and F).

The number of bytes allocated to databases
Previous << 1 .. 147 148 149 150 151 152 < 153 > 154 155 156 157 158 159 .. 241 >> Next