Optimizing KQL reports

Optimization is challenging, no matter what you are doing, and unfortunately, reporting in GFI HelpDesk is no exception.

How to make the process of writing, rendering, and processing reports most effective?

Today, these questions concern a majority of the users working with reports in GFI HelpDesk.

Optimizing KQL (Kayako Query Language) reports is a set of actions aimed at improving the speed of report rendering and reducing memory usage. To optimize your report performance, you need to know the right tools, and how to focus on the target result set which you want to see.

Understanding how reports work?

With the KQL reports, it is essential to know that it fetches data directly from the database; thus, it uses MySQL and server resources to fetch any results. So, the only way to make a query run faster is to reduce the number of calculations that the software (and, therefore, resources) must perform.

The optimization here lies in two directions: increasing the speed of report rendering and reducing memory usage.

Optimizing KQL reports

To increase the speed of rendering reports, it is necessary to request only needed data from large databases. That is, if for the report, you need results only from a given time range, then there is no need to fetch all the data available in the database. Otherwise, a huge amount of resources is spent on it to get all the data, not to mention the time spent. So, you need some understanding of how MySQL makes calculations.

The following section describes the basic statements that must be checked before moving on to query plans: