Database query A statement takes a long time

Source: Internet
Author: User

July 8, 2016

Today development provides a statement that deletes data from a table, DELETE statement. Put in the plsql and then found that the execution of a half an hour is not over, this time the development of the script needs to be executed, I would like to create a new session to execute the development of the provided statements, but a simple build table statement can not be executed.

I put the delete that session in the Plsql forced to turn off, just the Plsql window, although the tube long time to force off. However, the build statement is still not able to execute. Execution is no response. This time testers reflect the Click interface is very card, login client is also always in the state of spinning.

According to the above situation, may be just forced to close the Plsql window, although the window is turned off, but the process has not been turned off.

So how does the view process exist?

View this table

SELECT * from V$session

SELECT * FROM V$session a

where A.username= 'SYS' and a.terminal= 'sha-p07010086' and a.status= ' ACTIVE ';

This is because I executed the delete that was executed by the SYS user, and my Computer name is sha-p07010086

View process Number

SELECT * FROM V$process

SELECT * from V$sqlarea b

where b.sql_id in (' Dauuu7kkf7xma ', ' gs36qsq4dju1v ');


Kill the process

Alter system kill session ' 133,15615 ' immediate;

After this, the process of my delete is killed.

It's better to look at the data later. After the testers have re-landed the app, it's okay.

Database query A statement takes a long time

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.