为什么要从客户端应用程序调用PL / SQL调用SQL Engine? [英] Why SQL Engine is called for PL/SQL call from client application?

查看:179
本文介绍了为什么要从客户端应用程序调用PL / SQL调用SQL Engine?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我只是调用数据库相关活动的存储过程。

In my application, am just calling the stored procedure for database related activities.

我已经发布了一个问题此处查看性能相关查询。

I have already posted one question here for performance related queries.

Rob Mascaro回答了我的查询,并在他的回答中有一个语句

Rob Mascaro answered my queries, and there is an statement in his answer like

在您的C ++应用程序调用内调用将调用SQL引擎,然后为过程调用调用PLSQL引擎*

是为什么sql引擎需要调用时调用PL / SQL?
为什么我的客户端应用程序不能直接调用PL / SQL引擎来处理PL / SQL?

And my question is why sql engine need to be called while calling the PL/SQL? Why can't my client application directly call the PL/SQL engine for processing the PL/SQL?

推荐答案

SQL引擎不总是需要被调用 - 它取决于客户端和客户端是否嵌入了PLSQL引擎。例如,Oracle Forms具有嵌入式PLSQL引擎,因此在调用PLSQL过程时,整个调用可以传递到引擎,并且不会发生上下文切换。然而,使用PRO * C,你总是执行SQL语句,然后执行PLSQL调用的块,如下:

The SQL engine doesn't always need to be called - it depends on the client and whether the client has the PLSQL engine embedded in it. For instance, Oracle Forms has an embedded PLSQL engine therefore when calling a PLSQL procedure, the whole call can be passed to the engine and no context switching occurs. However with PRO*C you are always executing SQL statements which then execute "blocks" of PLSQL call like this:

begin
   call_proc;
end;

这已经调用了SQL解析器,然后一旦开始匿名就切换到PLSQL引擎块被执行。这只是客户端架构的方式。 SQL * Plus是类似的,你运行SQL引擎来调用PLSQL块。

This has invoked the SQL parser which then switches to the PLSQL engine as soon as the "begin" anonymous block is executed. This is just the way the client is architected. SQL*Plus is similar, you run the SQL engine to call the PLSQL blocks.

这篇关于为什么要从客户端应用程序调用PL / SQL调用SQL Engine?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