>From a pure performance direction,
pls_integer or binary_integer is probably
the fastest.

If you declare a variable to be of
    table_name.column_name%type
there are implicit constraints on the
variable and any pl/sql assignments
(in particular arithmetic operations)
have to check that the result matches
those constraints. At one time I believe
this meant using a temporary variable
to hold a result, then copying the result
if the constraint was matched.

Having said that, you could try a few simple
tests to find out that the differences (in
new releases) are incredibly small.


Jonathan Lewis

Host to The Co-Operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases
See http://www.jlcomp.demon.co.uk/book_rev.html

For latest news of public appearances
See http://www.jlcomp.demon.co.uk

Screen saver or Life saver: http://www.ud.com
Use spare CPU to assist in cancer research.




-----Original Message-----
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Date: 27 August 2001 17:13


|Dear gurus !
|What is better performance-wise - to declare a variable inside a
pl/sql
|block (or a trigger) as integer (number , Pls_integer etc..) or as
|mytable.mycolumn%TYPE .
|Again , i'm concerned ONLY about performance in this question.
|
|Thanks a lot.
|
|DBAndrey
|
|* 03-9254520
|* 053-464562
|* mailto:[EMAIL PROTECTED]


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jonathan Lewis
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to