Overview
Version
FineBI Version | Functional Change |
---|---|
6.0 | It relies on a built-in FineBI direct connection performance analysis plugin.
The performance analysis only applies to real-time data. |
6.0.16 | The function is provided by the product, not requiring an extra plugin. It applies to both real-time data and extracted data. The time consumption calculation logic of the execution phase is optimized. |
Application Scenario
You may find it hard to locate the causes of the following problems even after repeated checks, which may even cause server crashes.
Some steps are executed slowly when you are creating a self-service dataset.
A step is slow when you are previewing a self-service dataset.
Operations are not smooth when you are previewing the dashboard.
Operations respond slowly when you are editing a component.
Function Description
FineBI provides a Performance Analysis function to help you quickly and conveniently solve performance-related problems that may happen when you are previewing or editing dashboards, or editing self-service datasets.
Notes
1. For FineBI 6.0.16 and later versions, Performance Analysis is provided by the product by default.
For FineBI 6.0.15 and earlier versions, it is provided by a built-in FineBI direct connection performance analysis plugin.
The plugin is disabled by default and automatically updates with the product. To use the Performance Analysis function, enable this plugin.
2. The Performance Analysis function of FineBI 6.0.16 and later versions applies to both real-time data and extracted data.
For FineBI 6.0.15 and earlier versions, it only applies to real-time data.
Procedure
Executing Performance Analysis
Performance Analysis is available at many places in FineBI.
Content | Location |
---|---|
Data | On the data editing interface of a subject in My Analysis |
Component | On the component editing interface of a subject in My Analysis |
Dashboard | On the dashboard editing interface of a subject in My Analysis |
On the dashboard preview interface of a subject in My Analysis | |
On the dashboard in Directory |
Viewing Core Information
The core information is displayed after you click the Performance Analysis button. Core information helps you preliminarily judge the cause of performance issues.
Fields in the Core Info table are described below.
Field | Description |
---|---|
User | The FineBI user who triggers the performance analysis. |
Level-1 Resource | If the analyzed content is data, the level-1 resource is the dataset name. If the analyzed content is a dashboard, the level-1 resource is the dashboard name. |
Level-2 Resource | If the analyzed content is data, the level-2 resource is the analysis step in Data Source. If the analyzed content is a dashboard, the level-2 resource is the component in the dashboard. |
Query ID | The universally unique identifier (UUID) of each query request. |
Query Wait Time (ms) | The time it takes to enter the query preparation stage after a click for a query. |
Query Preparation Stage (ms) | If the queried content is direct connection data, it represents the time spent on generating SQL statements. If the queried content is extracted data, it represents the time spent by the engine on generating the query description. |
Query Execution Time (ms) | If the queried content is direct connection data, it represents the time spent by the direct connection database on executing SQL statements. If the queried content is extracted data, it represents the time spent by the engine on calculation. |
Data Transfer Time (ms) | The time spent on returning query results to FineBI. For a direct connection engine, the item is displayed as 0.
|
Memory Calculation Time (ms) | The time spent on calculating all FineBI codes. For example, the time spent on pagination calculation and secondary calculation, etc. |
Frontend Render Time (ms) | The sum of the time spent on front-end JS calculation, rendering, and display after the back-end calculation is completed. |
Total Query Time (ms) | The total time from the user's click for query to the front-end loading completion. |
Query Start Time | The exact time when the user triggers performance analysis, accurate to seconds. |
Viewing Details
To confirm the cause of a performance issue and get corrective methods, you can check the details of the corresponding query.
View detailed information on individual query requests online: Click Query ID to view the performance details of a query.
Export detailed information of all query requests for this object: Click Export Details to export the detailed information table to the local device.
Fields in the exported PerformanceAnalysis table are described below.
Column | Description |
---|---|
User | The FineBI user who triggers the performance analysis. |
Level-1 Resource | If the analyzed content is data, the level-1 resource is the dataset name. If the analyzed content is a dashboard, the level-1 resource is the dashboard name. |
Level-2 Resource | If the analyzed content is data, the level-2 resource is the analysis step in Data Source. If the analyzed content is a dashboard, the level-2 resource is the component in the dashboard. |
Component Type | 1: Group table 2: Cross table 3. Detail table 4: Chart 5: Self-service dataset 6: Filter component 7: Text component |
Query ID | The universally unique identifier (UUID) of each query request. |
Execution Stage | Wait Start Stage The stage of queuing due to browser restrictions. Query Preparation
SQL Execution
Data Transfer The stage where the results returned by the database are transferred to the BI server. Memory Calculation The stage where the direct connection engine conducts the calculation. Frontend Render
|
Fragment ID | ID of requests in one query. There may be multiple requests in one query. For example, stages of data connection creation, SQL execution, and data transfer may be split into multiple requests, requiring separate analyses for each. |
Time Consumption (ms) | The duration of this stage. |
Fragment Content | Name of the data connection established in the data connection creation stage. SQL statements executed in the SQL execution stage. If the SQL statement exceeds 30,000 characters, the exported Excel file will contain two sheets, where one contains the detailed information and the other lists the SQL statement exceeding 30,000 characters. If there is an inserted temporary table, identifiers like excel insert cost xxx | select * ... will appear in front of the SQL statement. |
Number of Returned Result Set Rows | The number of rows in the returned result set of stages of data transfer, memory calculation, and frontend render. |
Number of Returned Result Set Columns | The number of columns in the returned result set of stages of data transfer, memory calculation, and frontend render. |
Execution Engine Type |
|
Start Time | The moment when the Execution Stage starts. |
End Time | The moment when the Execution Stage ends. |
Exception Info | The error message if an error occurs at a certain stage, which can be printed. |
Query Request Summary | The total duration of all execution stages of this query. The start and the end time of this query. |
Total | The total duration of all execution stages of all queries. The start and the end time of all queries. |
Performance Feedback
If you discover template issues, click the Performance Feedback button to inform the administrator.
After receiving the feedback message, the super administrator can urge the corresponding personnel to optimize the dashboard/dataset based on the feedback.
Troubleshooting
Logic Explanation
See the following table for the matching and calculation logic of time (in the core information) and execution stages (in the detailed information).
Time in Core Info | Execution Stage in Details | Description |
---|---|---|
Query Wait Time | Wait Start Stage | Definition: The time it takes to enter the query preparation stage after a click for a query as the query is queued due to browser restrictions. Generally, if 6 browser requests are not returned, the 7th and subsequent requests in the browser will be blocked. Calculation logic: For 6.0.16 and later versions: [(time of request response - time of request initiation) - time consumed by backend query] For 6.0.15 and earlier versions: server StartTime in the response to the request (BI server time) - start time of the query request (user's browser time) (due to possible time zone/time differences between the browser and server, the time value may be negative). Troubleshooting: 1) Excessive number of concurrent queries 2) Exceeding browser concurrency limits |
Query Preparation Stage | Execution Plan Construction | Definition: The stage where the FineBI engine constructs the query after receiving a query request. The stage where the self-service dataset generates the ETLFlow. Calculation logic: The process where the Widget generates the BICriteria or the HyperCriteria. The process where the ETLContext generates the ETLFlow. Troubleshooting: Complex dataset/template/component |
SQL Generation and Optimization | Definition: The stage where the query is converted into SQL statements and then optimized. Calculation logic: The time of SQL generation and optimization. | |
/ | Data Connection Creation | Definition: The stage where the connection with the database is established. Calculation logic: The time when the database connection is established in the database source engine. |
Query Execution Time | SQL Execution | Definition: The time when the database executes the query or the TCERID execution time Due to the inclusion of the temporary table, the SQL execution time may be longer than what is shown in the log. If the SQL statement executed in the SQL execution stage exceeds 30,000 characters, the exported Excel file will contain two sheets, where one contains the detailed information and the other lists the SQL statement exceeding 30,000 characters. If there is an inserted temporary table, identifiers like excel insert cost xxx | select * ... will appear in front of the SQL statement. Calculation logic: The time when the database executes the query in the database source engine. Troubleshooting: 1) Database performance issues 2) SQL statements to be optimized |
Data Transfer Time | Data Transfer (Database-BI) | Definition: The time spent on returning database query results to the FineBI server. Calculation logic: Duration of transferring query result set from the database to the FineBI server + duration of data compression/data model generation. It is normal for this time value to be 0 if the above two parts are missing. Troubleshooting: 1) Check the server network if the duration of transferring the database query result set to the FineBI server is too long. 2) Optimize the analysis logic if the data model construction takes too long. |
Memory Calculation Time | Memory Calculation | Definition: The time spent on calculation by the direct connection engine and on calculating all FineBI codes. Calculation logic: This time value is 0 for self-service datasets. For dashboards, it includes the time spent on the following processes. Grouping: postGroup time Sort calculation: tree sort Page calculation: groupPage procedure time Sorting-based calculation: treeSortGist Tree filter calculation: groupTreeFilter Tree construction: treeMaker time Troubleshooting: The result set returned by the query is too large, requiring optimizing the analysis logic. |
Frontend Render Time | Data Transfer (BI Server-User Browser) | Definition: The time spent by the BI server on transferring data to the user's browser. Calculation logic: The interval from the frontend receiving to the backend ending. |
Frontend Render | Definition: The sum of the time spent on front-end JS calculation, rendering, and display after the backend calculation is completed. Calculation logic: The interval from the frontend receiving to the component rendering ending. Troubleshooting: Excessive number of page lines. | |
Total Query Time | / | The total time from the user's click for query to the front-end loading completion. |
Query Start Time | / | The exact time when the user triggers performance analysis. |
Troubleshooting
Problem | Cause Analysis |
---|---|
The Export Details button is in gray and cannot be clicked. | Cause analysis: The detailed information cannot be exported while the query is being executed. Solution: You can export the detailed information after the query is finished. |
The value of Query Wait Time is negative. | Cause analysis: For 6.0.15 and earlier versions:Quey Wait Time = server StartTime in the response to the request (BI server time) - start time of the query request (user's browser time). Due to possible time zone/time differences between the browser and server, which may cause millisecond-level differences, the time value may be negative. Solution: Update the project to 6.0.16 or later versions and optimize the logic of Query Wait Time. |
The value of Query Execution Time is 0. | Cause analysis: The query hit the cache and did not retrieve data from the database. Solution: Modify the cache strategy of single tables, and then perform performance analysis. |
The query execution time does not match the time in the backend logs. | Cause analysis: The data set is created using a temporary table. The execution time of the temporary table will be calculated during performance analysis, which is not calculated in the background log, so the two are inconsistent. Solution: It's normal, and no solution is needed. |
The total query time is not equal to the sum of time spent on each query. | Cause analysis: A component may trigger multiple SQL statements, which are not necessarily executed in turn. The query execution time is equal to the sum of the value of all SQL Execution stages. The query execution time in the total query time is the interval from the start of executing the first SQL statement to the end of executing the last SQL statement. The two are not equal, and the total query time may be shorter than the sum of time spent on each query. Solution: No solution is needed. |
In the detailed information of a single query, there are multiple SQL Generation and Optimization stages. | Cause analysis: A component may trigger multiple SQL statements. Operations such as deduplication, getting the median, fixed, etc. involve multiple SQL statements as calculating the total value of the parent node is required. Solution: It's normal, and no solution is needed. |