RE: JAVA Developer

  • From: "Norman Dunbar" <norman.dunbar@xxxxxxxxxxxxxxxxxxxxxxxxx>
  • To: <Bernard.Polarski@xxxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>, <Thomas.Mercadante@xxxxxxxxxxxxxxxxx>, <Laimutis.Nedzinskas@xxxxxxxxxxxxx>
  • Date: Tue, 09 Jan 2007 08:32:37 +0000

Morning All,

sorry to join the party late, but I'm in the UK and was asleep when you all 
started :o)

No-one has yet mentioned that most developers doe something like the following :

begin
  parse statement
  bind variables
  execute statement
  process results
end

or even worse :

begin loop
  parse statement
  bind variables
  execute statement
  process results
end loop

so the so called prepared statement is treated as just another unprepared 
statement. The code really should be as follows :


begin
  if statement in not yet prepared then 
    parse statement
  end if

  bind variables
  execute statement
  process results
end

or 


if statement in not yet prepared then 
  parse statement
end if

begin loop
  bind variables
  execute statement
  process results
end loop


This reduces the parse to execute ratio from 1:1 (or worse, some development 
systems pre-parse the statement to allow for the fetching of 'better' 
information in case of errors (credit : Cary Mlilsap) - giving a 2:1 p:e ratio).

Not picking on Java developers here by the way, I see it in PL/SQL as well.


Just my £0.02.


Cheers,
Norman.




Norman Dunbar.
Contract Oracle DBA.
Rivers House, Leeds.

Internal : 7 28 2051
External : 0113 231 2051



Information in this message may be confidential and may be legally privileged. 
If you have received this message by mistake, please notify the sender 
immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should 
still check any attachment before opening it.

We may have to make this message and any reply to it public if asked to under 
the Freedom of Information Act, Data Protection Act or for litigation.  Email 
messages and attachments sent to or from any Environment Agency address may 
also be accessed by someone other than the sender or recipient, for business 
purposes.

If we have sent you information and you wish to use it please read our terms 
and conditions which you can get by calling us on 08708 506 506.  Find out more 
about the Environment Agency at www.environment-agency.gov.uk
--
//www.freelists.org/webpage/oracle-l


Other related posts: