Skip to Content

performance issue-open sql vs native sql

Hello,

I have a scenario where the select statement is fetching around 3 Lac 300,000 records from database table and we have 3 such select statements all of which are written using open sql, will converting them into native sql help me improve the performance?

Message was edited by: Thomas Zloch

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Apr 30, 2012 at 07:23 AM

    No, you would give up the built-in optimisation techniques of the database interface (DBI).

    Your description is very vague, add more details like the actual open SQL statement, existing indexes, results of ST05 SQL-trace.

    Thomas

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      whatever SQL it is, it will be compiled long before the execution, otherwise you will not be able to start the program. At runtime the statement will be parsed, which is some kind of machine-language for the database. At this time the access plan will be compiled. This will be in the range of twens of micro seconds. So I guess in terms of performance, there will be no benefit in general.

      I had a usefull scenario once, where i could make use of a rownum-limited ordered subselect result set on an ORACLE DB. But this might be a rare case.

      Native SQL is usefull, when you need to us DB features that are not codable in open SQL.

      Volker

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.