rrrrr
rrrrr

Reputation: 9

How to kill long running queries through Pro*C?

We are interacting with DB though Pro*C. We want to find out the queries which are taking the longest time through Pro*C.

Is there a way to find out long running queries in Pro*C?

Upvotes: 0

Views: 252

Answers (3)

EvilTeach
EvilTeach

Reputation: 28882

oracle enterprise manager allows you to look at the running queries, and let's you look at the explain plan.

Upvotes: 1

Gary Myers
Gary Myers

Reputation: 35401

The Pro*C programs should be readily identifiable in V$SESSION through the PROGRAM column. I'd go further and explicitly set MODULE through DBMS_APPLICATION_INFO, which will allow you to track down individual SQLs in V$SQL.

Once you instrument your code, it becomes much easier to use the diagnostic facilities such as trace or any extras you may have paid for with the Diagnostics or Tuning packs

Upvotes: 1

Patrick Schlüter
Patrick Schlüter

Reputation: 11871

By testing the queries outside of C, with toad for instance? Or by counting the time they take with the normal C functions for timers?

Your question is too vague to give a specific answer.

Upvotes: 1

Related Questions