Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8694069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:41:41+00:00 2026-06-13T00:41:41+00:00

I have two decades SQL experience, but not specifically with Oracle. An ‘Oracle expert’

  • 0

I have two decades SQL experience, but not specifically with Oracle. An ‘Oracle expert’ assures me that building a SQL query without parameters (like this):

SELECT t.ID, t.Name, t.Address ... FROM Table1 t WHERE t.ID = 'someID' AND t.Name = 'someName'...

is at least as fast as using parameters (like this)

SELECT t.ID, t.Name, t.Address ... FROM Table1 t WHERE t.ID = ? AND t.Name = ?

The code is executed in a loop.

In most other databases I have experience with, using parameters increases speed. It allows the database to cache the compiled plan that matches the SQL statement. Since the SQL does not change per invocation (although the parameters do) this improves performance. The database simply binds the parameters and continues.

The ‘Oracle expert’ states that this is not necessary. But obviously, Oracle needs to ‘parse out’ the parameters, match the remaining string to a cached execution plan, then rebind the parameters as if they were passed along as parameters in the first place.

Do I have the correct mental picture here? Is there something ‘magical’ about Oracle that it really does not make a difference how we approach our parameter passing/SQL building strategy?

Are there thoughts about Java / JDBC / Oracle thin driver that I am not aware of that I should be aware of here?

I am looking to either reinforce my understanding or to expand my knowledge.

(Security concerns aside please, I understand that building SQL strings allows for SQL injection attacks, I am looking for more direct ammunition to use against the experts opinion – if it exists).

Other details: Oracle 11gR2, Java 1.6

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:41:43+00:00Added an answer on June 13, 2026 at 12:41 am

    To be blunt – you got it right, and your Oracle expert seems to be no expert at all (unless he wants to sell expensive consulting time for speeding up your application once you’ve put it into production).

    If you build the SQL statement without parameters (called bind variables in Oracle), you force the database to hard parse the statement every time it is executed.

    See AskTom on soft/hard parsing and bind variables for a much better explanation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two issues that I'm not sure how to fix. diceThrow() is supposed
I am building an app that has two types of users: regular users (have
I have two queries that find both the Zip codes, and the States for
I have an application that has two different login windows for two different types
I have simple page using a two-column page layout that breaks on zooming. Here
I have a form that has two parts to it. Yes or No. Yes
CodeIgniter 2.1.2 I have a class that contains two methods, for the purpose of
I have base64-encoded string (with two dollar signs, so it's not a common base64
I have two handlers: onSuccess and onFailure, but I want sometimes (when the server
Have two folders with approx. 150 java property files. In a shell script, how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.