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
asked 5 years ago170 views
1 Answer

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions