Enable the detail profiling for the requests. From Studio > Administration tab > Configuration panel > Server > Configuration > Debugging > set value true for 'Detailed Profiling Enabled'.
Screenshot of the configuration for reference :
NOTE : Changing this configuration does not require a TDV Server restart, however it is a local configuration i.e. it will take effect only on the particular TDV node. If it needs to be changed in all the nodes in a TDV cluster, the value needs to updated for each manually.
Screenshot of the Request Query plan after enabling profiling -
Background data source read time: Time spent by background threads in all FETCH and PROCEDURE nodes in the execution plan.
Background server processing time: Time spent by background threads in all the nodes (except for FETCH and PROCEDURE) in the execution plan.
Foreground server processing time: Fraction of the Elapsed execution time that the server used in the actual execution of the query; that is, the processing time of the nodes in the execution plan. This time does not include the time used to read rows from the data sources. By comparing this time with Foreground data source read time, you can determine how much time was spent by the server versus the time spent in the data sources.
Foreground data source read time: For SCAN or PROCEDURE. Fraction of the Elapsed execution time that the main thread used to read data from the data sources. By comparing this time with Foreground server processing time, you can determine how much time was spent by the server vs. the time spent in the data sources.
Once the query plans are obtained with the profiling details, disable the above configuration.