Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Using Bind Variables and Active Server Pages

Using Bind Variables and Active Server Pages

From: <markag_at_my-deja.com>
Date: Wed, 08 Dec 1999 20:44:47 GMT
Message-ID: <82mfvu$oc2$1@nnrp1.deja.com>


I don't know if this is possible, but I'd like to use bind variables in some SELECT statements that are being used in an Active Server Page.

When I execute my SQL statement

select Count(*)
from MP, AA, AN
where MP.address_id = AA.ADDRESS_ID(+)
and MP.NAME_ID=AN.NAME_ID
and UPPER(LAST_NAME) like 'GRAPE%'
order by last_name,First_name;

This statement takes about 25-30 seconds to execute. There are about 300K records in each table. Indexes are set on all FK's. Tables and indexes analyzed. Am I missing something? I'm not a performance guru...

When I execute this SQL Statement in SQL* Plus using a Bind Variable

select Count(*)
from MP, AA, AN
where MP.address_id = AA.ADDRESS_ID(+)
and MP.NAME_ID=AN.NAME_ID
and UPPER(LAST_NAME) like <b>'&v_lname' </b> order by last_name,First_name;

and

define v_lname = "GRAPE%"

It runs is about 5-7 seconds, which is tolerable.

My question is can I 'set' the value of the bind variable somehow from an Active Server Page so my SQL Statement executes faster? How does that work?

Using ADO/IIS/MTS if that helps.

Thanks In Advance.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Dec 08 1999 - 14:44:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US