473,395 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Spaces and comments in pgplsql

Hello,
I have a question about pgplsql:

Is it faster to execute a compact function (with minimal spaces and comments)
than a function with many comments and many spaces?

In others words, which one will be faster? AAAAA_function or BBBBB_function ?

CREATE FUNCTION AAAAA_function RETURNS INTEGER AS '
DECLARE
a_var INTEGER;
BEGIN
SELECT SUM(field) INTO a_var FROM a_table;
RETURN a_var;
END;
' LANGUAGE 'plpgsql';

CREATE FUNCTION BBBBB_function RETURNS INTEGER AS '
DECLARE

--
-- Bla bla bla
--
a_var INTEGER; -- Lot of spaces...

BEGIN

--
-- Rebla bla bla
--

SELECT SUM( field ) INTO a_var FROM a_table ; -- Selecting...

-- ...

RETURN a_var ;

END;
' LANGUAGE 'plpgsql';
Thank you very much

Luc

Jul 19 '05 #1
0 1980

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

Similar topics

17
by: bearophileHUGS | last post by:
Hello, I know this topic was discussed a *lot* in the past, sorry if it bores you... >From the Daily Python-URL I've seen this interesting Floating Point Benchmark:...
5
by: Christian Traber | last post by:
Hi, I'll try to switch from Oracle to postgres for some small applications. Is it possible to build functions like Oracle's nvl or decode with pgplsql? How can I make a function like nvl that...
2
by: Kuti Attila | last post by:
Hi, I have a pgplsql function. It is quite short and simple. The problem:
1
by: Howard | last post by:
is there a quick option in asp.net or visual studio 2005 to strip out all unessesary spaces in the html output? and html comments? I want to save bandwidth, readability is not an issue
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
5
by: howa | last post by:
will performance increae if I removed comments & space from source code using php -w ...? given that i don't need to modify the source code, & don't use any cache?
0
by: MLH | last post by:
In an earlier post today, it was mentioned that dbl-spaces caused alignment-justification problems when printing labels. I've never noticed this in reports except for those meant for the...
0
by: Didje | last post by:
Hi, I'm trying to design a kind of calculator GUI using gridbaglayout. At the top of the calculator will be a couple of menus and then will come the section with all the buttons etc. Initially, I...
2
by: watusiboy | last post by:
<TEXTAREA NAME="comments" ROWS="10" COLS="50"> <?php echo $comments; ?> </TEXTAREA> this is a very simple question. the textarea above automatically adds three tab spaces at the beginning. as...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.