Oracle materialize hint

The Oracle materialize hint is used to ensure that the Oracle cost-based optimizer materializes the temporary tables that are created inside the “WITH” clause.
What is the meaning of materialize in the above statement?

Akhil  N K wrote:
The Oracle materialize hint is used to ensure that the Oracle cost-based optimizer materializes the temporary tables that are created inside the “WITH” clause.
What is the meaning of materialize in the above statement?Store the result set of the WITH clause and not look into the table every time.

Similar Messages

  • Oracle query hints in JPQL - is it possible?

    Sorry, posted to wrong forum... I don't know how to delete it - only edit...
    Hello,
    I am using Sun Java Application Server 9.1 (GlassFish), EJB 3.0 and JPA (TopLink). My database is Oracle.
    Is there any way to specify Oracle query hints (for example, /*+ rule */ in JPQL queries? Or the only way to do it is using native queries?
    Many thanks in advance
    Edited by: Troff_2 on Nov 27, 2007 5:50 AM

    Yes.It is possible.Only need to modify the view for order tracker query need to change.
    You can use decode statement in the query to add status as Processing .
    Please refer the IBE_ORDER_SUM_V view for details.
    Eg:
    decode(oel.meaning,'Booked',"Processing",oel.meaning) from
    oe_lookups        
    oel,

  • Oracle Ignores hint in One Instance and uses the hint in another instance

    Hi Oracle World,
    I am experiencing a strange problem in Oracle.
    We have two oracle servers: one for Test and one for Production.
    We have exactly the same code for a view in both the systems:
    The code is as follows:
    CREATE OR REPLACE FORCE VIEW V_FT(...................)
    AS
    SELECT /*+ star_transformation fact (FT) */
    FT.*, AH.ACCT_1, LH.REGION, FH.FNCT_1
    FROM
    LOCATION_HIERARCHY LH,
    ACCOUNT_HIERARCHY AH,
    FUNCTIONAL_HIERARCHY FH,
    FACT_TABLE FT
    WHERE
    LH.COMPANY = FT.COMPANY
    AND AH.ACCOUNT = FT.ACCOUNT
    AND FH.FUNCTIONR = FT.FUNCTION;
    When I see the execution path:
    In Test box the Explain plan is as expected: It takes the Star_transformation hint into account, converts all three reference table joins to bitmap and performance is good.
    But In Production, It tatally ignores the table name from the hint.
    Also it converts all the tables names to lower case: though it shouldn't impact, I have also tried to give the table names in lower case and then tried. Same issue.
    Tried with NO_MERGE hint. It was pretty good in Test but same issue in Production: it ignoes the table name from hint.
    I have taken out the table name from test and then tested. Now both the explain plans match. That proves oracle ignores the table name in Production.
    We have compared all the parameters in both. They are 100% same. All indexes are analyzed. Can anyone please help what could be the fundamental difference that causes this difference?
    Production takes 8 minutes for a specific query whereas Test returns the same query in 45 secs. Data volume is also not very much different except few hundreds.
    Any pointers please?
    Thanks & Regards
    Saswati

    It is enabled. As I have mentioned we have compared all the parameters in both.
    All v$parameter, init.ora settings everything is same.

  • Oracle parallel hint

    Hello,
    Is it possible to set a parallel hint in queries?
    Best regards,
    Andrey

    PARALLEL_MAX_SERVERS is the aggregate limit for all concurrent sessions using Parallelism.  Thus, with your value of 35, you could have 8 sessions using 4 PX slaves each but the 9th session would get three slaves.
    PARALLEL_THREADS_PER_CPU does not need to be changed.  It allows Oracle to determine  PARALLEL_MAX_SERVERS based on CPU_COUNT.
    Similarly, CPU_COUNT is not to be changed.
    For a DML (or a query) you set the Degree based on the the "what is required".  This you would best determine from experience against that particular database.
    A degree of 4 maybe good and sufficient in one environment, for a set of requirements but inadequate in another environment (e.g. number of underlying disks, i/o channels, number of processor cores that are free, concurrent load on the server and storage from other sessions/databases, number of partitions in a target partitioned table) for a different set of requirements (e.g number of rows to be processed, time constraint on the execution).
    Hemant K Chitale

  • Oracle Hints - Bex Query

    Hi experts,
    can I add a particular hints when I execute at run time a query bex ?
    My main scope is that when I run a bex query, the corresponding query may use an oracle parallel hint in order to increase the performance.
    Do you think that I can do it ?
    Thank'you in advance !

    > can I add a particular hints when I execute at run time a query bex ?
    No, you can't.
    > My main scope is that when I run a bex query, the corresponding query may use an oracle parallel hint in order to increase the performance.
    Usually there's a good reason for BEX queries not to use the parallel query feature.
    That reason is: parallel query turns your multi-user database into a single-user query machine.
    This single sql session will aquire way more resources than a standard query - eventually blocking other activities.
    In order to speed up your BEX query better check the execution plan and figure out what makes the query too slow.
    Open a support message for it if you cannot do this yourself - there are quite some bugs around (even with Oracle 10.2.0.4) that lead to bad quey performance.
    Of course - the first things to check would be to install the current Oracle patchset, patches and setup the parameters correctly. More than 90% of all performance support messages are solved just by that!
    regards,
    Lars

  • Use of an Oracle Hint for a WebI-Universe BEX based-Query  ?

    Hi,
    can I use an Oracle Optimizer Hint like /*+ PARALLEL(MyFacttable, 8) */
    for a WebI- ./. Universe- ./.  BEX based-Query ?
    Is this possible  ?
    If Yes: How and where to implement this  ?
    Thank You !
    Martin

    Hi,
    BusinessObjects only communictates with the MDX Interface by way of SAP's OLAP BAPI over RFC.
    Everything else, OLAP engine, Data Manager, etc etc Cube abstraction over a Relational schema is handled by the BW application.
    so No, BO can't "inject" any cleverness into BW processing architecture.
    Regards,
    H

  • Interactive report performance problem over database link - Oracle Gateway

    Hello all;
    This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
    The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
    query like this: (due to sensitivity issue, I can not disclose real table name)
    SELECT apex_item.checkbox(1,b.col3)
    , a.col1
    , a.col2
    FROM table_one a
    , table_two b
    WHERE a.col3 = 12345
    AND a.col4 = 100
    AND b.col5 = a.col5
    table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
    Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
    I would like to get ideas from people how to resolve or speed-up the query?
    Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
    Thank you.
    Shaun S.

    Hi Shaun
    Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
    By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
    Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two),
    sourceqry AS
    (SELECT  b.col3 x
           , a.col1 y
           , a.col2 z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5)
    SELECT apex_item.checkbox(1,x), y , z
    FROM sourceqry
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two)
    SELECT  apex_item.checkbox(1,x), y , z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
    We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
    Sorry for all the questions but it helps to answer the question, if I can.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • +materialize causes I/O ?

    We use a query like this on Oracle 11.2g (in a PL/SQL stored procedure):
    WITH x AS ( SELECT /*+materialize*/ FK1ID, FK2Id, FK3Id  FROM SOME_VIEW  WHERE some_ID = p_some_parameter) -- an IN parameter of the stored procedure
      SELECT  foo, bar, baz FROM t1, t2, ...
      WHERE exists (
        select 1 from  x where
            x.FK1ID= 42
          or
            x.FK1ID = 34 and
            x.FK2ID = t2.xyz)
        AND some other conditionsThis is much faster (50 times) than without the +materialize hint or if we put that (sub)query in line.
    But apparently it causes extra I/O (writing the subquery result to temporary table and reading it back).
    Is that true? If yes, what else to use instead then?
    Regards,
    David
    PS: The subquery would have 10-20 rows, while the main query would return tens of thousands of rows in our test case.

    But apparently it causes extra I/O (writing the subquery result to temporary table and reading it back).
    Is that true? Yes, it's true that writing the result to a memory table causes IO
    If yes, what else to use instead then?Sounds like you already have an answer:
    This is much faster (50 times) than without the +materialize hint or if we put that (sub)query in line.The materialize hint forces the materialization of the subquery.
    Without hinting it, this is something that will happen automatically usually when you reference it twice in subsequent selects.
    As ever, there's a balance.
    Why would we want to force a materialisation of a subquery referenced once?
    In general, it seems like something that should be avoided and treated with a no_merge or a no_unnest or whatever is appropriate for the issue that the materialize hint was trying to solve.
    As Centinul suggests, execution plans would be a useful addition to the post.
    I would double check those predicates in the subquery as well.
    You have :
            x.FK1ID= 42
          or
            x.FK1ID = 34 and
            x.FK2ID = t2.xyzDo you not want this?
           (x.FK1ID= 42
          or
            x.FK1ID = 34) and
            x.FK2ID = t2.xyzor even
           (x.FK1ID IN (42,34) and
            x.FK2ID = t2.xyzAt the moment, you have something more akin to:
    WITH x AS ( SELECT /*+materialize*/ FK1ID, FK2Id, FK3Id  FROM SOME_VIEW  WHERE some_ID = p_some_parameter) -- an IN parameter of the stored procedure
      SELECT  foo, bar, baz FROM t1, t2, ...
      WHERE exists (
        select 1 from  x where
            x.FK1ID= 42
       union all
        select 1 from  x where
            x.FK1ID = 34 and
            x.FK2ID = t2.xyz)Even if the code is correct, the latter wording is at least perhaps clearer about it.

  • Oracle Object Type Constructor Called Multiple Times

    I have an object type with a custom constructor. In SQL, when I reference the attributes the constructor is called multiple times in Oracle 11.2.0.4.
    Why is the constructor called multiple times?
    How do I stop it?
    My current work around is to reference the attributes and use the /*+ materialize */ hint.
    Problem Setup
        create or replace type Foo as object
          Bar1 NUMBER,
          Bar2 NUMBER,
          Bar3 NUMBER,
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
        create or replace type body Foo is
          -- Member procedures and functions
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
          AS
          BEGIN
            SELF.Bar1 := p_Bar1;
            SELF.Bar2 := p_Bar2;
            SELF.Bar3 := p_Bar3;
            dbms_output.put_line('Foo Constructor Called');
            RETURN;
          END;
        end;
    Problem
        -- Constructor is called 6 times!
        -- Once for each column and once for each predicate in the where clause.
        SELECT x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3, f
        FROM (
          SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
          FROM dual d
        ) x
        WHERE x.f.bar1 = x.f.bar1 AND x.f.bar2 = x.f.bar2
    Output
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Foo Constructor Called
    Workaround
        -- Work Around
        -- Constructor is called 3 times
        -- Once for each column in the inline view.
        -- Note, I removed column f (the object type) because it's not compatible with the materialize hint.
        WITH y AS (
          SELECT /*+ materialize */ x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3
          FROM (
            SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
            FROM dual d
          ) x
        SELECT y.bar1, y.bar2, y.bar3
        FROM y
        WHERE y.bar1 = y.bar1 AND y.bar2 = y.bar2

    Another work-around is described in this thread... Accessing fields of a custom object type... which makes use of a collection type combined with the TABLE operator, like so...
    create or replace type FooTable as table of Foo;
    SELECT x.bar1 AS bar1, x.bar2 AS bar2, x.bar3 AS bar3, value(x) f
        FROM table(FooTable(
          foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3)
        )) x
        WHERE x.bar1 = x.bar1 AND x.bar2 = x.bar2
    BAR1 BAR2 BAR2 F
    1    2    3    (1, 2, 3)
    Foo Constructor Called
    Hope that helps...
    Gerard

  • Install Oracle E-Business 12 on Windows 2003

    Install Oracle EBS 12.1.1 on Windows 2003
    Hint : Install in physical server/PC/Laptop (then convert to VM if you want)
    I try to install Oracle EBS12 on VM but it took time and return error on step 3, then I solve the error and complete the installation it took about 1day installing at the end all oracle forms not working with error FRM-92101.
    After several days of search, I found that the error comes on step 3 raised cause of slow drive, the normal installation should take 2 hours on good server, it took 3.5 hours on physical laptop
    Steps :
    1.     Install Windows 2003
    2.     Install loopback adapter
    •     Open control panel
    •     Double click on Add Hardware
    •     Choose Yes, I have already connected the hardware, then Next
    •     Choose Add new hardware device, then Next
    •     Choose Install the hardware that I manually select from a list, then Next
    •     Choose Network Adapters, then Next
    •     Choose Microsoft then Microsoft Loopback Adapter, then Next
    •     After that next..next till finish
    •     Give loopback adapter IP Address Ex: 200.200.200.200
    3.     Change Computer name
    •     Right click on My Computer, Choose Properties
    •     Computer Name tab page
    •     Click Change Button
    •     Wright any computer name Ex: APPS
    •     Click More Button
    •     Wright and DNS name Ex: EBS12.COM
    •     Restart
    4.     Install VC++ 2005
    •     Install VC++ Express (Hint : Be sure that .Net Framework 2 installed, it comes with VC++ Express)
    •     Install VC++ Express in directory didn't contains any spaces Ex: C:\VCPlus
    •     Copy cl.exe and link.exe from C:\VCPlus\VC\Bin to C:\WINDOWS\System32
    5.     Install Cygwin
    •     Download cygwin (Hint: download old version 1.5 legacy)
    from http://www.cygwin.com/win-9x.html
    •     Run setup.exe and click Next, which will bring up the Choose Installation Type screen.
    •     Select ; Install from Internet and Click Next
    •     Select ; Root Directory C:\cygwin and select radio button
    •     Install for ; All Users and Default Text File Type ; DOS / text ; Next Local Package Directory can be any but C:\cygwin is recommended. ; Next Direct Connection.
    •     Click on Next again to get to the Select Packages screen, and select the following packages (click on to toggle):
    a.     All Default
    b.     Archive Default, plus manually select the zip package
    c.     Base Default, plus manually select the following extra packages: ash, coreutils, diffutils, findutils, gawk, grep, sed, tar and which
    d.     Devel Default, plus manually select binutils, gcc, gcc-core, gcc-g++, make and mktemp
    e.     Doc Default, plus manually select cygwin-doc and man
    f.     Editors Default, plus manually select vim
    g.     Interpreters Default, plus manually select gawk
    h.     Shells Default, plus manually select ash and tcsh
    i.     Utils Default, plus manually select cygutils and file
    Hint: some of the above packages are not found
    •     Click on Next again to download the selected files. It will take some time depending upon mirror site you selected and after download cygwin setup will be automatically starts. After installation completed, run CMD Command C:\cygwin\bin and run following commands:
    a.     copy gawk.exe awk.exe
    b.     copy grep.exe egrep.exe
    c.     copy make.exe gnumake.exe
    d.     copy gcc.exe cc.exe
    6.     Update Environment Variables
    •     Right click on My Computer, choose properties
    •     Choose Advanced tab page
    •     Click on Environment variables button
    •     In system variables choose Path, the Edit button
    •     In variable value go to the end of values then add
    ;C:\VCPlus\VC\bin;C:\cygwin\bin
    •     then OK
    7.     Download Oracle EBS 12
    •     download from ORACLE E-Delivery
    8.     Create Stage
    •     using perl (I already have stage, so I'll skip this step)
    9.     Install EBS 12
    •     Go to stage directory Ex: C:\Stage12i\startCD\Disk1\rapidwiz
    •     Double click on RapidWiz.cmd
    •     Change Unix Toolkit directory (MKS) to C:\cygwin\bin
    •     Change Visual Studio directory to C:\VCPlus\VC
    •     Change Base directory to Ex: C:\oracle\VIS (Hint: required free space 230 GB)
    Edited by: user603124 on Apr 16, 2012 2:45 AM

    Hi,
    Share the configuration of your Laptop and VM Machine.
    It should satisfy the requirement of the processes. There are other causes also.
    Koushik

  • Subquery Factoring and Materialized Hint

    WITH t AS
            (SELECT MAX (lDATE) tidate
               FROM rate_Master
              WHERE     Code = 'G'
                    AND orno > 0
                    AND TYPE = 'L'
                    AND lDATE <= ':entereddate')
    SELECT DECODE (:p1,  'B', RateB,  'S', RateS,  Rate)
      FROM rate_Master, t
    WHERE     Code = 'G'
           AND orno > 0
           AND TYPE = 'L'
           AND NVL (lDATE, SYSDATE) = tidate;In the given example the sub query returns just one row because of the aggregate function max. Making this in to a With clause will be of any benefit ? Also i presume/understand that the subquery factoring would be really useful only when we try to make a sub query which returns more rows in a with clause. Is my intrepration right?
    Secondly adding the /*+ Materialize */ hint to a With query is mandatory or the optimizer by itself will do it and make a temp table transformation. In my example i am forced to give the hint in the query. Please discuss and help
    Thanks in advance.

    ramarun wrote:
    WITH t AS
    (SELECT MAX (lDATE) tidate
    FROM rate_Master
    WHERE     Code = 'G'
    AND orno > 0
    AND TYPE = 'L'
    AND lDATE <= ':entereddate')
    SELECT DECODE (:p1,  'B', RateB,  'S', RateS,  Rate)
    FROM rate_Master, t
    WHERE     Code = 'G'
    AND orno > 0
    AND TYPE = 'L'
    AND NVL (lDATE, SYSDATE) = tidate;In the given example the sub query returns just one row because of the aggregate function max. Making this in to a With clause will be of any benefit ? Also i presume/understand that the subquery factoring would be really useful only when we try to make a sub query which returns more rows in a with clause. Is my intrepration right?I am not aware of any performance Benefit due to use of With clause. IMO, It eases the job to write a Subquery multiple times in a query.
    The solution you adopted has to hit the cache twice and hence do not look very performant. I will advise you to opt for Analytic functions (like the suggestion I provided in another thread). If the solution does not yeild correct results, then provide with a Script that we can replicate (Create table, Sample Insert statement and the expected output).
    select decode(:p1, 'B', RateB, 'S', RateS, Rate)
       from (
                select RateB, RateS, Rate, NVL(ldate, sysdate) ldate, dense_rank() over (order by case when NVL(lDATE, SYSDATE) <= ':entereddate' then NVL(lDATE, SYSDATE) else to_date('01/01/1970', 'DD/MM/YYYY' end DESC) rn
                  from rate_Master
               where Code = 'G'
                   and orno > 0
                   and type = 'L'
             ) a
      where a.rn = 1;>
    Secondly adding the /*+ Materialize */ hint to a With query is mandatory or the optimizer by itself will do it and make a temp table transformation. In my example i am forced to give the hint in the query. Please discuss and help
    Usage of Hints is only for Debugging purposes and is not meant to be used in production code. It is when you have to ascertain the reason for CBO choosing a plan that you do not expect it to take, you use hints to force your plan and find the cost and analyze it. Hence, I do not support the idea of Hints for production code.

  • About hints in sql statements

    hi,
    can you plz provide any best sides for sql hints?

    Suri wrote:
    You can learn basics from below site.
    http://www.dbasupport.com/oracle/ora9i/index_hints.shtml
    What an awful article...
    >
    Using Index Hints in SQL statements - Cause we know more about our application than Oracle does
    Hints are used to give specific information that we know about our data and application, to Oracle. This further improves the performance of our system. There can be instances where the default optimizer may not be efficient for a certain SQL statements. We can specify HINTS with the SQL statements, to improve the efficiency of those SQL statements.
    <cut>
    By using Hints, you can improve certain SQL statements that might otherwise be inefficient.
    >
    That is just so wrong and completely misses the point.
    If a query is inefficient, then it can be down to poor database design, lack of statistics, lack of correct indexes (sometimes too many indexes), or poorly written SQL statements. Hacking an SQL statement with Hints to try and make it work better because you believe you "know more about our application than Oracle does", shows a complete lack of understanding of the internals of Oracle. Oracle doesn't need to know about the application, but it certainly does need to know about how the data is stored and related on the underlying tables and in the tablespaces and datafiles etc. and it's sure as hell got a better idea about that than any programmer, especially as it can change and adapt in the future as the data changes, which a programmers SQL statements (with fixed hints) won't.
    That article is a good example of the wrong attitude towards using hints. Thanks for posting that to demonstrate it.

  • Sql hints in jpa

    How can i pass in sql hints to oracle database using ebj3 jpa? Any examples would be great. I can't find any example searching the web or this forum. I guess, using native query, might solve this problem, but any facility in ejb query language?

    TopLink Essentials will only support this through native queries.
    In the Oracle TopLink 11g preview you can access the underlying Oracle specific hint functionality.
    Doug

  • How to write SQL hints for this query?

    The query is like:
    select * from foo, t
    where foo.name in
    (select name from bar
    where id in (
    select id from car
    where date < sysdate
    and foo.a = t.b;
    I want the innermostsubquery 'select id from car ...' to be executed first, and the subquery 'select name from bar ...' to be execute second, and the outermost query 'select * from foo,t ...' to be executed the last. How can I write the Oracle sql hints to force the order?
    Thanks.

    user553560
    You might be able to create a large set of hints to force the access path you want - but unless you really know what you are doing with hints, you may find that your solution is very unstable (it might be luck rather than correctness that let's it work to start with).
    The difficulty in this query is the double layer of IN subqueries, so if you can rewrite the query, you might try manually unnesting as follows:
    select
         t1.*. t.*
    from
              select     
                   distinct t2.name
              from     t2
              where     t2.id in (
                        select     t3.id
                             from     t3
                        where     t3.dated < sysdate
         )     v,
         t1,
         t
    where
         t1.name = v.name
    and     t1.a = t.bDepending on your indexing and statistics, you may find that a simple /*+ unnest */ hint in the first subquery will be sufficient to do this for your. Again depending on the statistics you may find that you have to put extra hints into the above to make Oracle use the join method and indexes you think appropriate.
    N.B. The first step (as others have noted) is to check that your statistics are good before you start manipulating the code or using hints.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • Oracle function to caclulate occurance of a character in a string

    Hi All,
    I have a string lets say :
    'rahul|rahul|rahul|'
    I want to calculate the occurance of the charachter '|' which is 3.
    PS : I dont want to use connect by or reg_exp and I am using oracle 9i
    Regards
    Rahul

    Hi,
    Mac_Freak_Rahul wrote:
    looking for an oracle built-in function.Sorry, there are only a couple of hundred built-in functions. To do any of the millions of things people want, they sometimes have to combine two or more of those functions, as Paul did.
    Acutally, there is a single built-in function that does this, REGEXP_COUNT, but it was only introduced in Oracle 11.1, so it doesn't help you. The fact that they made a new function in Oracle 11 hints that the way to get the same results in earlier versions was too complicated, so don't be surprised if the best way to do this in Oracle 9 isn't as easy you'd like.
    What exactly don't you like about Paul's solution?
    Paul's solution is what I would use. If you have a reason why you can't use it, say what that reason is, and someone will help you work around it. I can think of other ways to get the same results, including returning 0 when the string doesn't contain any of the designated character, but posting them will only waste your time (not to mention mine) if they have the same problem that Paul's solution has, whatever that is.

Maybe you are looking for

  • Retrieving file from file port while idoc generation

    HI, we have set up the system to call IDOC_INBOUND_SINGLE from external system. it is working well through out. we have configured the file port in sap. If generation idoc is successfull, idoc number will be returned. if not execption will be thrown.

  • Problem with install 10.4 from 10.3.9

    I bought G5 with bundled Mac OS X 10.4 Tiger. But if I try to install Tiger on my old Mac G4 double processor 1,25 + 1GB RAM with 10.3.9 system already write: No instal on this computer. Why? Please help me.

  • Reminders window won't show up after clicking in notifications center

    After clicking a notificytion in notifications center on Mavericks the APP Reminders opens but the application window is not showing up. Allways worked like a charme but not any longer for me. I tried to: 1) uncheck the iClound sync for Reminders whi

  • Bug in finder since Mavricks 10.9.2 from 10.7.5

    Hi all, Since migration to Mavricks 10.9.2 from 10.7.5 i have two bugs in finder List view works until I try to open a shared device, after that list view dosen't work at all. Tabs features also not working at all. My machine is a : MacBook Pro 13 po

  • How to synchronise Skype

    How do I synchronise my laptop Skype so that all contacts appear on my desktop Skyoe that I downloaded yesterday?  I have recently updgraded my desktop with Windows 7 and installed a new hard drive.