GV$ and V$ Views
TimesTen provides several views that are prefixed with GV$
and V$
. These views are supported in TimesTen Scaleout and TimesTen Classic. For most V$
views, there is a corresponding GV$
view.
In TimesTen Scaleout:
-
The
GV$
views contain the contents of theV$
view for every element of the database. -
The
V$
views contain data for the element to which your application is connected.
In TimesTen Classic:
-
The
GV$
views contain the same contents as their correspondingV$
view. -
The
V$
views contain rows of data for the database to which your application is connected.
For example, assume you want to query the GV$
and V$BLOCK_INFO
system views for information on blocks and fragmentation.
In TimesTen Scaleout:
-
When you query the
GV$BLOCK_INFO
view, TimesTen returns the contents of theV$BLOCK_INFO
contents for every element in the database. In this example, there are 6 elements, so TimesTen returns data for each of these 6 elements.Command> SELECT * FROM GV$BLOCK_INFO; TOTALBLOCKS, FREEBLOCKS, FREEBYTES, LARGESTFREE, ELEMENTID < 1549, 11, 235753720, 235717496, 1 > < 1548, 17, 235789368, 235728984, 3 > < 1547, 14, 235883704, 235855096, 5 > < 1549, 13, 235786520, 235762712, 2 > < 1548, 13, 235851352, 235827960, 6 > < 1544, 13, 235886264, 235851960, 4 > 6 rows found.
-
When you query the
V$BLOCK_INFO
view, TimesTen returns data for the element to which your application is connected (the local element). In this example, the local element is 1.Before running the query, run the
set
columnlabels
on
ttIsql
command to display the column headers.Command> set columnlabels on; Command> SELECT * FROM V$BLOCK_INFO; TOTALBLOCKS, FREEBLOCKS, FREEBYTES, LARGESTFREE, ELEMENTID < 1549, 11, 235753720, 235717496, 1 > 1 row found.
In TimesTen Classic:
-
When you query the
GV$BLOCK_INFO
view, TimesTen returns the same contents as theV$BLOCK_INFO
view. Ignore theelementId
column.Command> SELECT * FROM GV$BLOCK_INFO; TOTALBLOCKS, FREEBLOCKS, FREEBYTES, LARGESTFREE, ELEMENTID < 659, 4, 118359840, 118214208, 1 > 1 row found.
-
When you query the
V$BLOCK_INFO
view, TimesTen returns data for the database to which your application is connected. Ignore theelementId
column.Command> SELECT * FROM V$BLOCK_INFO; TOTALBLOCKS, FREEBLOCKS, FREEBYTES, LARGESTFREE, ELEMENTID < 659, 4, 118359840, 118214208, 1 > 1 row found.
These views are categorized as follows: