Increase the performence of the query how

SELECT * from load_log
where
filetype = 'O/C'
AND EXISTS (SELECT '1' FROM view_orders
     WHERE O_ftype = ftype
AND o_loadno = loadno -- << this line
          AND o_cocode = 1)
HOW TO INCREASE THIS QUERY PERFORMENCE.
THE view_orders IS THE VIEW THAT CREATED FROM 4 TABLES WHICH HAVE SAME COLUMSN EXCEPT FTYPE
if i remove this line the query execute very fast
AND o_loadno = loadno --<<
PLEASE GIVE ME SOME IDEAS/SUGGESTIONS.
THANKS
HARDSTONE

hard_stone wrote:
hello,
any budy there..plzzz
its urgentIf you mark your question as answered it's quite likely that you won't get any attention any longer.
As already mentioned in the thread, start with an EXPLAIN PLAN to get the execution plan of your statement. Fiddling around with indexes without proper information at hand is like trial-and-error, therefore try to use a systematic approach.
The optimizer might estimate that all your indexes are not selective enough and/or the clustering factor is too high so that the cost accessing the corresponding tables by random access is too high and therefore decides to use a full table scan.
But this can only be checked if you post a proper explain plan output.
Generic instructions how to do so and post the results in proper mono-space formatting here follow:
Could you please post an properly formatted explain plan output using DBMS_XPLAN.DISPLAY including the "Predicate Information" section below the plan to provide more details regarding your statement. Please use the {noformat}[{noformat}code{noformat}]{noformat} tag before and {noformat}[{noformat}/code{noformat}]{noformat} tag after or the {noformat}{{noformat}code{noformat}}{noformat} tag before and after to enhance readability of the output provided:
In SQL*Plus:
SET LINESIZE 130
EXPLAIN PLAN FOR <your statement>;
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);Note that the package DBMS_XPLAN.DISPLAY is only available from 9i on.
In 9i and above, if the "Predicate Information" section is missing from the DBMS_XPLAN.DISPLAY output but you get instead the message "Plan table is old version" then you need to re-create your plan table using the server side script "$ORACLE_HOME/rdbms/admin/utlxplan.sql".
In previous versions you could run the following in SQL*Plus (on the server) instead:
@?/rdbms/admin/utlxplsA different approach in SQL*Plus:
SET AUTOTRACE ON EXPLAIN
<run your statement>;will also show the execution plan.
In order to get a better understanding where your statement spends the time you might want to turn on SQL trace as described here:
When your query takes too long ...
and post the "tkprof" output here, too.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/

