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

Home -> Community -> Mailing Lists -> Oracle-L -> Bind Variables

Bind Variables

From: Danny Hughes <dhughes_at_knobias.com>
Date: Fri, 19 Oct 2001 10:28:41 -0700
Message-ID: <F001.003B0304.20011019103022@fatcity.com>


--____CIVUFTDKZVQDOGJWYCGU____
Content-Type: multipart/alternative; boundary="____HALPYZPZYFFYCGAKLKOY____"

--____HALPYZPZYFFYCGAKLKOY____
Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable

I have a question about using bind variables. It is my understanding that = bind variables are to be used to keep the same SQL from being reparsed and = keeping multiple copies in the SGA, thus *speeding* things up. I also = understand that by using bind variables that the CBO will not be able to = optimally use the statistics to determine the most effective path to = retrieve data. Some documentation states to use hints when you are using = bind variables to tell the CBO which path to take. Other documentation = states that bind variables don't like the CBO and to use the RBO.

After we looked at the library cache and saw thousands of copies of the = same sql, and hundreds of different sql, we decided to look into converting=  certain web pages to bind variables. After we converted to using bind = variables, the pages that once took < 5 seconds to load all of the sudden = took > 2 minutes to load. The db server was pegged at 100% from 8-5 every = day while this application was being used. We have converted back to = literals and the pages are loading quickly again. While on bind variables,=  we used every possible hint except RULE and had no luck. We didn't want = to resort to using the RULE hint because oracle claims not to use the RBO = (because of no further enhancements and possibly phasing it out), and to = start using the CBO for everything.

There are so many confusing documents regarding the use of bind variables. =  I wanted to see what the oracle community is doing in regards to using = bind variables and what their experiences are.

TIA Danny Hughes
DBA
Knobias.com
dhughes_at_knobias.com
www.knobias.com

--____HALPYZPZYFFYCGAKLKOY____
Content-Type: multipart/related; boundary="____KMQGUMGTJRAMPYVFBAEF____"

--____KMQGUMGTJRAMPYVFBAEF____
Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable

I have a question about using bind variables. It is my understanding that = bind variables are to be used to keep the same SQL from being reparsed and = keeping multiple copies in the SGA, thus *speeding* things up. I also = understand that by using bind variables that the CBO will not be able to = optimally use the statistics to determine the most effective path to = retrieve data. Some documentation states to use hints when you are using = bind variables to tell the CBO which path to take. Other documentation = states that bind variables don't like the CBO and to use the RBO.
<br>
<br>After we looked at the library cache and saw thousands of copies of =
the same sql, and hundreds of different sql, we decided to look into = converting certain web pages to bind variables. After we converted to = using bind variables, the pages that once took &lt; 5 seconds to load all = of the sudden took &gt; 2 minutes to load. The db server was pegged at = 100% from 8-5 every day while this application was being used. We have = converted back to literals and the pages are loading quickly again. While = on bind variables, we used every possible hint except RULE and had no = luck. We didn't want to resort to using the RULE hint because oracle = claims not to use the RBO (because of no further enhancements and possibly = phasing it out), and to start using the CBO for everything.
<br>
<br>There are so many confusing documents regarding the use of bind =
variables. I wanted to see what the oracle community is doing in regards = to using bind variables and what their experiences are.
<br>
<br>TIA
<br>
<br>Danny Hughes
<br>DBA
<br>Knobias.com
<br>dhughes_at_knobias.com
<br>www.knobias.com
<br>

--____KMQGUMGTJRAMPYVFBAEF____-- --____HALPYZPZYFFYCGAKLKOY____-- --____CIVUFTDKZVQDOGJWYCGU____

Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
CONTENT-DESCRIPTION: S/MIME Cryptographic Signature

MIIKkwYJKoZIhvcNAQcCoIIKhDCCCoACAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCCCJ4w ggI8MIIBpaADAgECAgMD6X8wDQYJKoZIhvcNAQEEBQAwgZIxCzAJBgNVBAYTAlpBMRUwEwYDVQQI EwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEPMA0GA1UEChMGVGhhd3RlMR0wGwYD VQQLExRDZXJ0aWZpY2F0ZSBTZXJ2aWNlczEoMCYGA1UEAxMfUGVyc29uYWwgRnJlZW1haWwgUlNB IDIwMDAuOC4zMDAeFw0wMTAxMDUxNTQ3MzdaFw0wMjAxMDUxNTQ3MzdaMEUxHzAdBg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7xwOEJ/34UTLtCMkhsN Gg+WQMXB//YNdd9OY/Q1asVeSwn2p1ufm63qedRj3YQ=

--____CIVUFTDKZVQDOGJWYCGU____--

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Danny Hugh
  INET: dhughes_at_knobias.com>"<DHUGHES_at_knobias.com

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: ListGuru_at_fatcity.com (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).
Received on Fri Oct 19 2001 - 12:28:41 CDT

Original text of this message

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