# How to check Query execution time as per the source DB

**URL:** <https://forums.percona.com/t/how-to-check-query-execution-time-as-per-the-source-db/22772>\
**Category:** Uncategorized\
**Created:** [June 13, 2023, 9:00am UTC](https://forums.percona.com/t/how-to-check-query-execution-time-as-per-the-source-db/22772 "2023-06-13T09:00:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)\
**Post date:** [June 13, 2023, 9:00am UTC](https://forums.percona.com/t/how-to-check-query-execution-time-as-per-the-source-db/22772/1 "2023-06-13T09:00:12Z")

</div>

We would like to know, when the query has been executed as per the destination DB. Is there any Time stamp column that we are maintaining in the backend as per the destination DB execution time?

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/d/d2c4e060b8eeab365d559146c165a7757bf24a3d.png)

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [June 13, 2023, 11:27am UTC](https://forums.percona.com/t/how-to-check-query-execution-time-as-per-the-source-db/22772/2 "2023-06-13T11:27:29Z")

</div>

Hi, the query was executed every time there is a yellow bar in the graph to the right. You can hover the cursor over to see the execution timestamps.

---

<div class="post-metadata">

**Author:** ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)\
**Post date:** [June 13, 2023, 12:43pm UTC](https://forums.percona.com/t/how-to-check-query-execution-time-as-per-the-source-db/22772/3 "2023-06-13T12:43:51Z")

</div>

Hi @Ivan_Groenewold

Thank you for the details. Please let me know the information of the backend date and time field.  
We are actually attempting to comprehend where and how it is being stored in the backend in order to customize our dashboard with the necessary information, such as a date column, query, execution time, etc.

**For the query below, we want a datetime column.**

SELECT  
any(node\_name) Node\_name,  
fingerprint Query,  
sum(num\_queries)/($\_\_to-$\_\_from)\*1000 QPS,  
sum(m\_rows\_examined\_sum)/sum(m\_rows\_sent\_sum) as Rows\_exam\_per\_sent,  
sum(m\_rows\_examined\_sum)/($\_\_to-$\_\_from)\*1000 as Rows\_examined,  
sum(m\_rows\_affected\_sum)/($\_\_to-$\_\_from)\*1000 as Rows\_affected,  
sum(m\_query\_time\_sum)/sum(m\_query\_time\_cnt)\*1000 as Latency\_ms  
FROM $table  
WHERE $timeFilter and service\_name in ($service\_name)  
GROUP BY fingerprint  
ORDER BY Latency\_ms desc limit 20

---

<div class="post-metadata">

**Author:** ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)\
**Post date:** [June 15, 2023, 8:45am UTC](https://forums.percona.com/t/how-to-check-query-execution-time-as-per-the-source-db/22772/4 "2023-06-15T08:45:50Z")

</div>

Can someone pleas help me with the above requirement?