Similar Messages

  • While running the query how much time it will taken, I want to see the time

    Hi Folks
    I would like to know ... While running the query how much time it will be taken, I want to see the time? in WEBI XI R2.....
    Plz let me know  the answer.......

    Hi Ravi,
    The time a report runs is estimated based on the last time it was run. So you need to run the report once before you can see how long it will take. Also it depends on several factors... the database server could cache some queries so running it a second time immediately after the first time could be quicker. And there is the chance of changing filters to bring back different sets of data.
    You could also schedule a report and then check the scheduled instance's status properties and view how long a report actually ran.
    Good luck

  • When we run query how it gets the characteristic values and attributes.

    Hi,
    When we load transaction data it chacks characteristic values then SIDs then DIM IDs then insert  DIM IDs into fact table but when we run the query how it checks and gets the characteristic values and attributes.
    Bye
    GK

    when we run the query how it checks and gets the characteristic values and attributes.
    Just the opposite way you have described. It gets from the corresponding masterdata tables, with the connected SID.

  • View image based on the query

    view image based on the query
    hi i what to download my image based on the following query,am in jdeveloper 11g am using this method for download,i show the whole link of procedure where the query is located and how was it used in forms,but nw i what to take the query and put it in my java code not the webutil just the query,i put the whole forms package so you can undestand the logic of the query how was it used
        public void ViewImage(FacesContext facesContext, OutputStream outputStream)
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
            // get an ADF attributevalue from the ADF page definitions
            AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("DocumentImage");
            if (attr == null)
                return;
            // the value is a BlobDomain data type
            BlobDomain blob = (BlobDomain) attr.getInputValue();
            try
            {   // copy the data from the BlobDomain to the output stream
                IOUtils.copy(blob.getInputStream(), outputStream);
                // cloase the blob to release the recources
                blob.closeInputStream();
                // flush the output stream
                outputStream.flush();
            catch (IOException e)
                // handle errors
                e.printStackTrace();
                FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");
                FacesContext.getCurrentInstance().addMessage(null, msg);
        }when i use the above method in diffient screen without the upload i get this error
    Target Unreachable, identifier 'viewImage' resolved to null
    Error     
    The file was not downloaded or was not downloaded correctly.
    the below procedure is how i what to download the image but in java,but usin query in below procedure
    function right_file (idref integer, i_file varchar2) return boolean is
    begin
         -- check directory
         -- file size
           if webutil_file.file_exists(dir ||'\' ||i_file) then
           return true;
           end if;
    return false;
    end;
    procedure download(i_dref integer, i_file varchar2) is
    file varchar2(50);
    dlin_id integer;
    l_success boolean;
    begin
         if not right_file (i_dref ,i_file ) then
                select file_name,dlin.id
                into file, dlin_id
                from sms_document_links dlin
                    ,sms_document_references dref
                where dref.id = i_dref
                and dref.dlin_id = dlin.id
       l_success :=  webutil_file_transfer.DB_To_Client
                         ( dir ||'\'|| file,
                           'SMS_DOCUMENT_LINKS',
                           'DOCUMENT_IMAGE',
                           'id = '||dlin_id);
      end if;          
    end download;
    procedure open_image (i_dref integer,i_file varchar2) is
    begin          
         local_path;
      local_viewer;       
         if I_file is not null then
              file := i_file;
         else
              select file_name into file
              from sms_document_references
              where id = i_dref
         end if;
         download(i_dref, file);
         if not webutil_host.ID_NULL(active_process) then
        close_previous_image_process;
         end if;
         image_dir_file := dir ||'\'|| file;
         process :=  webutil_host.nonblocking (image_viewer || image_dir_file);
         if webutil_host.ID_NULL(active_process) then
              active_process := process;
         end if;
         if webutil_host.equals(process,active_process) then
              null;
         else     
        close_previous_image_process;
        active_process := process;
         end if; 
         viewer_active := true;
    end;--

    oh ho.
    Dear user,
    this is not code factory/design factory/bla bla bla.
    this area for guide peoples where you are? what is way right to reach your target/goal. whatever in you words...
    from your post and also procedures, you are from forms background. am also came from ORacle froms 10g background try to understand. and implement it adf.
    back to topic:
    Target Unreachable, identifier 'viewImage' resolved to null Error .i just am giving the steps to igonre your error
    simple go to your taskflow - go to overview section - go to managed beans. configured you which you created bean say as x.java
    if you create following code can be seen in source
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="xx-V-TF">
        <default-activity id="__1">xxV</default-activity>
        <managed-bean id="__2">
          <managed-bean-name id="__4">SUP1040V</managed-bean-name>
          <managed-bean-class id="__5">com.x.x.view.xBeans.xxV</managed-bean-class>
          <managed-bean-scope id="__3">backingBean</managed-bean-scope>
        </managed-bean>
        <view id="xV">
          <page>/ReportsPageFragments/xxV.jsff</page>
        </view>
        <use-page-fragments/>
      </task-flow-definition>
    </adfc-config>

  • How to increase the row and Column length of Bex query in EP Portal 7.3

    Dear All,
    Please let me know the process  to Increase the Rows and Columns  Size of Bex Query in Enterprise Portal  of SAP  7.3 .
    Please  let settings to increase rows up 10000 and column 100 in one page.
    Thanks
    Regards,
    Sai

    Dear All,
    Please find the attached screen shot.
    The report be open with 4 or 5 columns and 5 or 6 rows.
    So, please  let me know how to increase the length of the table.
    Do the needful for me to over come this issue.
    Thanks
    Regards,
    Sai.

  • How to Increase the Rows and Columns Size of Bex Query in Enterprise Portal  of SAP  7.3

    Dear All,
    Please let me know the process how to Increase the Rows and Columns  Size of Bex Query in Enterprise Portal  of SAP  7.3 .
    Currently I am getting Only  4 columns and 10 rows in One Page .And I am getting 1,2 etc tabs for both row and column. So i want to increase the column length more than 100  and row length more than 10000.
    Please suggest me a suitable solution to over come this issue.
    Please find the Below screen shot.
    Thanks
    Regards,
    Sai

    Dear All,
    Please find the attached screen shot.
    The report be open with 4 or 5 columns and 5 or 6 rows.
    So, please  let me know how to increase the length of the table.
    Do the needful for me to over come this issue.
    Thanks
    Regards,
    Sai.

  • How to increase the performance of an insert query?

    Hi,
    I am using oracle database for our application where we executes one insert query and need the performance of 300 insert queries to be executed per second.
    As of now we are getting only 30/sec.We are not knowing how to tune the database for getting this performance.
    we are doing all this though C programming under both linux and solaris environment.
    Can u guide me in this issue.
    Regards,
    vamsi krishna

    Performance tuning issue is not something you can get a straight forward answer for.
    You need to look at various aspects of the system to get close to or increase the performance of your application. Tuning just the database might not give you want you want.
    So, you need to look at the Application codes, Mermory, Disk IO, etc. Have a look at the Performance Tuning Guide from the Oracle Documentation Library for your Oracle Release and Operating System
    http://www.oracle.com/technology/documentation/index.html#previous

  • How to increase the size of sort_area_size

    How to increase the size of sort_area_size and what size should be according to the PROD database
    Thanks

    user10869960 wrote:
    Hi,
    Many Thanks Charles
    Oracle does not recommend using the SORT_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. SORT_AREA_SIZE is retained for backward compatibility."
    --How can i know the instance is configured with the shared server option or not?This might be a tough question to answer. A shared server configuration may be enabled, but the clients may still connect using dedicated sessions, in which case PGA_AGGREGATE_TARGET would still apply.
    From
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm
    V$SESSION includes a column named SERVER which will contain one of the following for each of the sessions: DEDICATED, SHARED, PSEUDO, or NONE. As a quick check, you could query V$SESSION to see if any sessions are connected using a shared server connection.
    From:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/manproc.htm
    There are several parameters which are used to configure shared server support, as well as several views to monitor shared server.
    As Robert mentioned, when the WORKAREA_SIZE_POLICY is set to AUTO, the SORT_AREA_SIZE setting is not used, unless a shared server configuration is in use.
    --What default value is WORKAREA_SIZE_POLICY and SORT_AREA_SIZE ?From:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams157.htm
    "Setting PGA_AGGREGATE_TARGET to a nonzero value has the effect of automatically setting the WORKAREA_SIZE_POLICY parameter to AUTO. This means that SQL working areas used by memory-intensive SQL operators (such as sort, group-by, hash-join, bitmap merge, and bitmap create) will be automatically sized. A nonzero value for this parameter is the default since, unless you specify otherwise, Oracle sets it to 20% of the SGA or 10 MB, whichever is greater."
    Actually I am facing performence issue since long time till now i did not get the solution even i have raised SRs but i could not.When the issue occur system seems hang.what i monitored whenever hdisk0 and hdisk1 use 100% the issue occur.
    Regards,
    SajidWhen you say that you have had a performance issue for a long time, is it a performance problem faced by a single SQL statement, a single user, a single application, or everything on the server? If you are able to identify a single user, or SQL statement that is experiencing poor performance, I suggest starting with a 10046 trace at level 8 (wait events) or level 12 (wait events and bind variables) to determine why the execution appears to be slow. If you have not yet determined a specific user or SQL statement that is experiencing performance problems, you might start with either a Statspack Report or an AWR Report (AWR requires a separate license).
    If you believe that temp tablespace usage may be a contributing factor to the performance problem, you may want to periodically run this query, which will indicate currently in use temp tablespace usage:
    {code}
    SELECT /*+ ORDERED */
    TU.USERNAME,
    S.SID,
    S.SERIAL#,
    S.SQL_ID,
    S.SQL_ADDRESS,
    TU.SEGTYPE,
    TU.EXTENTS,
    TU.BLOCKS,
    SQL.SQL_TEXT
    FROM
    V$TEMPSEG_USAGE TU,
    V$SESSION S,
    V$SQL SQL
    WHERE
    TU.SESSION_ADDR=S.SADDR
    AND TU.SESSION_NUM=S.SERIAL#
    AND S.SQL_ID=SQL.SQL_ID
    AND S.SQL_ADDRESS=SQL.ADDRESS;
    {code}
    The SID and SERIAL# returned by the above could then be used to enable a 10046 trace for a session. The SQL_ID (and CHILD_NUMBER from V$SESSION in recent releases) could be used with DBMS_XPLAN.DISPLAY_CURSOR to return the execution plan for the SQL statement.
    You could also take a look in V$SQL_WORKAREA_ACTIVE to determine which, if any, SQL statement are resulting in single-pass, or multi-pass executions, which both access the temp tablespace.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • How to add customize message on the variable selection screen in the query

    Hi all,
    Can we add an customise message on the variable selection screen in the query? If yes please let me know how it can be achevied?
    Thanks,
    Rani

    Hi Rani,
    I faced a similar issue (for what I understand your request is).
    My requirement for the Variable Screen was to do:
       1) place a link to a ppt file
       2) remove buttons "Save", "Save As...), "Delete"... the standard buttons come when running the Query or WebTempl
    We were using a Web Templ for BI7.0
    I struggled trying to find out how to do it. My conclusions are:
    - WAD, not sure we can accomplish it using a Web Template but i did not "play" a lot with the Web_Template Properties in order to know
    - XHTML, I was told in my post HTML modification was the way, but I have close to nil background in HTML and couold not find the way of accessing the Variable Entry screen
    For instance, I had to remove similar buttons and change some font size from a link on the Web Template (WAD), which was pretty straight forward. In WAD the buttons come with its own icon and to increase the Font size for that link we used XHTML (<font size="2" >). But the heck of the variable screen...well, i just did not get trhough to it to modify it in any way.
    Good luck,
    Definetly in a Query I would say that no.
    alex
    PS: If anyone had a better insight, please feel free to share it.

  • Do Outer Joins as well as Self Joins Affect the Performence of a Query ??

    4 Tables A,B,C,D.
    1 View V Based
    Each of the tables having 1 and only one primary key and a few NOT NULL columns.
    Now my Query selects from A,B,C,D,V with mapping Table A columns with all other Table(B,C,D,V) Primary Key Columns using Left Outer Join.
    Select A.a1,A.a2,A.a3,A.a4,B1.ba,B2.bb,B3.bc,B4.bd,C.c1,D.d1 from (((((((A left outer join B B1 on A.ba=B1.ba) left outer join B B2 on A.bb=B2.bb) left outer join B B3 on A.bc=B3.bc)left outer join B B4 on A.bd=B4.bd)left outer join C on A.c1=C.c1)left outer join D on A.d1=D.d1) left outer join V on A.v1 = V.v1) order by 1;
    In this case will the query design effect the Performence???... As this query is taking a long time. As for as Indexes are there on these tables only default Indexes due to Primary, Unique as well as Foreign key only.... Hence table structure is very simple and straight. I need a suggession in such a manner that without making changes to the Table (I am not even allowed to include a single Index to them) ...can the query be modified to optimise the performence??

    Each change to a query can effect the performance.
    Your query looks straight and simple. Maybe you could increase the performance by simply removeing the order by criteria.
    This requires a sort and a sort can be slow, especially when the resulting dataset is very large.
    If there are indexes on all foreign keys and you join using those FKs then there should be no problem with the index structure.
    I can't say whether it would be better to use an index or not. but you can look at the execution plan and check what the CBO wants to do.
    Make sure that all statistics are up to date. You could consider to run an additional dbms_stats.gather_table_stats with compute in the test environment, just to see if the execution plan changes after this.
    For further ideas search this forum for the thread "When your query takes too long".

  • How to increase the buffer size ?

    Our BI system displays the following message when I execute a query on the web : buffer too small
    How to increase the buffer size ?
    Thanks in advance

    Indeed, we are using  Bex Web 7.0
    The query uses a big structure and when I execute it on the web, it takes a long time (> 5 min) and I receive folowing message on  top of the result page : " could not buffer query structures. Buffer too small "
    When I execute the query in Bex analyzer, it takes a long time too but we dont get the message
    I have checked the cache size:
          -  Local cache : 100 MB
          - Global cache : 200 MB
    Please let me know any solution as there is no BASIS  TEAM. The guy who installed the soft was a consultant and is no more reachable.
    Thanks in adavnce

  • How to Increase the SGA Size.

    Hi Guru's
    I want to Know
    How to Increase the SGA Size in Database 8.1.7.4.1
    My Ram Size is 6 GB
    When I query the Below Script
    select name, value
    from v$parameter
    where name in ('shared_pool_size', 'java_pool_size', 'streams_pool_size',
    'log_buffer', 'db_cache_size', 'db_2k_cache_size', 'db_4k_cache_size',
    'db_8k_cache_size', 'db_16k_cache_size', 'db_32k_cache_size',
    'db_keep_cache_size', 'db_recycle_cache_size', 'large_pool_size');
    Result
    shared_pool_size     300000000
    large_pool_size     0
    java_pool_size     50000000
    log_buffer     10485760
    Please Suggest Me the How Much Value also to increase the SGA
    My RAM SIZE is 6 GB
    Regards
    ***SBJ***

    SGA size on 8i is static , and for increasing the size you have to make the changes in the pfile and bounce the database
    First thumb rule is that your SGA should not exceed more than 40% of your PHYSICAL RAM in oracle <= 8i version. You can go around 80% from oracle 9i onwards
    http://mohamedazar.wordpress.com/2010/08/30/can-i-increase-sga-target-size-greater-than-sga-max-size/
    Edited by: Amigo on Dec 18, 2010 1:31 AM

  • How can I Increase the Thickness of Blinking Cursor in adobe reader?

    I sometimes refer to another part of file of pdf and to get back, blinking cursor is supposed to help me but it is tiny blinking I have hard time to find it back.
    How can I increase the thickiness of blinking cursor in adobe reader?

    Do you mean "Recent Tags" which has an icon a blue-colored folder with a primitive looking magnifying glass over the folder?
    That folder does have a limit of 10 results. If you want to create an "All Tags" item on the Boomarks Menu, you can do that by creating your own "smart folder." The process I use is a little involved, so bear with me (also, see the screen shots).
    The query used by Recent Tags is:
    place:type=6&sort=14'''&maxResults=10'''
    So for All Tags we will drop the maximum results limit:
    place:type=6&sort=14
    ''If you prefer your tags in alphabetical order instead of having the most recently used at the top, use this instead:''
    place:type=6&sort=1
    Go ahead and select the line you want and right-click > copy it.
    Next, click the bookmarks drop-down button, expand the Bookmarks Toolbar, right-click any existing item, and choose New Bookmark.
    In Location, paste the query, and in name, type All Tags (or your preferred description). When you click Add Bookmark, Firefox will add it, but it doesn't show the blue search folder icon. Drag the bookmark to the menu, and it will turn into a functioning search folder.
    Success?

  • How to increase the performance of an Application

    Hi,
    I am using jdeveloper11.1.1.2.0 and weblogic server10.3.2.I have lot of txn in the database.when click the txn menu then page landing is very slow.My Txn data is 24thousands records.
    My RAM is 8GB and 64bit machine .So how to fast my application?Is any idea then Please help me.
    Thanks
    Anup

    Hi Frank,
    I have follow the below link but there is no performance effect of my application.
    http://www.gebs.ro/blog/oracle/adf-view-object-performance-tuning-analysis/
    On VO level ,In Tuning
    I have modified In batch Of 26 ,As needed ,and Query Optimizer hints FIRST_ROWS_26
    AND ON the page level ,Table Column Property,Fetch size i have modified 26 and page definition level ExchangeTradedPlacementHeadVOIterator default range size is 25.
    So i have above change but there is no effect on the performance of my application.
    Please give me the Solution what will i do to increase the performance of an application.
    Thanks
    Anup

  • Increase the size of the Query

    Hi Experts,
                      i need to increase the size of the query in web aswell as Excel. 
    Please tell me how to do that.
    thanks in advance
    Thanks
    Amith

    Hi Amit,
    Your query will bring you all the eligible records from the underlying data target and you cannot increase this number of recirds retreived by the query.
    If you are not getting the required number of records, try to review the definition of your query and avoid using any static filters in ur query definition. Dont restrict any of your characterstics.
    This is my opinion for ur query according to my understanding of ur doubt, if i am worn correct me by clearly defining your problem
    Regrads,
    Rajkandula

