Hitachi

Hitachi Advanced Database Application Development Guide


5.1.1 About table scans

A table scan is a base table retrieval method that does not use B-tree indexes and text indexes. A table scan is used in the following cases:

The following figure shows an example of a table scan.

Figure 5‒1: Example of a table scan

[Figure]

Explanation:

Because column C3 specified in the search conditions is not an indexed column, B-tree index IDX_C1C2 is not used when the SELECT statement shown above is executed. Therefore, HADB performs a table scan and accesses all rows in the data pages.

If range indexes are defined for the table, the range indexes might also be used.

Note

If you have specified in the index specification that B-tree indexes or text indexes are not to be used, HADB uses a table scan.

Important

If a table scan is to be performed, we recommend that you define range indexes for the table. Using range indexes might improve performance. For details about the conditions under which range indexes are used, see 5.3 Range indexes used during execution of SQL statements.