Queries Profiler UI: Dashboard for Query Profiling
Introduction
In release 4.2, a query metrics system was created to have more information about the queries that are executed in the system (these metrics are stored in the QueryMetrics Entity).
For version 4.3.0, a new UI has been created (built as a dashboard) that allows a complete profiling of the queries that are executed within the platform.
Where is it accessed from and who has permission to see it?
Only platform users with administrator role can see it.
Access is from this menu entry:
Tools → Queries Profiler UI
Pages that make up the dashboard
This dashboard is made up of two pages.
You can navigate between them with these tabs.
Â
Summary Report:
This view shows KPIs, which allow drawing conclusions about which queries are slower, total queries grouped over time, comparisons on the average time spent in the query depending on the origin, or the total number of queries and errors from these or from the users. Besides, data filtering is allowed so that the information can be focused, for example for certain types of query, users, entities, …
Detail
In this view you have access to the information on all the queries that are made on the platform: whether they have been executed correctly or if they have given an error, the type of query be it is SQL or MONGO, the component from which it has been launched, be it Control Panel or Dashboard, etc., the miliseconds that the main entity that has been queried has taken to execute, etc.
Â
Summary Report page composition
We will next fragment the Summary Report view into the different components:
Filter form:
Comparison of the average consumption of queries based on their origin.
Graph that shows the accumulated number of queries by origin, and it allows you to zoom in with the mouse, view it as bars or lines, and download it as an image.
Total number of errors per user, it shows the accumulated number of queries that have given errors per user, allowing to compared them visually, as in here, for example, where you can clearly see that there is a user with many more erroneous queries than the rest.
It shows a graph ordered from highest to lowest total number of queries per user. As in the previous bar graph, you can zoom in with the mouse, view it as bars or lines, and download it as an image.
In this case, the comparison is made based on the origin of the query, showing the total number of erroneous queries and the percentage by origin.
This graph allows you to view the total number of queries by date, for the last day, last 30 days, 60 days or three months.
Â
This table shows the information related to the ten queries that have taken the longest to perform, and can be expanded to show all the details of the query, such as the query itself, the type of query,...
These KPIs show the total number of queries and the total number of erroneous queries, with the percentage they represent.
Â
Detail page composition
We will next fragment the view into the different components.
Filter form:
In it we can see that one of the selectors or filters allows you to select date ranges, to simplify the search, being able to see the records of the last hour, the last 12 hours, ...
This component allows you to filter the search, in a range of time spent in the execution of the queries. 100% would be above the most expensive query.
Table paginated on the server with the information of the queries. It can be ordered by the different fields. It is shown in green or red depending on the status and the time consumed by the query. The information can be filtered by the previous form, making it much more easy to find the queries to detect possible errors.
Â