473,659 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Execution Consistency

Dan
I am new to tuning and I am having some trouble with my Oracle
9.2.0.1. I have a database that I am trying to gain consistent
performance out of but I seem to have changing execution plans. Due
to a number of factors outside my control, I have to handle an
application that does not send bind variables, I handle them as they
come in. To do this, I have set the init.ora file to have an entry of
'cursor_sharing =similiar'. I know this is a temporary fix, but I have
to deal with it for now.

When I test a general search query on a stand alone application, I
get good returns (<10s, good enough anyway). When the application
runs, it takes forever. I copied the query that was being run from
the Oracle session manager and tried playing with it. It seems that
the execution plan of this query changes if there are bind variables
in it or actual data. I narrowed this down to a single field. It
does not matter what I put in the other parts of the where clause. As
soon as I change this particular where clause
AND (Entity.lname like 'MART%')

to

AND (Entity.lname like :"SYS_B_22")

the execution plan changes and my returns lose about a minute of
response time, not acceptable. Does anyone have any experience with
something like this? Any help is greatly appreciated.

-Dan
Jul 19 '05 #1
1 2924
With cursor_sharing = similiar, you are telling Oracle to force the
use of bind variables in certain situations. In this case, Oracle is
using bind variables in a way that is detrimental to performance.

If you avoid gathering histograms on the lname of the entity column,
that will likely cause Oracle not to choose a different plan for
literals and bind variables. Whether this will lead Oracle to choose
the "good" plan or the "bad" plan universally, though, can't be
predicted with the information provided.

My preference would be to issue an ALTER SESSION command before
executing the particular statement(s) you don't want to be forced to
use bind variables.

ALTER SESSION SET cursor_sharing= EXACT

will cause your session not to force the use of bind variables. After
the statement executes, you can switch back to

ALTER SESSION SET cursor_sharing= SIMILIAR

Justin Cave <jc***@ddbcinc. com>
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

do*****@amcad.c om (Dan) wrote in message news:<bd******* *************** ****@posting.go ogle.com>...
I am new to tuning and I am having some trouble with my Oracle
9.2.0.1. I have a database that I am trying to gain consistent
performance out of but I seem to have changing execution plans. Due
to a number of factors outside my control, I have to handle an
application that does not send bind variables, I handle them as they
come in. To do this, I have set the init.ora file to have an entry of
'cursor_sharing =similiar'. I know this is a temporary fix, but I have
to deal with it for now.

When I test a general search query on a stand alone application, I
get good returns (<10s, good enough anyway). When the application
runs, it takes forever. I copied the query that was being run from
the Oracle session manager and tried playing with it. It seems that
the execution plan of this query changes if there are bind variables
in it or actual data. I narrowed this down to a single field. It
does not matter what I put in the other parts of the where clause. As
soon as I change this particular where clause
AND (Entity.lname like 'MART%')

to

AND (Entity.lname like :"SYS_B_22")

the execution plan changes and my returns lose about a minute of
response time, not acceptable. Does anyone have any experience with
something like this? Any help is greatly appreciated.

-Dan

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
12697
by: Markus Breuer | last post by:
I have a question about oracle commit and transactions. Following scenario: Process A performs a single sql-INSERT into a table and commits the transaction. Then he informs process B (ipc) to read the new date. So process B starts "select ..." but does not get the previously inserted row. The timespan between commit and select is very short. (NOTE: two different sessions are used) Questions: 1.) Does commit when returning from call...
1
2026
by: Sergio | last post by:
Hi everybody, I have the following scenario. Several computers with shared disk in a LAN. Each of these computer has a MySQL server that serves several databases. I have several clients that communicate with a Java process that I have in each computer to answer queries for a given database (it connects to the MySQL server). I also have a Java process that updates continuously the databases; this process executes only in the local...
2
8455
by: bruce strom | last post by:
I have a sql database I run dbcc checkdb and get no errors I go to backup the database in enterprise manager, and it won't restore because it has internal consistency errors I can go back to an older version of the database I run a particular procedure in our accounting software package Never do I get errors when running dbcc checkdb Sometimes I get the backup and restore problem, sometimes I don't
6
2541
by: | last post by:
Assume that we have a complex application with many math operations and it is written in an ANSI C++ code and running on a single PC without any problem. Is there an automatic way to execute the same application on a cluster of PCs to speed-up the execution? (How?) Or does it has to be re-written in some special way to be executed on the cluster?
19
2191
by: Catherine Jo Morgan | last post by:
If one user enters "Laurel Drive" and another enters "Laurel Dr." and still another forgets the period and enters "Laurel Dr" - is there a way to enforce consistency so that "103 Laurel Drive" doesn't appear as three different addresses when entered by the different users? TIA
3
10896
by: taru | last post by:
Env: DB2 UDB 8.1 on AIX We are executing a db2 sql stored procedure which is invoked from a java client. The stored procedure contains few select, insert and update statements. Using the DB2 snapshot and event monitor we are able to find the time taken for the stored procedure execution. We want to find what is the execution time for each
23
1784
by: Chance Ginger | last post by:
If I define a decorator like: def t(x) : def I(x) : return x return I and use it like: @t(X) def foo(a) :
1
169
by: Dan | last post by:
I am new to tuning and I am having some trouble with my Oracle 9.2.0.1. I have a database that I am trying to gain consistent performance out of but I seem to have changing execution plans. Due to a number of factors outside my control, I have to handle an application that does not send bind variables, I handle them as they come in. To do this, I have set the init.ora file to have an entry of 'cursor_sharing=similiar'. I know this is a...
5
1807
by: =?ISO-8859-1?Q?Marcel_M=FCller?= | last post by:
Hi, I have a question about the execution sequence of the postfix increment operator with respect to a function call. void foo(int type, int*& data); int* sequence;
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8535
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8629
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4338
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.