473,473 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

loss of performance when using anonymous pl/sql blocks?!

Instead of using a set of different sql-statements i have decided to use
an single, anonymous pl/sql block with host-variables. For example:

DECLARE
cmp NUMBER := :hostvariable;
BEGIN
UPDATE t_sample SET c_id=0 WHERE tid>cmp;
END;

Are there any disadvantages concerning simle update-statement?
Won't oracle cache such blocks, do they need more processing time or
more cpu-power on the server? Or does oracle treat them as any other
sql statement?

thx, markus
Jul 19 '05 #1
2 3486

"Markus Breuer" <ma***********@gmx.de> wrote in message
news:3F**************@gmx.de...
Instead of using a set of different sql-statements i have decided to use
an single, anonymous pl/sql block with host-variables. For example:

DECLARE
cmp NUMBER := :hostvariable;
BEGIN
UPDATE t_sample SET c_id=0 WHERE tid>cmp;
END;

Are there any disadvantages concerning simle update-statement?
Won't oracle cache such blocks, do they need more processing time or
more cpu-power on the server? Or does oracle treat them as any other
sql statement?

thx, markus

The fastest way would be a straight insert with a host variable, keep the
cursor around, rebind and reexecute. If you were inserting a lot of rows at
a time then use the array interface to blast them in 100 or more rows at a
time.
Jim
Jul 19 '05 #2
Markus Breuer <ma***********@gmx.de> wrote in message news:<3F**************@gmx.de>...
Instead of using a set of different sql-statements i have decided to use
an single, anonymous pl/sql block with host-variables. For example:

DECLARE
cmp NUMBER := :hostvariable;
BEGIN
UPDATE t_sample SET c_id=0 WHERE tid>cmp;
END;

Are there any disadvantages concerning simle update-statement?
Won't oracle cache such blocks, do they need more processing time or
more cpu-power on the server? Or does oracle treat them as any other
sql statement?

thx, markus

why dont you run it and find out? Oracle will still cache it. This
shouldnt have any effect on performance.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Doug Holton | last post by:
Is there any metaclass trick or something similar to allow anonymous code blocks? I'd like to be able to let users do something like this fictitious example: b = Button() b.OnClick =: print...
6
by: Erik Cruz | last post by:
Hi. I have read several articles recommending avoid to raise exceptions when possible, since exceptions are expensive to the system. Removing code from Try... Catch blocks can help performance?...
4
by: zzfreddybb | last post by:
We are using HP aCC compiler on a HP Itanium box ( 11.23) We are having some severe performance hits using exception handling ( try/catch ) scenarios. The online aCC documentation says: HP...
9
by: Java script Dude | last post by:
In many languages, it is necessary to string together multiple strings into one string for use over multiple lines of code. Which one is the most efficient from the interpreters perspective: ...
18
by: zebi | last post by:
hello, What's your opinion : The best type of temporary tablespace (DB2V7.2 SP 7 in AIX 4.3 / multiprocessor ) is DMS ou SMS ? Thanks ZEB
6
by: RepStat | last post by:
I've read that it is best not to use exceptions willy-nilly for stupid purposes as they can be a major performance hit if they are thrown. But is it a performance hit to use a try..catch..finally...
4
by: serge | last post by:
I am doing a mass update of our SQL script files by adding dbo. to all references to the tables. The code is also adding dbo. in front of existing lines of code that are like this: SELECT...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
2
by: Markus Breuer | last post by:
Instead of using a set of different sql-statements i have decided to use an single, anonymous pl/sql block with host-variables. For example: DECLARE cmp NUMBER := :hostvariable; BEGIN UPDATE...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.