Optimalization, tunig pl/sql query, the best knowledge source.

hello,
I'm finding the best informaton about good practice in Oracle, all about Optimalization, tunig pl/sql. Can you help me?
ths
Edited by: adamkutera on 2010-04-21 12:11

Dear adamkutera,
The BEST documentation (including optimization, do&donts, tuning tips etc) is the Oracle documentation.
No other documentation is as up-to-date and current as Oracle's documentation.
They can be found at...
http://www.oracle.com/technology/documentation/index.html
and
http://tahiti.oracle.com/
Specifically for performance tuning...
http://download.oracle.com/docs/cd/B14117_01/server.101/b10752/toc.htm
vr
Sudhakar B.

Similar Messages

  • SQL Query - The number of columns specified in "SQL Query" does not match t

    I am creating new UDM for tablespace alert, below is my query,however its failing with error
    SQL Query - The number of columns specified in "SQL Query" does not match the value specified in "SQL Query Output"
    I selected Metric type is number
    SQL Query Format : Two columns
    Query:
    SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2)
    used_pct FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    Any clues why i am getting error.

    SQL> SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2) used_pct
    2 FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    3 WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    4 AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    TABLESPACE_NAME USED_PCT
    MGMT_TABLESPACE .82
    SYSAUX 1.52
    UNDOTBS1 .32
    RMAN .02
    CORRUPT_TS 10.63
    USERS 0
    SYSTEM 2.26
    MGMT_ECM_DEPOT_TS .04
    MGMT_AD4J_TS 0

  • Sql query writing best practises

    HI forum,
    Any body is having a tutorial on sql query writing best practises...pls share with me
    Thanks

    For example:
    [url http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/toc.htm]Oracle Database Performance Tuning Guide 10g Release 2 (10.2)
    [url http://people.aapt.net.au/roxsco/tuning/]Oracle SQL Tuning Guide
    Gints Plivna
    http://www.gplivna.eu

  • Step by step approach for the best knowledge transfer

    Hi Guys,
    I am looking for the step by step approach for the best knowledge transfer of SAP different modules. Can any one help me for the same??
    Thanks in stack

    Hello,
    I'm currently working in a very big project, and there, it's organized like that:
    Some time before GoLive, the teams were mixed (project team were mainly external consultants), and for every external consultant, an internal ressource was assigned to take over the tasks. Then, there's a time of parallel work, but automatically, the internal ressources take over more and more of the tasks, and finally, one by one, the external consultants are "phased out".
    We defined, what documents had to be delivered for hand over - ppts describing the general issues, a system management manual describing the administrative steps and so on.
    And: to check the performance of the hand-over of the tasks, there were weekly or biweekly meetings with the external ressource and the internal counterpart, where the status of the task handover was analysed.
    kind regards,
    Carl

  • What's the Best Open Source DB for use with Kodo?

    Hi everyone,
    In terms of ease of setup and use, tools to view info in the database, and least difficulty in
    running with Kodo, what is the best open source database to use? I'm use to using Oracle and
    SQLPlus. I need to use an open source DB for a learning environment, and I'd like your informed
    opinion.
    Thanks,
    David Ezzio

    I have been using postgresql 7.1 with Kodo for a while with mostly positive results, and currently
    have it deployed with Kodo 2.2.3. I prefer it to mysql because its feature set is a little richer,
    and supports transactions natively. My experience with mysql (without jdo - I haven't tried it with)
    is good, but there were little things missing in mysql 3.x, e.g. the ability do do a join in a
    DELETE statement.
    BTW, there are some severe problems somewhere in the 2.2.4 release with postgresql if you intend to
    eventually deploy on it. It also apparently has some problems invoking postgresql's indices, making
    it a little less than optimal. But as a learning environment, it's what I'd recommend.
    -Mike
    Marc Prud'hommeaux wrote:
    David-
    Here is the rundown of the databases I have experience with:
    MySQL: Fairly simple to install (especially if you run Debian Linux), but
    configuration, especially adding users, can be a pain. A separate open
    source project called "mysql-navigator" makes it fairly easy to do
    simple queries, inserts, etc. In most of my tests it outperforms
    PostgreSQL, but your mileage will vary. It has a sane CLI that supports
    modern features like line history, etc (unlike the horrific SQLPlus).
    PostgreSQL: People often say that it is a more "academically
    correct" database than MySQL. I've also found it to be quite a bit
    easier to set up. Their GUI (called "pgaccess") is simplistic, but does
    most things you need. Has a CLI similiar to MySQL's.
    HypersonicSQL: By far the easiest to set up (just drop the jar in your
    CLASSPATH), but is java only, can be rather slow, and has no GUI tools
    available that I know of (except various free vanilla-JDBC GUI tools).
    We feel that Kodo works quite well with all these DBs. The MySQL JDBC
    driver seems a bit less buggy than Postgres', but their transaction
    support is very recent and not very well tested. If I had to pick one or
    the other, I would probably go with MySQL.
    David Ezzio <[email protected]> wrote:
    Hi everyone,
    In terms of ease of setup and use, tools to view info in the database, and least difficulty in
    running with Kodo, what is the best open source database to use? I'm use to using Oracle and
    SQLPlus. I need to use an open source DB for a learning environment, and I'd like your informed
    opinion.
    Thanks,
    David Ezzio--
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code--
    Mike Bridge

  • Which is the best Open source API  for PGP??

    Hi All,
    Please tell me
    which is the best Open source API for PGP??
    Please Help me thi is urgent!!
    regards
    harish

    I am also looking at these topic at the moment.
    I found Bouncycastle and hushSDK.
    Have you found a good one and with example also?

  • Sql query the store that has best sell quality in pubs sample database

    In pubs database, I want to query the store in which has highest sales quality. I exec following query,
    select stores.stor_id, sum(sales.qty) as sumqty
    from stores
    join sales on stores.stor_id = sales.stor_id
    group by stores.stor_id, stores.stor_name
    Results:
    6380 Eric the Read Books 8
    7066 Barnum's 125
    7067 News & Brews 90
    7131 Doc-U-Mat: Quality Laundry and Books 130
    7896 Fricative Bookshop 60
    8042 Bookbeat 80
    The result I need is 
    7131 Doc-U-Mat: Quality Laundry and Books 130
    Could anyone give me some suggestions?
    Thanks.

    Hello,
    If you don't want to use TOP , you can try to used nested query to get MAX(SUM()) value. Please refer to the following statement:
    SELECT stores.stor_id, sum(sales.qty) as sumqty
    FROM stores
    JOIN sales ON stores.stor_id = sales.stor_id
    GROUP BY stores.stor_id, stores.stor_name
    HAVING sum(sales.qty)=
    ( SELECT max(sumqty) FROM (
    SELECT stores.stor_id, sum(sales.qty) as sumqty
    FROM stores
    JOIN sales ON stores.stor_id = sales.stor_id
    GROUP BY stores.stor_id, stores.stor_name) AS s)
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Help with sql query the status of  A/P Reserve Invoice

    Hi,
    I am trying to write a query which lists all A/P Reserve Invoice info with OPEN status.
    I check the OPCH table and cannot find the rule to tell the status.
    The "DocStatus" field has two values only: 'O' for open and 'C' for closed.
    However, the status of A/P Reserve Invoice are OPEN, CLOSED, DELIVERED, PAID, etc.
    I try to use DocStatus field to filter, but the result does not match what I see in SAP.
    Could you please give me some hints about how to get the data I need? Thank you.
    Best regards,
    Sylvia
    Edited by: csylvia on Jun 23, 2011 5:54 AM

    Hi Darius,
    Thanks for your reply.
    However, I don't know what is the relationship between Purchase order and A/P Reserve Invoice.
    Do you mean using "SELECT T0.DocEntry FROM OPCH T0, OPOR T1 WHERE T0.DocNum = T1.DocNum AND T1.DocStatus = 'O';" to query the A/P Reserve Invoice data with OPEN status?
    But the result is not what I want.
    The result of "*SELECT * FROM OPOR WHERE DocStatus = 'O';*" is also not.
    I'd like to query A/P Reserve Invoice list with OPEN status, and I try the following sql query:
    SELECT DocEntry FROM OPCH WHERE DocStatus = 'O' AND InvntSttus = 'O';
    The result is close to what I need, but it's not exactly correct.
    Moreover, I don't think the sql query conditions is accurate.
    Please give me some advice. Thank you.
    Best regards,
    Sylvia

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • XML SQL - query the table with XML in column [urgent]

    I have table which have to be query-ied with
    oracle.xml.sql.query.OracleXMLQuery class to produce XML
    document for web.
    Problem is that in one column is already XML data (well formed
    HTML) like this:
    <font face="Arial">click</font>
    and when I call OracleXMLQuery.getXMLString() it encode all's '<'
    as ';lt' and so on.
    Can I turn off that kind of encoding some way or is it better
    sollution for this?
    thanks in advance
    Bojan
    null

    You can use an XSLT Stylesheet to achieve what you are wanting to do.
    Say the name of the column containing
    the markup is named "DOC", then
    transforming the output of OracleXMLQuery
    by the following stylesheet using
    the oracle.xml.parser.v2.XSLProcessor...
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl utput method="xml" omit-xml-declaration="yes"/>
    <xsl:template match="@*|node()">
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:template>
    <xsl:template match="DOC">
    <xsl:value-of select="." disable-output-escaping="yes"/>
    </xsl:template>
    </xsl:stylesheet>
    Will give the results you are looking for.
    You can use the XSQL Servlet to make this combination even easier if that is applicable to your situation.

  • Using SQL Query for page item source does not insert populated value

    Hi All,
    Following are the attribute details of a certain page item on an edit form:
    Display As: Text Field
    Page Item Source Type: SQL Query
    Source value Expression: SELECT a from tab where id = 'ABC'
    Although the field appears populated on the screen, but the value is not inserted in the table.
    Can anyone help on this?
    Thanks in advance,
    Annie

    Annie:
    One solution is to define a pl/sql function that given a date will return the 'run-date'. Something like create or replace function get_prod_date(p_date in date) return date is
    retval date;
    begin
    select run_date into retval from tab_x where run_date=p_date;
    return retval;
    end;Change the Source Type for the page-item back to 'Database Column'
    Set Source value or expression to the 'database column name'
    Set 'Post calculation computation' to be
    get_prod_date(:pxx_date)
    Varad

  • Whats the best open source verilog simulator for T1 regressions?

    Is Icarus good for this? Or, is there any other better than this.
    I am new to this, if someone have used any free simulator with opensparc work then please let me know about which simulator you used and the advantages of it.

    I personally saw many uses of mySQL in production environments.
    Generally speaking, lots of open-source solutions are being successfully used by lots of companies in their production environments, and the idea that they are somehow inferior to commercial solutions has no base in facts, in my view.
    As for as comparison between MySQL and PostgreSQL :
    http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/MySQL-PostgreSQL_features.html

  • SQL query to list the "Administrative category" field for all applications

    yesterday i started a thread to list the "Optional reference" field for all cm applications in a SSRS report. I've got the query with the help of Torsten.
    https://social.technet.microsoft.com/Forums/en-US/00419e6e-e3c2-4b80-b6af-2a24ced1032d/sql-query-to-list-the-optional-reference-field-of-all-packages-in-cm-2012?forum=configmanagersdk
    But again today, i'm looking for a way to get "Administrative category" field in a SSRS report. Could someone point me to the right direction ?
    Kindly mark as answer/Vote as helpful if a reply from anybody helped you in this forum. Delphin

    Hi,
    You could monitor the SMSProv.log when you check the category of an application. It shows that SQL query the SCCM provider used is related to function fn_ListCategoryInstances.
    Best Regards,
    Joyce

  • SQL query to fetch the catalog category for a PLM item

    Hi All,
    Can anyone help me with a sql query of how we can fetch the catalog category for a PLM item.
    Regards,
    Shruti

    Hi,
    You could monitor the SMSProv.log when you check the category of an application. It shows that SQL query the SCCM provider used is related to function fn_ListCategoryInstances.
    Best Regards,
    Joyce

  • How to Suppress The Output of a SQL Query In Oracle 11gR2

    Hi Friends,
    I am using oracle version 11.2.0.1, I have set a cronjob which will run on every 15 minutes and give us a log file mentioning the execution time taken for that SQL query:-
    For example:
    SQL> set timing on;
    SQL> SELECT objProp FROM aradmin.arschema WHERE (schemaId = 175);
    OBJPROP+
    --------------------------------------------------------------------------------+
    *6\60006\4\0\\60008\40\0\60009\4\0\\60010\4\0\\60018\4\0\\600*
    *22\4\68\1\63\AR:jRL#*
    Elapsed: 00:00:00.00
    The above query will return the output as well as the time taken for execution of the query. I want to suppress the output of the query and only want the time taken to be printed. Is it possible by set commands. I have marked the output as bold and made it Italic.
    Please help me at the earliest.
    Regards,
    Arijit

    >
    I am using oracle version 11.2.0.1, I have set a cronjob which will run on every 15 minutes and give us a log file mentioning the execution time taken for that SQL query:-
    The above query will return the output as well as the time taken for execution of the query. I want to suppress the output of the query and only want the time taken to be printed. Is it possible by set commands. I have marked the output as bold and made it Italic.
    >
    How would that even be useful?
    A query from a tool such as sql*plus is STILL going to send the output to the client and the client. You can keep sql*plus from actually displaying the data by setting autotrace to trace only.
    But that TIME TAKEN is still going to include the network time it takes to send ALL rows that the query returns across the network.
    That time is NOT the same as the actual execution time of the query. So unless you are trying to determine how long it takes to send the data over the network your 'timing' method is rather flawed.
    Why don't you tell us WHAT PROBLEM you are trying to solve so we can help you solve it?

Maybe you are looking for