IBM 15 Manual De Usuario

Descargar
Página de 270
51
Building Streams
Figure 5-12
Caching at the Type node to store newly derived fields
To Enable a Cache
E
On the stream canvas, right-click the node and click
Cache
on the menu.
E
On the caching submenu, click
Enable
.
E
You can turn the cache off by right-clicking the node and clicking
Disable
on the caching submenu.
Caching Nodes in a Database
For streams run in a database, data can be cached midstream to a temporary table in the database
rather than the file system. When combined with SQL optimization, this may result in significant
gains in performance. For example, the output from a stream that merges multiple tables to create
a data mining view may be cached and reused as needed. By automatically generating SQL for
all downstream nodes, performance can be further improved.
When using database caching with strings longer than 255 characters, either ensure that there
is a Type node upstream from the caching node and that the field values are read, or set the
string length by means of the
default_sql_string_length parameter in the options.cfg file. Doing
so ensures that the corresponding column in the temporary table is set to the correct width to
accommodate the strings.
To take advantage of database caching, both SQL optimization and database caching must
be enabled. Note that Server optimization settings override those on the Client. For more
information, see the topic
on p. 60.
With database caching enabled, simply right-click any nonterminal node to cache data at
that point, and the cache will be created automatically directly in the database the next time the
stream is run. If database caching or SQL optimization is not enabled, the cache will be written
to the file system instead.