24.12.2012 Views

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

USING <strong>ER</strong>/STUDIO > DEVELOPING THE PHYSICAL MODEL<br />

• Partitioning Expression: (PARTITION BY expression) Available if you selected Primary. Enter an expression to<br />

partition the data by a particular attribute, such as date by week, for some time. Partitioning the data enables you<br />

to more efficiently retrieve summarized data for a particular week because you only have to read the data for that<br />

week. Good candidates for a Partitioned Primary Index are tables where there is a high volume of daily inserts,<br />

so there is a bias toward partitioning on the data date. Partitioning an index by product_code or agent_id can also<br />

improve some queries. If you need more space than available in the text box to enter your expression, click More<br />

to launch the Partition Expression Editor where you can input a multi-line expression. The following is an example<br />

of a partitioning expression:<br />

PARTITION BY RANGE_N(CAPTURE_DATE BETWEEN DATE '2007-11-30' AND DATE '2008-2-30'<br />

EACH INT<strong>ER</strong>VAL '1' MONTH)<br />

Oracle 7 Index Options<br />

• Unique: (UNIQUE) If selected, specifies that the index key contains no duplicate values and therefore every row<br />

in the table is in some way unique. If not selected, a non-unique index is created that lets table rows have<br />

duplicate values in the columns that define the index.<br />

• No Sort: (NOSORT) If selected, specifies to not sort the data when the index is rebuilt.<br />

Postgre SQL Index Options<br />

• Unique: (UNIQUE) If selected, specifies that the index key contains no duplicate values and therefore every row<br />

in the table is in some way unique. If not selected, a non-unique index is created that lets table rows have<br />

duplicate values in the columns that define the index.<br />

• Clustered: (CLUST<strong>ER</strong>) Select to create a clustered index. A clustered index specifies that the rows of the table<br />

should be inserted sequentially on data pages, which generally requires less disk I/O to retrieve the data.<br />

Generally, the clustered index should be on a column that monotonically increases, such as an identity column,<br />

or some other column where the value is increasing, and is unique. This is especially true if the table is subject to<br />

many INS<strong>ER</strong>TS, UPDATES, and DELETES. Clustered indexes can greatly increase access speed, but usually only<br />

where the data is accessed sequentially in the same or reverse order of the clustered index, or when a range of<br />

items are selected.<br />

Sybase Index Options<br />

The options available depend upon the database platform version.<br />

• Unique: (UNIQUE) If selected, specifies that the index key contains no duplicate values and therefore every row<br />

in the table is in some way unique. If not selected, a non-unique index is created where table rows can have<br />

duplicate values in the columns that define the index.<br />

• Type: Sybase IQ uses HG or LF indexes to generate better or faster query plans to execute the query. The HG or<br />

LF index may also be appropriate for a DATE, TIME, DATETIME, or TIMESTAMP column, if you are evaluating<br />

equality predicates against the column. An LF index is also recommended, if you frequently use the column in the<br />

GROUP BY clause and there are less than 1000 distinct values, for example, less than three years of dates.<br />

• HG: Use an HG (High Group) index when the column will be used in a join predicate or the column has more<br />

than 1,000 unique values. The High_Group index is commonly used for join columns with integer data types<br />

because it handles GROUP BY efficiently. Each foreign key columns requires its own HG index; however, if a<br />

join index exists, the same column cannot have both an explicitly created HG index and a foreign key<br />

constraint.<br />

• LF: LF is the fastest index in Sybase IQ. Use an LF (Low Fast) index when a column has less than 1,000<br />

unique values or a column has less than 1,000 unique values and is used in a join predicate. This index is<br />

ideal for columns that have a few unique values (under 1,000) such as sex, Yes/No, True/False, number of<br />

dependents, and wage class.Never use an LF index for a column with 10,000 or more unique values. If the<br />

table has less than 25,000 rows, use an HG index, which requires fewer disk I/O operations for the same<br />

operation.<br />

EMBARCAD<strong>ER</strong>O TECHNOLOGIES > <strong>ER</strong>/STUDIO® 8.0.3 US<strong>ER</strong> GUIDE 173

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!