How Indexes Are Stored (206)
When you create an index, Oracle automatically allocates an index segment to hold theindex’s data in a tablespace. You can control allocation of space for an index’s segmentand use of this reserved space in the following ways:■ Set the storage parameters for the index segment to control the allocation of theindex segment’s extents.■ Set the PCTFREE parameter for the index segment to control the free space in thedata blocks that constitute the index segment’s extents.The tablespace of an in
遇到ORA-12532
C:>tnsping ora11gTNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 14-11月-2007 23:24Copyright (c) 1997, 2007, Oracle. All rights reserved.已使用的参数文件:D:appAdministratorproduct11.1.0db_1networkadminsqlnet.ora已使用 TNSNAMES 适配器来解析别名Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.110.111.112)(PO) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ora11g)))TNS-12532: TNS: 无效的参数C:>oerr ora 12532ORA-12532: TNS:invalid argume
Create Index ...ONLINE
Specify ONLINE to indicate that DML operations on the table will be allowed during creation of the index. Restrictions on Online Index Building Online index building is subject to the following restrictions:■ Parallel DML is not supported during online index building. If you specify ONLINE and then issue parallel DML statements, then Oracle Database returns an error.■ You cannot specify ONLINE for a bitmap index or a cluster index.■ For a nonunique secondary index on an index-organized table,
Resolve Dependencies of Function-Based Indexes (205)
A function-based index depends on any function that it is using. If the function or the specification of a package containing the function is redefined (or if the index owner’s EXECUTE privilege is revoked), then the following conditions hold:■ The index is marked as DISABLED.■ Queries on a DISABLED index fail if the optimizer chooses to use the index.■ DML operations on a DISABLED index fail unless the index is also markedUNUSABLE and the initialization parameter SKIP_UNUSABLE_INDEXES is se
Privileges on the Defining Function (204)
The index owner needs the EXECUTE privilege on thefunction used to define a function-based index. If the EXECUTE privilege is revoked,Oracle marks the index DISABLED. The index owner does not need the EXECUTEWITH GRANT OPTION privilege on this function to grant SELECT privileges on theunderlying table.定义函数上的权限1. 对于在函数索引中定义的函数 , 用户必须具有EXECUTE权限2. 如果EXECUTE权限被回收 , 函数索引被标记为失效3. 函数索引拥有者可赋予SELECT权限on underlying table 而不需要WITH GR
DETERMINISTIC Functions (203)
Any user-written function used in a function-based indexmust have been declared with the DETERMINISTIC keyword to indicate that thefunction will always return the same output return value for any given set of inputargument values, now and in the future.DETERMINISTIC函数函数索引使用的用户自定义函数必须声明为 DETERMINISTIC,此关键字表明对于不一定的输入参数,此函数总会得到相同的输出结果返回值。[@more@]
Dependencies of Function-Based Indexes (202)
Function-based indexes depend on the function used in the expression that defines theindex. If the function is a PL/SQL function or package function, the index is disabledby any changes to the function specification.To create a function-based index, the user must be granted CREATE INDEX or CREATEANY INDEX.To use a function-based index:■ The table must be analyzed after the index is created.■ The query must be guaranteed not to need any NULL values from the indexedexpression, because NULL value
Optimization with Function-Based Indexes (201)
You must gather statistics about function-based indexes for the optimizer. Otherwise,the indexes cannot be used to process SQL statements.The optimizer can use an index range scan on a function-based index for queries withexpressions in WHERE clause. For example, in this query:SELECT * FROM t WHERE a + b < 10;the optimizer can use index range scan if an index is built on a+b. The range scanaccess path is especially beneficial when the predicate (WHERE clause) has lowselectivity. In addition,
Uses of Function-Based Indexes (200)
Function-based indexes provide an efficient mechanism for evaluating statements thatcontain functions in their WHERE clauses. The value of the expression is computed andstored in the index. When it processes INSERT and UPDATE statements, however,Oracle must still evaluate the function to process the statement.Function-based indexes defined on UPPER(column_name) or LOWER(column_name) can facilitate case-insensitive searches. A function-based index can also be used for a globalization support sort
Function-Based Indexes (199)
You can create indexes on functions and expressions that involve one or more columnsin the table being indexed. A function-based index computes the value of the functionor expression and stores it in the index. You can create a function-based index as eithera B-tree or a bitmap index.The function used for building the index can be an arithmetic expression or anexpression that contains a PL/SQL function, package function, C callout, or SQLfunction. The expression cannot contain any aggregate func
Indexes and Nulls (198)
NULL values in indexes are considered to be distinct except when all the non-NULLvalues in two or more rows of an index are identical, in which case the rows areconsidered to be identical. Therefore, UNIQUE indexes prevent rows containing NULLvalues from being treated as identical. This does not apply if there are no non-NULLvalues—in other words, if the rows are entirely NULL. Oracle does not index table rows in which all key columns are NULL, except in the caseof bitmap indexes or when the cl
Indexes and Keys (197)
Although the terms are often used interchangeably, indexes and keys are different.Indexes are structures actually stored in the database, which users create, alter, anddrop using SQL statements. You create an index to provide a fast access path to tabledata. Keys are strictly a logical concept. Keys correspond to another feature of Oraclecalled integrity constraints, which enforce the business rules of a database.Because Oracle uses indexes to enforce some integrity constraints, the terms key an
Composite Indexes (196)
A composite index (also called a concatenated index) is an index that you create onmultiple columns in a table. Columns in a composite index can appear in any orderand need not be adjacent in the table.Composite indexes can speed retrieval of data for SELECT statements in which theWHERE clause references all or the leading portion of the columns in the compositeindex. Therefore, the order of the columns used in the definition is important.Generally, the most commonly accessed or most selective c
Unique and Nonunique Indexes (195)
Indexes can be unique or nonunique. Unique indexes guarantee that no two rows of atable have duplicate values in the key column (or columns). Nonunique indexes donot impose this restriction on the column values.Oracle recommends that unique indexes be created explicitly, using CREATE UNIQUEINDEX. Creating unique indexes through a primary key or unique constraint is notguaranteed to create a new index, and the index they create is not guaranteed to be aunique index.唯一索引和非唯一索引1. 在一个
Overview of Indexes (194)
Indexes are optional structures associated with tables and clusters. You can createindexes on one or more columns of a table to speed SQL statement execution on thattable. Just as the index in this manual helps you locate information faster than if therewere no index, an Oracle index provides a faster access path to table data. Indexes arethe primary means of reducing disk I/O when properly used.You can create many indexes for a table as long as the combination of columns differsfor each index.
Windows找不到文件"msconfig"
注册表中 , 到HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp Paths路径下 ,在右边窗口中,右击空白处,依次选择“新建”-“项”,将其名改为“MSCONFIG.EXE”。然后选中“MSCONFIG.EXE”,再在右边窗口中,双击字符串值“默认”,把数值改为“C(操作系统安装盘):WindowsPCHealthHelpCtrBinariesMSConfig.exe”。[@more@]
Overview of Synonyms (193)
A synonym is an alias for any table, view, materialized view, sequence, procedure,function, package, type, Java class schema object, user-defined object type, or anothersynonym. Because a synonym is simply an alias, it requires no storage other than itsdefinition in the data dictionary.Synonyms are often used for security and convenience. For example, they can do thefollowing:■ Mask the name and owner of an object■ Provide location transparency for remote objects of a distributed database■ Si
Overview of the Sequence Generator (192)
The sequence generator provides a sequential series of numbers. The sequencegenerator is especially useful in multiuser environments for generating uniquesequential numbers without the overhead of disk I/O or transaction locking. Forexample, assume two users are simultaneously inserting new employee rows into theemployees table. By using a sequence to generate unique employee numbers for theemployee_id column, neither user has to wait for the other to enter the nextavailable employee number. The
Overview of Dimensions (191)
A dimension defines hierarchical (parent/child) relationships between pairs ofcolumns or column sets. Each value at the child level is associated with one and onlyone value at the parent level. A hierarchical relationship is a functional dependencyfrom one level of a hierarchy to the next level in the hierarchy. A dimension is acontainer of logical relationships between columns, and it does not have any datastorage assigned to it.The CREATE DIMENSION statement specifies:■ Multiple LEVEL clauses
Materialized View Logs (190)
A materialized view log is a schema object that records changes to a master table’sdata so that a materialized view defined on the master table can be refreshedincrementally.Each materialized view log is associated with a single master table. The materializedview log resides in the same database and schema as its master table.物化视图日志1. 记录主表数据变化的方案对象 , 使得定义在主表上的物化视图能够增量刷新2. 每个物化视图日志与一个主表相关 , 与主表位于同一数据库同一方案[@more@]