Configuring Materialized
Report Views
Users of InetSoft's reporting software can easily configure the materialized report views in order to
allocate resources for high level report performance. View the information below to learn more about the Style Intelligence solution.
To configure the server to use distributed materialized views, and to configure the individual nodes,
follow the steps below:
- Shut down the Style Intelligence server.
- Add the following properties to the sree.properties file (in the SREE Home directory) on the Style
Intelligence server.
comm.this.host={servername}
comm.port=6385
comm.{servername}.ips={server IP address}
fs.server={servername}
Replace {servername} with the Style Intelligence server name. Replace {server IP address} with the Style
Intelligence server IP number.
For the first data node machine (node 1), configure the node by following the steps
below:
- Create a new directory on node 1 to contain the Style Intelligence jar files (for example,
“C:\node1\jar”).
- Copy the Style Intelligence jar files into the new jar file directory: “etools.jar” and
“bisuite_pro.jar” (or “visual_pro.jar”).
- Create a new SREE Home directory on node 1 to contain the materialized view data and configuration
information (for example, “C:\node1\sreehome”).
- Open a command window on the data node machine, and navigate to the “node1” directory. Then
type the following command:
java -Dsree.home=./sreehome -classpath ./jar/bisuite_pro.jar;./jar/etools.jar;.
inetsoft.report.composition.mv.dgui.DistributePropertyDialog
This opens the 'Required Property' dialog box.
- In the 'Required Property' dialog box, enter the {nodename} and {node IP address} in the 'Host Name' and
'Host IP' fields, respectively. Enter the {servername} and {server IP address} in the 'Server Name' and
'Server IP' fields, respectively. Enter the “comm.port” value (from sree.properties above) into
the 'Port' field.
- Click 'OK' to close the 'Required Property' dialog box. This populates the 'Data Node Configuration' dialog
box. (Leave this dialog box open.)
- Repeat the above steps for each data node.
- Start up the Style Intelligence server, and open Enterprise Manager.
For the first data node machine (node 1), start the node by following the steps below:
- Click the 'Test' button in the 'Data Node Configuration' dialog box. A 'Test successful' response indicates
that the data node is able to communicate with the server.
- If the test was successful, click 'Connect' in the 'Data Node Configuration' dialog box.
- Click the 'Close' button (red X) to exit the 'Data Node Configuration' dialog box. This creates an
sree.properties file in the data node's SREE Home directory.
The JVM heap size should be scaled according to the data that you expect the node to process.
- In the command window, navigate to the “node1” directory. Then start node 1 by typing the
following command:
java -Xmx256M -Dsree.home=./sreehome -classpath ./jar/bisuite_pro.jar;./jar/etools.jar;.
inetsoft.report.composition.mv.dgui.StartDataNode
- Repeat the above steps for each data node.
- In Enterprise Manager on the server, open the 'Repository' > 'Distributed Configuration' page under
the Server tab. Verify that the nodes you have started are shown with “alive” status.
{{> ad4}}
If you are using a clustered environment for report generation, and wish to use a distributed
materialized view for Viewsheets, follow the steps below:
- Prepare the following reporting cluster servers:
- A proxy server (proxy1)
- A slave server (slave1),
- Prepare the following distributed materialized view servers:
- A server node (server1)
- A data node (data1).
This allows slave1 and server1 to share the same MV definition and security settings, so that a MV query
created by slave1 can be executed on server1.
- Set proxy1, slave1, and server1 to share the same SREE Home directory.
- In the sree.properties file in the shared SREE Home directory, make the following entries:
fs.server=server1
cluster.servers.hosts=slave1
mv.repository.servlet=http://server1/Viewer
- Start the following servers: proxy1, slave1, and server1.
If the fs.nodes property in the sree.properties file in the shared SREE Home directory designates server1,
remove that entry.
- Start the data1server, and add it to the distributed system.
Do not use the Enterprise Manager on proxy1 or slave1 to create the materialized views manually. If you are
scheduling materialized view generation, you can use Enterprise Manager on any server.
- Create the materialized views on server1 by using Enterprise Manager on server1.
With these settings in place, Viewsheet that use materialized views will execute on server1.
What Is a Materialized View?
A materialized view is a database object that contains the results of a query, effectively storing a snapshot of data that can be used for faster query performance. Unlike a regular view, which is a virtual table generated dynamically from the underlying tables every time it is accessed, a materialized view stores the query result physically, allowing for quicker access, particularly when dealing with complex queries or large datasets.
Key Characteristics of a Materialized View
- Physical Storage:
- The result of the query that defines the materialized view is stored on disk, making data retrieval faster since it avoids recalculating the query each time.
- Refresh Mechanism:
- Materialized views can be refreshed periodically or on-demand to reflect changes in the underlying tables. This ensures that the data remains up-to-date, though it might not always be as current as data accessed directly from the base tables.
- Refresh Methods:
- Complete Refresh: The entire view is recomputed and replaced with the new data.
- Incremental (Fast) Refresh: Only the changes since the last refresh are applied, making it quicker but more complex to manage.
- Use Cases:
- Performance Optimization: Materialized views are often used to speed up complex queries, particularly those involving joins, aggregations, and calculations.
- Data Warehousing: They are commonly employed in data warehousing environments where the same complex queries are executed frequently.
- Reporting: Materialized views can be used in reporting applications where data consistency is less critical, and query speed is a priority.
- Consistency vs. Performance Trade-off:
- While materialized views can significantly improve performance, they do come with a trade-off between data consistency and speed. Depending on the refresh strategy, there might be a lag between the actual data in the base tables and what is seen in the materialized view.
How a Materialized View Works
- Creation:
- Querying:
- Once created, you can query the materialized view just like a regular table, benefiting from the precomputed results.
- Refreshing:
- Dependency on Base Tables:
- Materialized views depend on the underlying base tables. If the base tables are modified, the materialized view might become outdated until it is refreshed.
Advantages of Materialized Views
- Improved Performance:
- Reduces the need for recalculating complex queries, significantly speeding up query execution times.
- Reduced Database Load:
- By storing precomputed results, it reduces the workload on the database, as it doesn't need to perform expensive calculations repeatedly.
- Efficiency in Data Warehousing:
- Particularly useful in environments where large volumes of data are processed, and the same queries are run frequently.
Disadvantages of Materialized Views
- Maintenance Overhead:
- Requires management of the refresh process to ensure data remains up-to-date.
- Storage Requirements:
- Consumes additional disk space since the result set of the query is stored physically.
- Potential for Stale Data:
- Depending on the refresh strategy, there might be a delay in reflecting the most current data, leading to potential discrepancies.