Product Instructions: Viewing the SQL Query Plan of a Table

To view the SQL statements that a table will attempt to execute (the query plan), right-click the title bar, and select ‘Show Plan’ from the context menu. This opens the ‘Query Plan’ dialog box.

The ‘Query Plan’ dialog box displays the queries that will be sent to the database at runtime. Additionally, it shows the data operations that the Worksheet will perform in post-processing, after the data is retrieved from the database.

By default, the Worksheet attempts to create a single SQL query that fully generates the table’s data. This is typically the most efficient approach because it allows the database to perform all the needed data operations (joins, filtering, etc.). However, you can override this behavior for a particular table by deselecting the ‘Merge SQL’ option in the ‘Table Properties’ dialog box.

#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index Read More

Example: Viewing the SQL Query Plan

This example illustrates how you can control the SQL query that a table sends to the database.

  1. Expand the ‘TABLE’ > ‘SA’ node of the ‘Orders’ data source.
  2. Drag the ‘PRODUCTS’ table to an empty location on the Worksheet.
  3. Drag the ‘CATEGORIES’ table to an empty location on the Worksheet.
  4. Drag the ‘CATEGORY_ID’ column header from the ‘CATEGORIES’ table onto the ‘CATEGORY_ID’ column header of the ‘PRODUCTS’ table, and release when the ‘join’ symbol appears. This creates a new table called ‘Query’ that contains the inner join between the two tables based on the ‘CATEGORY_ID’ columns. (See Inner Join for more details.)
  5. Right-click the title bar of the ‘Query’ table, and select ‘Show Plan’. This displays the ‘Query Plan’ dialog box.

  Previous: Creating Sub-queries with SQL