会话后台运行引起并行进程释放问题
有一套rac数据库,一个业务报表逻辑非常复杂,sql语句达到了600多行,表关联有20多个,采取了并行查询的方式去优化,而这个并行查询虽然速度上得到了解决,但是经常出现几个月之前的进程都不释放的状态,而且这些遗留的并行进程拖慢了系统的运行,最后经常不
有一套rac数据库,一个业务报表逻辑非常复杂,sql语句达到了600多行,表关联有20多个,采取了并行查询的方式去优化,而这个并行查询虽然速度上得到了解决,但是经常出现几个月之前的进程都不释放的状态,而且这些遗留的并行进程拖慢了系统的运行,最后经常不得不采取手动kill掉这些并行进程来释放压力。
查看了很多的文档并没有发现一个合适的说法,而这些并行进程都是在进行PX Deq:Execution Msg或者PX Deq Credit: send blkd等待,做hanganalyze也找不到问题的原因,mos上也没发现疑似的bug。
看见mos这篇文章
PX Deq Credit: Send Blkd Waits Seen after CTRL-C on a Session and Parallel Query Slaves Not Released (文档 ID 1545069.1)
Cause:
This is not a bug per Bug 1837760: PARALLEL QUERY SLAVE DOES NOT GET RELEASED AFTER CTRL-C TO CANCEL THE QUERY, which was closed as an enhancement request. Slaves will be considered "busy" until a SQL statement completes and releases the cursor. If a session is CTRL-C'd, the cursor will remain open until either (1) another SQL statement is issued in the session, or (2) the session is exited. This behavior continues through 11g and higher
Solution:
If you CTRL-C a session running in parallel, either issue another SQL statement to release the slaves, or exit the session.
这篇文章大概说的就是一个并行查询如果被终止了,这些并行进程依然还会存在,并进行一些PX Deq的等待,而解决办法是需要在当前这个session中执行另一个查询或者exited退出这个会话。
根据上面的文章小鱼手动做了这个复杂模块的查询,然后又叉掉了这个模块,过了很长的时间这个对应的并行进程并不释放,而查询这些并行进程发现对应的sql语句正是这个复杂的sql语句。
这个600多行的sql语句不采用并行执行是相当的慢,调优由于网络等因素都不方便,所以建议做的是并行,但是由于是客户操作某个模块触发的这个复杂的sql,而且有时候如果半天不响应就直接叉掉了那个模块重来,而叉掉这个模块的动作并不会清除当前这个会话,正是这个会话后台运行导致了oracle的pmon进程不会去释放一个运行的好好的进程,从而引起了太多的看似没有释放的并行进程,其实在oracle看来这些并行进程还在正常运行,根本就不需要释放,其实也就是会话后台运行引起的并行进程不释放,而为什么叉掉这个模块后,会话依然还在后台运行,这个可能跟中间件等相关,而这个中间件用的weblogic。
原文地址:会话后台运行引起并行进程释放问题, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The solution to the Discuz background login problem is revealed. Specific code examples are needed. With the rapid development of the Internet, website construction has become more and more common, and Discuz, as a commonly used forum website building system, has been favored by many webmasters. However, precisely because of its powerful functions, sometimes we encounter some problems when using Discuz, such as background login problems. Today, we will reveal the solution to the Discuz background login problem and provide specific code examples. We hope to help those in need.

How to execute .sh file in Linux system? In Linux systems, a .sh file is a file called a Shell script, which is used to execute a series of commands. Executing .sh files is a very common operation. This article will introduce how to execute .sh files in Linux systems and provide specific code examples. Method 1: Use an absolute path to execute a .sh file. To execute a .sh file in a Linux system, you can use an absolute path to specify the location of the file. The following are the specific steps: Open the terminal

PyCharm is a very popular Python integrated development environment (IDE). It provides a wealth of functions and tools to make Python development more efficient and convenient. This article will introduce you to the basic operation methods of PyCharm and provide specific code examples to help readers quickly get started and become proficient in operating the tool. 1. Download and install PyCharm First, we need to go to the PyCharm official website (https://www.jetbrains.com/pyc

Do you know how to run m files in matlab? Below, the editor will bring you a tutorial on how to run m files in matlab. I hope it will be helpful to you. Let’s learn with the editor! 1. First open the matlab software and select the upper left "Open" the corner, as shown in the picture below. 2. Then select the m file to be run and open it, as shown in the figure below. 3. Press F5 in the window to run the program, as shown in the figure below. 4. We can view the running results in the command line window and workspace, as shown in the figure below. 5. You can also run the file by clicking "Run" directly, as shown in the figure below. 6. Finally, you can view the running results of the m file in the command line window and workspace, as shown in the figure below. The above is the matlab method that the editor brought to you

Detailed explanation of the Linux process priority adjustment method. In the Linux system, the priority of a process determines its execution order and resource allocation in the system. Reasonably adjusting the priority of the process can improve the performance and efficiency of the system. This article will introduce in detail how to adjust the priority of the process in Linux and provide specific code examples. 1. Overview of process priority In the Linux system, each process has a priority associated with it. The priority range is generally -20 to 19, where -20 represents the highest priority and 19 represents

Are you worried about WordPress backend garbled code? Try these solutions, specific code examples are required. With the widespread application of WordPress in website construction, many users may encounter the problem of garbled code in the WordPress backend. This kind of problem will cause the background management interface to display garbled characters, causing great trouble to users. This article will introduce some common solutions to help users solve the trouble of garbled characters in the WordPress backend. Modify the wp-config.php file and open wp-config.

There are three ways to open the Run dialog: using the Win + R shortcut, through the search function, or by typing "Run" directly in the Start screen.

Essential PHP programs: Install these to run smoothly! PHP is a popular server-side scripting language that is widely used to develop web applications. To successfully run a PHP program, you first need to install some necessary software and tools on the server. In this article, we will introduce the software and tools that must be installed, along with specific code examples to help you run PHP programs smoothly. 1. PHP interpreter The core of the PHP program is the PHP interpreter, which is responsible for parsing and executing PHP code. To install the PHP interpreter, you can follow
