Cursor's base query

1

Hello, I see "fetch xx from curxx" queries taking long to run - how do I identify the declared cursor query?

Using the pid when I am looking to svl_qlog or stl_query, I see the session has -

2019-06-18 16:08:53	2019-06-18 16:08:53 SELECT COUNT(*) FROM sometable LIMIT 1 OFFSET 0  
2019-06-18 16:08:58	2019-06-18 16:51:39	FETCH 200 FROM CUR0```  
  
The fetch query seems to be running for long, fetching lots of data but the count(*) could not be the query from where its pulling the data. So how do I identify the base query. Would the pid change for the fetch query, if so how to co-relate them?  
  
Edited by: nmakb on Jun 18, 2019 2:19 PM
  • By any chance, did you find a solution for it?

nmakb
已提问 5 年前170 查看次数
1 回答

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则