APIM analytics 2.6.0, EI Analytics 6.4.0, 6.5.0, 6.6.0 are based on the WSO2 stream processor and APIM analytics 3.0.0, APIM analytics 3.1.0, APIM analytics 3.2.0 are based on the streaming integrator with some customization.
WSO2 products (APIM, EI) will publish the events to the Analytics node using thrift transport (TCP protocol). Please refer the documentation  for detailed information about analytics-related thrift transport and the Thrift Transport Thread Model.
Also, there will be a queue in the APIM/EI side to keep the events before sending the events to the analytics side. …
We may need to capture slow query logs to debug various issues in wso2 products.
In this documentation, we have explained the steps to capture the slow query logs of carbon-5 based wso2 products such as stream processor, APIM-Analytics-2.6.0 and above, IS-Analytics 5.7 and above, etc
By using this JDBC SPY logs, we can analyze the DB related queries, timing, resultsets, and connections.
You can enable the JDBC Spy logs for carbon-5 based WSO2 Servers as below.