Maybe you are looking for

  • HOW THE **** do I get Creative mediasource organizer to work decentl

    Tell me, where is the 'organization' in this program? This is the most unorganized peice of **** I've ever seen! While trying to add a bunch of files, you end up getting them added via song , song 2, etc... so instead of them being in order via album

  • Problem after system update (base installed only) and other concern

    I have had two strange problems upon updating from Arch using pacman. 1) My keyboard is no longer detected 2) The BIOS time seems to be eight hours behind. (Setting the clock to UTC from another distro sets the clock right since my time zone is GMT-8

  • New User Faces Gnarled Contacts

    Service provider downloaded contacts in SIM card from Nokia N-70 to new i-Phone4s. Result is two and mostly incomplete set of numbers that scroll A-to-Z, followed by hash mark and more names and numbers downloaded from new MacBook Air. Is there a met

  • INSERT key does not toggle INSERT/REPLACE mode

    The INSERT key does not toggle between Insert and Replace mode. The enterabled items are always in insert mode. Does anyone know how to fix this? I'm using Forms 6i 6.0.8.17.1, web-deployed on Solaris 2.6 (64 bit).

  • Safari not reading Cyrillic as well as it used to

    Recently, none of the Text Encoding options for Cyrillic have been able to read several websites I've visited. Instead, all I get is a row of squares in place of letters in Russian. Does anyone know why this might be and/or how I can fix it? Thanks i