Dear Gurus,

I have two SQL function that produce different times and I can't understand
why. Here is the basic difference between them:

CREATE FUNCTION test_const_1234 () RETURNS int4 AS '
  SELECT ... 1234 ... 1234 .... 1234 ...
' LANGUAGE 'SQL';

CREATE FUNCTION test_param (int4) RETURNS int4 AS '
  SELECT ... $1 .... $1 .... $1 ...
' LANGUAGE 'SQL';

Some sample times for different data:

test_const_1234()     450 msec
test_param(1234)     2700-4000 msec (probably disk cache)
test_const_5678()   13500 msec
test_param(5678)    14500 msec

Is there a sane explanation? a solution?
I can send more info if you wish.

TIA,
G.
------------------------------- cut here -------------------------------


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to