Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Slow response with packaged varaibles...
Oracle 8.1.7.3 on HPUX 11.0
In our third party developed app, I have noticed the response time with packaged variables, or anything _not_ hardcoded, seems to much slower than hardcoding. See below:
QL*Plus: Release 8.1.7.0.0 - Production on Tue Jul 8 13:49:01 2003
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.3.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.3.0 - 64bit Production
SQL> spool r.out
SQL> DECLARE
2 p_rowtype host_orderdetail%rowtype;
3 BEGIN
4 SELECT hd.*
5 INTO p_rowtype 6 FROM host_orderdetail hd 7 WHERE hd.host_status = 'RELEASE' 8 AND hd.orderid NOT IN 9 ( 10 SELECT ho.orderid 11 FROM host_orders ho 12 WHERE ho.host_status IN ('RELEASE', 13 'ERROR') 14 ) 15 ORDER BY adddate ASC;
Elapsed: 00:00:00.02
SQL>
SQL> DECLARE
2 p_rowtype host_orderdetail%rowtype;
3 pc_HOST_RELEASE CONSTANT host_sku.host_status%TYPE :=
'RELEASE';
4 pc_HOST_ERROR CONSTANT host_sku.host_status%TYPE :=
'ERROR';
5 BEGIN
6 SELECT hd.*
7 INTO p_rowtype 8 FROM host_orderdetail hd 9 WHERE hd.host_status = pc_HOST_RELEASE 10 AND hd.orderid NOT IN 11 ( 12 SELECT ho.orderid 13 FROM host_orders ho 14 WHERE ho.host_status IN (pc_HOST_RELEASE, 15 pc_HOST_ERROR) 16 ) 17 ORDER BY adddate ASC;
Elapsed: 00:03:42.17
SQL>
Does anyone have any insight as to why is the variable version so much
slower than the hardcoded value?
Thanks,
Steve Received on Tue Jul 08 2003 - 13:17:13 CDT
![]() |
![]() |