Report performance - PL/SQL vs SQL type

Hello,
Is it possible that report built as PL/SQL function returning SQL query is slower (much more) than common SQL report?
I’ve got a view, that I read data from. When I use SQL query report with variables in :PX_NAME format, it takes about 5 seconds to show the page. If I use PL/SQL report with variables in v('PX_NAME') format inside query string like:
'SELECT * FROM myview where myname like v(''P5_NAME'')';it takes about 3 minutes to get the same data.
Do you have any idea why?
Regards,
Przemek

It's hard to tell without knowing how many rows we are talking about, the CPU load, and so on, but in a heavily loaded system i can easily imagine that a query containing a call to V function might cause a not optimized access path, whereas the same query with a bind variable might work much better.
Said that, the rule of thumb is to use bind variables every time you can and avoid V as much as you can.
If you can do the same thing with :PX_NAME, use that, there is no justification for using V('PX_NAME').
Flavio
http://oraclequirks.blogspot.com

Similar Messages

  • Pl/sql table - row type records

    Hi,
    Is there any limit on the number of records that a pl/sql table (row type) can accomodate.Iam using oracle 10g

    user11200499 wrote:
    I have gone thru that url, nothing on the maximum number of records that can be present in pl/sql table is given there. Will be very helpful if you can let me know if there is any such limitation.There is no such thing as a PL/SQL "+table+". A table, in Oracle terminology, means colums and rows and indexes and the ability to scale data, effectively read and process and filter and aggregate data.
    A so-called PL/SQL "+table+" is nothing at all like this.
    The correct term for it, and used in all other programming languages, are arrays (procedural term) and collections (object orientated term).
    An array/collection is a local memory structure in the unit of code. In PL/SQL, that means PGA (process global area) memory. And as this uses server memory, you should not abuse it and only use as much that is truly needed.
    Make a PL/SQL array/collection too large, and PGA grows.. and can have a very negative impact on performance. It can even cause the server to crawl to halt, where you will struggle to enter a commandline command on the server as it is spending 99% of CPU time trying to deal with memory requests and page swapping.
    So what do we then use arrays/collections for in PL/SQL?
    For the very same reason we use in any other programming language - dealing with managing local programming data in a more effective memory structure. Such as bulk processing when requiring a buffer variable that can be passed to and from the PL and SQL engines.
    This does NOT mean using it as you would use it as if it is a SQL table. As it is not.
    So to answer your question of how large a PL/SQL array or collection can be? That depends entirely on the problem you are trying to solve. If it is for example bulk processing, then typically a collection of a 100 rows provides the best balance between the amount of (expensive) PGA memory being used versus the increase in performance by reducing context switching between the PL and SQL engines.
    If the rows are quite small, perhaps even a 1,000 row collection. More than that seldom decreases context switching enough to justify the increase in expensive PGA.
    So what should then be used to store larger data structures in PL/SQL? GTT or Global Temporary Tables. As this is a proper SQL table structure. Can be indexed. Natively supports SQL. Can scale with data volumes.
    And most importantly, it does not consume dedicated process memory and will not blow server memory.

  • Report error:ORA-06502: PL/SQL: numeric or value error: character string bu

    We face the above error in HTMLDB (APEX) application Ver 3.1.0. This occurs when we try to display more number of rows/records in drop-down list (LOV in tabular forms). We are able to display 200 records in LOV. When the list of records exceeds 230, we face the below error
    report error:ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    the values listed in LOV are from tables (one of the columns in table)
    Could anyone give us a solution?

    Hi
    As you are using a tabular form, you could actually do the following:
    1 - In the tabular form column's attributes, set the following:
    Display as: Select List (query based on LOV)
    Display extra values: Yes
    List of values definition: SELECT null d, null r FROM DUAL
    2 - Add a new page item and set it to generate your select list
    3 - Create an HTML region with no template and use the following for its source:
    <script type="text/javascript">
    function loadList(c, l)
    var s = document.getElementsByName(c);
    var lItem = document.getElementById(l);
    var lLength = lItem.options.length;
    var k;
    var j;
    var x = lItem.innerHTML;
    var v;
    var o;
    var z;
    for (k = 0; k < s.length; k++)
    z = s[k];
    v = z.value;
    z.options.length = 0;
    for (j = 0; j < lLength; j++)
    o = new Option()
    o.value = lItem[j].value;
    o.text = lItem[j].text;
    z.options[j] = o;
    z.value = v;
    if (z.selectedIndex == -1)
    z.selectedIndex = 0;
    loadList("f05", "P1_MGR");
    </script>
    (Change "f05" and "P1_MGR" as appropriate to your column and your new page item respectively)
    Now, when you load the page, the select list contains a null entry plus the entry already on the database. The javascript kicks in automatically, loops through every entry in the "f05" column, copies the existing value, replaces the select list with the new page item version and sets its value to the copied value.
    Your new page item could be in a DIV tag that has a style of "display:none" to hide it from view.
    Andy

  • SCOM 2012 R2 Report Server component install to SQL 2012 Sp1 error?

    Hi All
    Im having issues installing SCOM 2012 R2 Report Server component to a SQL 2012 Sp1 Server (which is a Windows 2012 R2 Standard server).  Im trying to install to the SQL Default server instance, note that the server also has a named instance
    which hosts the SCOM databases.  SQL Reporting Services is up and running fine (can access the web urls etc).  Im also using the SCOM install account wich has full SQL and SCOM Server admin rights for the install.  Ive checked that the Firewall
    is off locally on the SQL Server, Ive also checked that the existing SCOM components are all in a Healthy state in the SCOM console.
    The installed version of SQL Server could not be verified or is not supported. Verify that the computer and the installed version of SQL Server meet the minimum requirements for installation, and that the firewall settings are correct. See the Supported
    Configurations document for further information.
    Ive attempted the install on a standalone SQL Server away from the SQL Server hosting the SCOM databases, but encounter the same error.  The full SCOM MSI Installer log details are below, line that appears most relevant is below but unsure why
    this would be the case (same account that I used for SQL install etc).  Any help much appreciated! : )
    Error: :getSQLInstanceVersion:  Unable to find the SRS Instance Key: MSSQLSERVER
    [11:51:46]: Debug: :CheckPrerequisites:  IsComputerNameValidTitle: Passed
    [11:51:46]: Debug: :
    [11:51:46]: Debug: :**************************************************
    [11:51:46]: Debug: :**************************************************
    [11:51:46]: Debug: :<![CDATA[CheckPrerequisites:   Logic Type:and AvicodeAgentInstalled-x86: 0CheckPrerequisites:   Logic Type:and AvicodeAgentInstalled-x64: 0]]>
    [11:51:46]: Debug: :
    [11:51:46]: Debug: :CheckPrerequisites:  AVIcodeAgentCheck: Passed
    [11:51:46]: Debug: :
    [11:51:46]: Debug: :**************************************************
    [11:51:46]: Always: :CheckPrerequisites: Return Value 0
    [11:51:46]: Always: :Entering Page: AdditionalPrerequisitesPage
    [11:51:48]: Always: :Entering Page: ShortEulaPage
    [11:51:48]: Always: :Displaying localized EULA for localization: en
    [11:51:48]: Always: :Displaying Eula: C:\Users\opsmgr\AppData\Local\SCOM\Setup\en\eula_en_notice.rtf
    [11:51:49]: Info: :Info:User has agreed to EULA.
    [11:51:50]: Always: :Entering Page: SelectManagementServerForReporting
    [11:52:08]: Info: :Info:Management Server matches the current version of setup.
    [11:52:08]: Always: :Entering Page: SelectReportingInstance
    [11:52:08]: Always: :SQL Server SRS Instance (escaped name) RS_MSSQLSERVER
    [11:52:08]: Info: :Attempting to get the SSRS version from:
    \\WDC-SYSSQL01\Root\Microsoft\SqlServer\ReportServer\RS_MSSQLSERVER:__NAMESPACE
    [11:52:08]: Debug: :Path is
    \\WDC-SYSSQL01\Root\Microsoft\SqlServer\ReportServer\RS_MSSQLSERVER\V11:MSReportServer_Instance
    [11:52:08]: Always: :SRS instance on WDC-SYSSQL01. Version 11.0.3000.0.
    [11:52:08]: Always: :No SRS instances on WDC-SYSSQL01.
    [11:52:08]: Error: :getSQLInstanceVersion:  Unable to find the SRS Instance Key: MSSQLSERVER
    [11:52:08]: Info: :Info: WDC-SYSSQL01 SRS version =
    [11:52:08]: Error: :Couldn't check SRS version: Threw Exception.Type: System.ArgumentException, Exception Error Code: 0x80070057, Exception.Message: Version string portion was too short or too long.
    [11:52:08]: Error: :StackTrace:   at System.Version.TryParseVersion(String version, VersionResult& result)
       at System.Version.Parse(String input)
       at Microsoft.EnterpriseManagement.OperationsManager.Setup.ReportingComponent.CheckSRSVersion(String srsInstance, String requiredSRSVersion)
    [11:52:11]: Info: :Attempting to check SRS version
    [11:52:11]: Error: :getSQLInstanceVersion:  Unable to find the SRS Instance Key: MSSQLSERVER
    [11:52:11]: Info: :Info: WDC-SYSSQL01 SRS version =
    [11:52:11]: Error: :Couldn't check SRS version: Threw Exception.Type: System.ArgumentException, Exception Error Code: 0x80070057, Exception.Message: Version string portion was too short or too long.
    [11:52:11]: Error: :StackTrace:   at System.Version.TryParseVersion(String version, VersionResult& result)
       at System.Version.Parse(String input)
       at Microsoft.EnterpriseManagement.OperationsManager.Setup.ReportingComponent.CheckSRSVersion(String srsInstance, String requiredSRSVersion)
    [11:52:28]: Info: :The user canceled setup
    [11:52:28]: Always: :Begin: Property bag dump.
    [11:52:28]: Always: :SetupStartTime = 26/03/2014 11:51:38
    [11:52:28]: Always: :Collection ProtectedProperties (System.Collections.ArrayList):
    [11:52:28]: Always: : [0] = ActionAccountPassword
    [11:52:28]: Always: : [1] = DASAccountPassword
    [11:52:28]: Always: :DefaultLogName = C:\Users\opsmgr\AppData\Local\SCOM\Logs\OpsMgrSetupWizard.log
    [11:52:28]: Always: :DefaultLogPath = C:\Users\opsmgr\AppData\Local\SCOM\Logs
    [11:52:28]: Always: :path = F:\Setup\AMD64\
    [11:52:28]: Always: :setupexepath = C:\Users\opsmgr\AppData\Local\SCOM\Setup
    [11:52:28]: Always: :ArchitectureIs64Check = True
    [11:52:28]: Always: :OperationManagerAgentInstalled = 1
    [11:52:28]: Always: :Collection ListOfSupportedComponents (System.Collections.ArrayList):
    [11:52:28]: Always: : [0] = OMCONSOLE
    [11:52:28]: Always: : [1] = OMSERVER
    [11:52:28]: Always: : [2] = OMWEBCONSOLE
    [11:52:28]: Always: : [3] = OMREPORTING
    [11:52:28]: Always: :install = 1
    [11:52:28]: Always: :installpath = C:\Program Files\Microsoft System Center 2012 R2\Operations Manager
    [11:52:28]: Always: :EulaFilesPath = C:\Users\opsmgr\AppData\Local\SCOM\Setup
    [11:52:28]: Always: :HealthServiceTypeId = AB4C891F-3359-3FB6-0704-075FBFE36710
    [11:52:28]: Always: :hsPort = C51B7833-DA54-1653-D8FD-1A738EF8DED5
    [11:52:28]: Always: :ServerBlockReason = A Operations Manager agent was found on this computer. Please remove the agent and then run Setup again.
    [11:52:28]: Always: :ScreensLoaded = 1
    [11:52:28]: Always: :Collection ListOfSelectedComponents (System.Collections.ArrayList):
    [11:52:28]: Always: : [0] = OMREPORTING
    [11:52:28]: Always: :OMREPORTING = 1
    [11:52:28]: Always: :SelectDatabaseInstanceReloadScreenInformation = 1
    [11:52:28]: Always: :ReloadPrerequisitesPageChoice = PrerequisitesProgressPage
    [11:52:28]: Always: :LoadedPrerequisiteXmlFile = True
    [11:52:28]: Always: :PrerequisitesCheckXMLLoaded = True
    [11:52:28]: Always: :CountFilteredPrerequisites_Failed = 0
    [11:52:28]: Always: :CountFilteredPrerequisites_Warning = 0
    [11:52:28]: Always: :CountFilteredPrerequisites_PassedWithChoices = 0
    [11:52:28]: Always: :CountFilteredPrerequisites_Passed = 10
    [11:52:28]: Always: :PrerequisiteState = Passed
    [11:52:28]: Always: :XmlFilteredPrerequisites_Passed : Begin XML property
    [11:52:28]: Always: :<?xml version="1.0" encoding="utf-8"?><Root><Title TitleText="OMREPORTING"><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="memoryCheckTitle" descriptionBody="" descriptionTitle="ReportingMemCheckPassed" resolution="ReportingMemCheckResolution" /><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="ntfsCheckTitle" descriptionBody="" descriptionTitle="ntfsCheckPassed" resolution="ntfsCheckResolution" /><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="DriveSpaceCheckTitle" descriptionBody="" descriptionTitle="ServerDriveSpaceCheckPassed" resolution="ServerDriveSpaceCheckResolution" /><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="OSVersionCheckTitle" descriptionBody="" descriptionTitle="OSVersionCheckPassed" resolution="OSVersionCheckResolution" /><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="WindowsInstallerCheckTitle" descriptionBody="" descriptionTitle="WindowsInstallerCheckPassed" resolution="WindowsInstallerCheckResolution" /><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="RemoteRegistryCheckTitle" descriptionBody="" descriptionTitle="RemoteRegistryCheckPassed" resolution="RemoteRegistryCheckResolution" /><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="PendingRebootCheckTitle" descriptionBody="" descriptionTitle="PendingRebootCheckPassed" resolution="PendingRebootCheckResolution" /><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="ActiveDirectoryCheckTitle" descriptionBody="" descriptionTitle="ActiveDirectoryCheckPassed" resolution="ActiveDirectoryCheckResolution" /><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="IsComputerNameValidTitle" descriptionBody="" descriptionTitle="IsComputerNameValidPassed" resolution="IsComputerNameValidResolution" /><Detail state="Passed" image="pack://application:,,,/SetupChainerUI;component/GreenCheck.png"
    name="AVIcodeAgentCheck" descriptionBody="" descriptionTitle="AVICodeAgentCheckPassed" resolution="AVICodeAgentCheckResolution" /></Title></Root>
    [11:52:28]: Always: :End XML property
    [11:52:28]: Always: :ManagementServer = WDC-SYSOPS01.landmarc.local
    [11:52:28]: Always: :DefaultSDKMachine = WDC-SYSOPS01.landmarc.local
    [11:52:28]: Always: :UserCanceledInstall = 1
    [11:52:28]: Always: :InstallSuccess = 1
    [11:52:28]: Always: :End: Property bag dump.
    [11:52:28]: Debug: :CEIP disabled. CEIP data will NOT be sent.
    [11:52:28]: Always: :Application Ended: Successful
    [11:52:28]: Always: :
    [2014-03-26T11:52:28.4724357+00:00]: Always: Trace Session Ended

    Hi,
    According to the error message:
    [11:52:11]: Error: :getSQLInstanceVersion:  Unable to find the SRS Instance Key: MSSQLSERVER
    [11:52:11]: Info: :Info: WDC-SYSSQL01 SRS version =
    [11:52:11]: Error: :Couldn't check SRS version: Threw Exception.Type: System.ArgumentException, Exception Error Code: 0x80070057, Exception.Message: Version string portion was too short or too long.
    The issue is SQL report server database related, I would like to suggest you create a new report database for SCOM and then check the reuslt. Please refer to the below links and follow it to set up SCOM 2012 R2:
    http://blogs.technet.com/b/kevinholman/archive/2013/01/16/opsmgr-2012-sp1-quickstart-deployment-guide.aspx
    In addition, here is thread for your reference also:
    http://social.technet.microsoft.com/Forums/en-US/3f883b7f-5a33-49f0-a40d-f3311e68609d/unable-to-connect-to-the-data-access-service-installing-report-server?forum=operationsmanagerreporting
    Regards,
    Yan Li
    Regards, Yan Li

  • Activate Reporting Services on My Sharepoint SQL SERVER Databse ?

    Hi,
    I have small sharepoint farm (1 FW and 1 SQL).
    I can't find if it's recommended or not to activate and use Reporting Services on the SHAREPOINT SQL SERVER Instance ?
    I wouldn't want to decrease my global farm performance.
    Thank you for helping.
    Regards

    SSRS integrated must run on a server that has SharePoint installed and joined to the farm. That will have a significant impact on the SQL Database Engine server from a memory contention and CPU utilization perspective.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Performance comparison between using sql and pl/sql for same purpose

    Hi All,
    I have to do some huge inserts into a table from some other tables. I have 2 option:
    Option 1
    ======
    a. Declare a cusor for a query involving all source tables, this will return the data to be populated into target
    b. Use a cursor for loop to loop through all the records in the cursor
    c. for each iteration of the loop, populate target columns, do any calculations/function calls required to populate derived columns, and then insert the resulting record into target table
    Option 2
    ======
    Just write a big single "Insert Into ..... Select ..." statement, doing alll calculations/funtion calls in the select statement generating the source data.
    Now my question is ; which option is fast? and why. This operation is performace critical so I need the option which will run faster. Can anybody help???
    Thanks in Advance.

    user9314072 wrote:
    while the above comments are vaild, you should concider maintainability in you code. Even if you can write the sql it might be the code becomes complex making tuning very dificult, and derade performance.Beg to differ on that. Regardless of complexity of code, SQL is always faster than PL/SQL when dealing with SQL data. The reason for that is that PL/SQL still needs to use SQL anyway for row retrieval, and in addition it needs to copy row data from the buffer cache into the PL/SQL PGA. This is an overhead that does not exist in SQL.
    So if you are processing a 100 million rows with a complex 100 line SQL statement, versus a 100 million rows 100 line PL/SQL procedure, SQL will always be faster.
    It is a trade off, my experiance is large SQL's 100's lines long become hard to manage. You need to ask yourself why there are 100's of line of SQL. This points to an underlying problem. A flaky data model is very likely the cause. Or not using SQL correctly. Many times a 100 line SQL can be changed to a 10 liner by introducing different logic that solves the exact same problem easier and faster (e.g. using analytical SQL, thinking "+out-of-the-box+").
    Also, 100's of line of SQL points to a performance issue always. And it does not matter where you move this code logic to PL/SQL or Java or elsewhere, the performance problem will remain. Moving the problem from SQL to PL/SQL or Java does not reduce the number of rows to process, or make a significant change in the number of CPU instructions to be executed. And there's the above overhead mentioned - pulling SQL data into a client memory segment for processing (an overhead that does not exist using SQL).
    So how do you address this then? Assuming the data model is correct, then there are 2 primary methods to address the 100's of SQL lines and its associated performance problem.
    Modularise the SQL. Make the 100's of lines easier to maintain and understand. This can be done using VIEWS and the SQL WITH clause.
    As for the associated performance issue - materialised views comes to mind as an excellent method to address this type of problem.
    my advice is keep things simple, because soon or later you will need to change the code.I'm all for that - but introducing more moving parts like PL/SQL or Java and ref cursors and bulk fetching and so on.. how does that reduce complexity?
    SQL is the first and best place to solve row crunching problems. Do not be fooled into thinking that you can achieve that same performance using PL/SQL or Java.

  • The report I published on the SQL server report server is not showing in the application we use to retrieve reports.

    The report I published on the SQL server report server is not showing in the application we use to retrieve reports. My cell phone number is {removed}
    Thanks.

    Hello Roger Tenn,
    Thank you for posting in the TechNet Forum.
    As this issue is related to SQL server report server, to receive better report, it is recommended to ask in the SQL server forum.
    https://social.technet.microsoft.com/Forums/en-US/home?category=sqlserver
    The professionals here will be glad to help you.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Problem with pl/sql table data type

    hai friends,
    i have one procedure it has some in parameters and one out parameter which fetches values to front end.
    But the out parameter will be pl/sql table data type.
    if it is ref cursor
    then i declared as
    var x refcursor;
    exec procedure_name(1,:x);
    it is ok.
    but for pl/sql table data type is out parameter then what i will do in the prompt .
    give me syntax and clarify my doubt.
    advanced thanks...
    madhava

    The SQL*Plus VARIABLE statement does not support user-defined types, hence it cannot support nested tables. It can support cursors because they can be weakly typed (so we can use the one SQL*Plus VAR to hold any shape of resultset). Nested tables are strongly typed; SQL*Plus is a relatively stupid interface and cannot be expected to understand UDT.
    So, it you want to use nested tables as output you'll need to code a wrapping procedure that can understand your nested table type and handle it accordingly.
    Sorry.
    Cheers, APC

  • PL/SQL Network Address Type Functions

    Hi,
    I'm wondering if anyone knows of a PL/SQL package(s) that provides similar capabilities as the following postgreSQL network address type functions:
    http://www.sql.org/sql-database/postgresql/manual/functions-net.html
    I don't see anything in the standard Oracle 10g packages, so I'm wondering if anyone else has dealt with this problem and posted the package.
    Thanks,
    - Greg.

    I think the easiest way of getting some of this functionality would be to write a PL/SQL wrapper to a Java Stored Procedure that implements calls to the Java InetAddress class. It doesn't haven't the full set of operators but I'm not sure what 'less than' actually means in the context of an IP address . If you really need them you could always extend the InetAddress class to implement such tests.
    Cheers, APC

  • How to resolve most of the Oracle SQL , PL/SQL Performance issues with help of quick Checklist/guidelines ?

    Please go thru below important checklist/guidelines to identify issue in any Perforamnce issue and resolution in no time.
    Checklist for Quick Performance  problem Resolution
    ·         get trace, code and other information for given PE case
              - Latest Code from Production env
              - Trace (sql queries, statistics, row source operations with row count, explain plan, all wait events)
              - Program parameters & their frequently used values
              - Run Frequency of the program
              - existing Run-time/response time in Production
              - Business Purpose
    ·         Identify most time consuming SQL taking more than 60 % of program time using Trace & Code analysis
    ·         Check all mandatory parameters/bind variables are directly mapped to index columns of large transaction tables without any functions
    ·         Identify most time consuming operation(s) using Row Source Operation section
    ·         Study program parameter input directly mapped to SQL
    ·         Identify all Input bind parameters being used to SQL
    ·         Is SQL query returning large records for given inputs
    ·         what are the large tables and their respective columns being used to mapped with input parameters
    ·         which operation is scanning highest number of records in Row Source operation/Explain Plan
    ·         Is Oracle Cost Based Optimizer using right Driving table for given SQL ?
    ·         Check the time consuming index on large table and measure Index Selectivity
    ·         Study Where clause for input parameters mapped to tables and their columns to find the correct/optimal usage of index
    ·         Is correct index being used for all large tables?
    ·         Is there any Full Table Scan on Large tables ?
    ·         Is there any unwanted Table being used in SQL ?
    ·         Evaluate Join condition on Large tables and their columns
    ·         Is FTS on large table b'cos of usage of non index columns
    ·         Is there any implicit or explicit conversion causing index not getting used ?
    ·         Statistics of all large tables are upto date ?
    Quick Resolution tips
    1) Use Bulk Processing feature BULK COLLECT with LIMIT and FOR ALL for DML instead of row by row processing
    2) Use Data Caching Technique/Options to cache static data
    3) Use Pipe Line Table Functions whenever possible
    4) Use Global Temporary Table, Materialized view to process complex records
    5) Try avoiding multiple network trips for every row between two database using dblink, Use Global temporary table or set operator to reduce network trip
    6) Use EXTERNAL Table to build interface rather then creating custom table and program to Load and validate the data
    7) Understand Oracle's Cost based Optimizer and Tune most expensive SQL queries with help of Explain plan
    8) Follow Oracle PL/SQL Best Practices
    9) Review tables and their indexes being used in the SQL queries and avoid unnecessary Table scanning
    10) Avoid costly Full Table Scan on Big Transaction tables with Huge data volume,
    11) Use appropriate filtration condition on index columns of seeded Oracle tables directly mapped to program parameters
    12) Review Join condition on existing query explain plan
    13) Use Oracle hint to guide Oracle Cost based optimizer to choose best plan for your custom queries
    14) Avoid applying SQL functions on index columns
    15) Use appropriate hint to guide Oracle CBO to choose best plan to reduce response time
    Thanks
    Praful

    I understand you were trying to post something helpful to people, but sorry, this list is appalling.
    1) Use Bulk Processing feature BULK COLLECT with LIMIT and FOR ALL for DML instead of row by row processing
    No, use pure SQL.
    2) Use Data Caching Technique/Options to cache static data
    No, use pure SQL, and the database and operating system will handle caching.
    3) Use Pipe Line Table Functions whenever possible
    No, use pure SQL
    4) Use Global Temporary Table, Materialized view to process complex records
    No, use pure SQL
    5) Try avoiding multiple network trips for every row between two database using dblink, Use Global temporary table or set operator to reduce network trip
    No, use pure SQL
    6) Use EXTERNAL Table to build interface rather then creating custom table and program to Load and validate the data
    Makes no sense.
    7) Understand Oracle's Cost based Optimizer and Tune most expensive SQL queries with help of Explain plan
    What about using the execution trace?
    8) Follow Oracle PL/SQL Best Practices
    Which are?
    9) Review tables and their indexes being used in the SQL queries and avoid unnecessary Table scanning
    You mean design your database and queries properly?  And table scanning is not always bad.
    10) Avoid costly Full Table Scan on Big Transaction tables with Huge data volume,
    It depends if that is necessary or not.
    11) Use appropriate filtration condition on index columns of seeded Oracle tables directly mapped to program parameters
    No, consider that too many indexes can have an impact on overall performance and can prevent the CBO from picking the best plan.  There's far more to creating indexes than just picking every column that people are likely to search on; you have to consider the cardinality and selectivity of data, as well as the volumes of data being searched and the most common search requirements.
    12) Review Join condition on existing query explain plan
    Well, if you don't have your join conditions right then your query won't work, so that's obvious.
    13) Use Oracle hint to guide Oracle Cost based optimizer to choose best plan for your custom queries
    No.  Oracle recommends you do not use hints for query optimization (it says so in the documentation).  Only certain hints such as APPEND etc. which are more related to certain operations such as inserting data etc. are acceptable in general.  Oracle recommends you use the query optimization tools to help optimize your queries rather than use hints.
    14) Avoid applying SQL functions on index columns
    Why?  If there's a need for a function based index, then it should be used.
    15) Use appropriate hint to guide Oracle CBO to choose best plan to reduce response time
    See 13.
    In short, there are no silver bullets for dealing with performance.  Each situation is different and needs to be evaluated on its own merits.

  • Report error: ORA-06502: PL/SQL: numeric or value error: character string b

    I have a form which uses a customer form/report, drop downs etc..
    the debug shows it running this statement
    ...Execute Statement: begin begin SELECT distinct initcap(RTRIM (LTRIM (e.surname, ' *0123456789-/:.?,'), ' *0123456789-/:.?,') || ', ' || RTRIM (LTRIM (e.first_name, ' *0123456789-/:.?,'), ' *0123456789-/:.?,' )) empname, e.ID bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value FROM dms.dms_employees@dmsprd e, dms.dms_employee_contracts@dmsprd ec WHERE e.ID = ec.emp_id and e.surname like '%%' AND :p75_date BETWEEN ec.start_date AND NVL (ec.end_date, :p75_date) AND e.brh_id = 3654 ORDER BY 1; end; end;
    Then says
    "report error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small"
    Any Ideas?
    Thanks
    Dean

    Denes Kubicek wrote:
    A select list is limited in size. I am not sure what the limit is but that is definitelly the case.The maximum size for the HTML generated for a select list is 32K.
    86 options sounds on the low side to be hitting that limit, but there are other concerns to this as well. Scrolling through hundreds/thousands of options in a select list is a pain for users, and huge select lists produce bloated pages that impact load times and network bandwidth. That list of around 200 countries you find on many sites is about the sensible maximum length for a select list.
    You should use popups.Indeed.

  • Report error:ORA-06502: PL/SQL: numeric or value error: character to number

    The oracle application express environment is created by installing the HTTP Server on the windows server and the application express 3.2.1 components on the 11.1.0.7 oracle database on UNIX. The installation is successfully and have not seen any issues during the installation. After completing all the steps, when tried to login and click the application builder or workspace components, I see the error message
    report error:ORA-06502: PL/SQL: numeric or value error: character to number.
    This error message is seen on most of the pages when trying to accessed and not able to understand the reasons behind it. Its a brand new environment setup and not even presented to developers to test it.
    Below error message is always seen when trying to access most of the components like application builder, schema comparison and some other tabs. Please advice
    report error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Edited by: user589320 on Jun 9, 2011 5:17 PM

    I think its better you use APEX 4.x version ratherthan using old version.
    You will get more features and some bug fixes and also it's easy for you to get some help when you need.
    * If this answer is helpfull or correct then please mark it and grant the points.

  • Report error: ORA-06502: PL/SQL: numeric or value error: NULL index table k

    Hi everybody,
    I have two Distinct Databases on two distinct servers. (Oracle Ent. Release 10.2.0.3.0 on AIX 5.3). After I install the latest patch last week, One of the APEX installation has some problems on Home>Application Builder Page. The error message is very random and
    report error:
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value.
    When i change the view (details to icons), everything goes to normal. This error message is reflected some of the pages (report region) of some of my applications randomly. When it appears in a report region, i deselect the order method of the region, the result is normal.
    But the other APEX application on the other instance has no problem. It is a bug? or Should i re-install the APEX instance?
    Thank you for your interest?
    Gökhan ÇATALKAYA

    No, but we have a reproducible test case now so we're working on it. See ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    Scott

  • Report Builder 1.0 for SQL Server Reporting Services 2008 R2

    We are trying to implement Ad-Hoc Reporting using SSRS 2008 R2.
    First of all, it is very unhelpful that all SSRS books are for either 2008 or 2012, even though SSRS has major changes in 2008 R2 compared to 2008.
    Our instructional materials indicate that we should build Report Models to abstract out our databases into terms familiar to our business users.
    The problem we are having is the difference in functionality between Report Builder 1.0 and Report Builder 3.0. Report Builder 3.0 is touted as having the modern, ribbon based interface that is supposed to make end-users feel more comfortable.  However,
    all the documentation says that end users are supposed to use Report Builder 1.0 for Ad-Hoc Reporting.  And, it seems, that the reports generated by Report Builder 1.0 are not round-trip compatible with all the other reporting tools for SSRS 2008 R2.
    The documentation we have illustrates that Report Builder 1.0 is nice for Ad-Hoc reporting, because is based on connecting directly to Report Models, and the end users can directly drag-and-drop entities and fields into their reports.
    When we try working with Report Builder 3.0, it seems we must first connect to the Report Model as a Data Source and then build a Dataset query on the Report Model.  Only then are some entity attributes available to be dropped into the report. 
    If the user decides another source column is needed, they have to go back, edit the query, save the query, and then drag the column from the Dataset to the report.  This does not seem end user friendly at all!
    We are also concerned that if we train our users on the seemingly soon-to-be-obsolete Report Builder 1.0, and get them used to having direct Report Model access, that at some point we will have to move them to the Dataset-interrupted approach of Report Builder
    2+.  Highlighting this perception of impending obsolescence of Report Builder 1.0 is that in our shop that is starting with SSRS 2008 R2, we cannot figure out how to get a copy of Report Builder 1.0 in the first place.
    We just don't see our end users being savvy enough to handle the steps involved with creating Datasets on top of Report Model Data Sources.  So we would have to build the Datasets for them.  But in that case, what point is there in creating any
    Report Models in the first place if DBAs are the ones to make Datasets?
    As such, it is hard to envision a forward-looking SSRS implementation that has the end user ease-of-use Ad-Hoc reporting that the SSRS 2008 documentation presents.
    What is it that Microsoft actually wants/expects SSRS implementers to do?
    Dan Jameson
    Manager SQL Server DBA
    CureSearch for Children's Cancer
    http://www.CureSearch.org

    Hi Dan,
    Report Builder 1.0
    Simple template-based reports
    Requires report model
    Supports only SQL Server, Oracle, and Analysis Services as data sources
    Supports RDL 2005
    Bundled in SSRS
    Report Builder 2.0 or later
    Full-featured reports as the BIDS Report Designer
    Doesn't require (but supports) report models
    Supports any data source
    Supports RDL 2008
    Available as a separate web download
    In your scenario, you want to use Report Builder 1.0 in SQL Server Reporting Services 2008 R2, I am afraid this cannot achieve. Report Builder 1.0 is available in the box in either SQL 2005 or SQL 2008. It is not available as a separate client apps and is
    only available as a click once application.
    Report Builder 1.0
    Report Builder 3.0
    Thank you for your understanding.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Report builder error after applying sql server 2008R2 SP3 when click on report builder gives error like 'Application validation did not succeed. Unable to continue.

    Hi All,
    I applied SQL server 2008 R2 SP3 recently but report builder doesn't work since then
    When click on report builder gives error like 'Application validation did not succeed. Unable to continue.
    and when I try to see details the error summary like following:
    +File, Microsfot.ReportingServices.ComponentLibrary.Controls.dll, has a different computed hash than specified in manifest.
    this is urgent.
    Please reply me asap.
    thanks a lot in advance.
    Regards,
    Nik
    Regards, Naman

    Hi nikp11,
    According to your description, you recently updated SQL Server 2008 R2 to SP3, Report Builder doesn’t work since then the error occurs: "Application validation did not succeed. Unable to continue".
    This is an known issue in SSRS 2008 R2 SP3 that Microsoft has published an article addressing this issue. It is not planning to release a fix for this issue. But we could implement one of the following workarounds:
    Install and run Report Builder 3.0 of SQL Server 2008 R2 RTM.
    Install and run Report Builder of SQL Server 2014.
    Uninstall Service Pack 3 then uninstall Service Pack 2 and then reinstall Service Pack 3.
    Reference:
    Report Builder of SQL Server 2008 R2 Service Pack 3 does not launch
    Thank you for your understanding.
    Best Regards,
    Wendy Fu

  • Reporting with Report Builder 3.0 and SQL Server 2008 R2

    Hi everyone
    I'm trying really hard to find books about Report Builder 3.0 or SQL Server 2008 R2
    I found the following books on the "learn" site, sadly they do not cover Report Builder 3.0 or SQL Server 2008 R2 since there all too old.
    Microsoft® SQL Server® 2008 Analysis Services Step by Step
    Microsoft® SQL Server® 2008 MDX Step by Step
    Microsoft® SQL Server® 2008 Reporting Services Step by Step
    What are good books (like the ones above) for the newest system?

    Hello wishmasterIN,
    Thank you to post your question on TechNet forum.
    Based on my experience, the books are always delayed to the new technology, since the author need time to summarize and analyze the new features in the new product or technology, write it down and publish it. If you want to have a quick learning about the
    new technology, MSDN library is a good place. It can be a cookbook for you. It contains some detail steps for tools, such as Report Builder or BIDS. It also contains many new features introduction. It is always very useful for you to understand the new features.
    In addition, it is based on web and many links make you can jump to the other technical point freely. The most important is all of these is free and all the information will be updated if the new feature is released.
    In short, if you want to learn the latest technology about Microsoft product, MSDN is a good choice. I hope my introduction is helpful to you.
    Regards,
    Edward
    Edward Zhu
    TechNet Community Support

Maybe you are looking for