Home > database >  Have a great god know how to check how long the current activity of SQL has been carried out..
Have a great god know how to check how long the current activity of SQL has been carried out..

Time:09-26

RT, to see how long SQL has been executed in current single activity,,

CodePudding user response:

Come on!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

CodePudding user response:

If ran only once, so you can check the v $SQL. Elapsed_time fields, or even difficult, unless prior to do the Settings, and run to know how much the total time, such as
Note: elapsed_time field is the unit of milliseconds

CodePudding user response:

refer to the second floor minsic78 response:
if ran only once, so you can check the v $SQL. Elapsed_time fields, or even difficult, unless prior to do the Settings, and run to know how much the total time, such as
Note: elapsed_time field is the unit of milliseconds

By the way, if your SQL opened in parallel, then can do more

CodePudding user response:

refer to the second floor minsic78 response:
if ran only once, so you can check the v $SQL. Elapsed_time fields, or even difficult, unless prior to do the Settings, and run to know how much the total time, such as
Note: elapsed_time field is the unit of milliseconds
is there a dictionary can record the SQL execution time to start

CodePudding user response:

reference 4 floor qq_39965382 response:
Quote: refer to the second floor minsic78 response:

If ran only once, so you can check the v $SQL. Elapsed_time fields, or even difficult, unless prior to do the Settings, and run to know how much the total time, such as
Note: elapsed_time field is the unit of milliseconds
is there a dictionary can record the SQL execution time to start?


Dynamic performance view records will only be cumulative value, will not have a single record, so, need to perform for the first time to get the information you want, if this was in fact a process of demand, you can use program to realize this function, program for the SQL timing, of course, may be a little more time

CodePudding user response:

reference 4 floor qq_39965382 response:
Quote: refer to the second floor minsic78 response:

If ran only once, so you can check the v $SQL. Elapsed_time fields, or even difficult, unless prior to do the Settings, and run to know how much the total time, such as
Note: elapsed_time field is the unit of milliseconds
is there a dictionary can record the SQL execution time to start?


Well, I reply a bit irrelevant,

To the starting time of the SQL, you also need to SQL execution, for the first time in the v $SQL has two fields: first_load_time cursor generation time (father) and last_load_time (execution plan generated time), the two time a close to the time and you send the SQL database, one with the entered the stage of execution time of the SQL (here has a premise, for the first time, need the SQL execution), can be reference,

Actually to now also don't know what is your real demand, should not only want to know how long it will take SQL has performed this kind of problem?

CodePudding user response:

reference 5 floor minsic78 reply:
Quote: refer to 4th floor qq_39965382 response:

Quote: refer to the second floor minsic78 response:

If ran only once, so you can check the v $SQL. Elapsed_time fields, or even difficult, unless prior to do the Settings, and run to know how much the total time, such as
Note: elapsed_time field is the unit of milliseconds
is there a dictionary can record the SQL execution time to start?


Dynamic performance view records will only be cumulative value, will not have a single record, so, need to perform for the first time to get the information you want, if this was in fact a process of demand, you can use program to realize this function, program for the SQL timing, of course, may be a little more time
don't look at the total time, did not start the current dictionary is a record of SQL execution of that point in time? Is a point in time, and in addition to open the SQL trace

CodePudding user response:

refer to 6th floor minsic78 response:
Quote: refer to 4th floor qq_39965382 response:

Quote: refer to the second floor minsic78 response:

If ran only once, so you can check the v $SQL. Elapsed_time fields, or even difficult, unless prior to do the Settings, and run to know how much the total time, such as
Note: elapsed_time field is the unit of milliseconds
is there a dictionary can record the SQL execution time to start?


Well, I reply a bit irrelevant,

To the starting time of the SQL, you also need to SQL execution, for the first time in the v $SQL has two fields: first_load_time cursor generation time (father) and last_load_time (execution plan generated time), the two time a close to the time and you send the SQL database, one with the entered the stage of execution time of the SQL (here has a premise, for the first time, need the SQL execution), can be reference,

Actually to now also don't know what is your real demand, should not only want to know how long it will take SQL has performed this kind of problem?
has a monitoring system to get a interface shows the current activity SQL execution time more than five minutes, and now is the SQL could not run for the first time, and I want to if have to record the SQL execution time to start point, use sysdate - the starting time of the SQL is executed SQL time,,

CodePudding user response:

The building Lord, is my empirical above, I check the definition of the v $session, found a field may be what you want:

The
reference
SQL_EXEC_START DATE Time when the execution of the SQL currently executed by this session started. NULL if the SQL_ID is NULL

CodePudding user response:

references 9 f minsic78 response:
the building Lord, above is my empirical, I check the definition of the v $session, found a field may be what you want:

The
reference
SQL_EXEC_START DATE Time when the execution of the SQL currently executed by this session started. NULL if the SQL_ID is NULL
yes!!!!!! Thank you!!!!!!

CodePudding user response:

  • Related