Databases Reference
In-Depth Information
From the preceding screenshot, note that the value with
consistent gets
is only
1
.
Let's do the same exercise with the heap table.
Execution plan for a heap table
The heap table query uses
INDEX UNIQUE SCAN
, the index of the primary key,
to look up the values that we are looking for. It is also a very eficient way to look
up the values. As you can see in the
Statistics
part, the number of
consistent gets
is
slightly higher (
3
) than the number of
consistent gets
of the single-table hash cluster
query. This is the irst indication that the single-table hash cluster query is slightly
more eficient compared to using a regular heap table to do a lookup.