Home > Ask the Oracle Database / Applications Experts > Questions & Answers > Perform a check or wait for an error?
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Perform a check or wait for an error?

Karen Morton EXPERT RESPONSE FROM: Karen Morton

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site
>
QUESTION POSED ON: 08 July 2002
Is always performing a select statement check before executing the Insert/Update/Delete statements through JDBC a good approach, as opposed to waiting for Oracle to report back an error?

>

There are differing opinions on which is the best approach, but I prefer trapping errors to SELECTing first. The reason is that if you SELECT first and find that you will do your Insert/Update/Delete statement, you've just doubled the work your program has to do. If you SELECT first and then find that you will go ahead and do the actual statement, you will be doing two I/O's (in effect). If you just do the DML and it fails, you've only done one I/O....thus, it could be considered better performance to let the statement fail, trap it and deal with it that way rather than taking on the extra overhead of doing the SELECT statement.

If you don't mind the extra overhead, doing the SELECT is still an option.

For More Information


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts