Index is not using for this query

I have this query and it doesn't use index. Can you put your suggestion please?
SELECT /*+ ORDERED USE_HASH(IC_GSMRELATION) USE_HASH(IC_UTRANCELL) USE_HASH(IC_SECTOR) USE_HASH(bt) */
/* cp */
bt.value value,
bt.tstamp tstamp,
ic_GsmRelation.instance_id instance_id
FROM
xr_scenario_tmp IC_GSMRELATION,
xr_scenario_tmp IC_UTRANCELL,
xr_scenario_tmp IC_SECTOR,
rg_busyhour_tmp bt
WHERE
bt.instance_id != -1
AND (IC_GSMRELATION.entity_id = 133)
AND (IC_GSMRELATION.parentinstance_id = ic_UtranCell.instance_id)
AND (IC_UTRANCELL.entity_id = 254)
AND (IC_UTRANCELL.parentinstance_id = ic_Sector.instance_id)
AND (IC_SECTOR.entity_id = 227)
AND (IC_SECTOR.parentinstance_id = bt.instance_id);
table : xr_scenario_tmp
entity_id          num
instance_id          num
parentinstance_id     num
localkey          varchar
indexes: 1. entity_id+instance_id
     2. entity_id+parentinstance_id
table : rg_busyhour_tmp
instance_id     notnull     num
tstamp          notnull     date
rank          notnumm     num
value               float
index: instance_id+tstamp+rank
thanks

user5797895 wrote:
Thanks for the update
1. I don't understand where to put {}. you meant in the forum page like below
Use the tag. Read the [FAQ|http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ?t=anon] for more information. It's the link on the top right corner.
>
2. AROUND 8000 IN DEV MACHINE. BUT 1.5M IN PRODUCTION
It's a more or less useless exercise if you have that vast difference between the two systems. You need to test this thoroughly using a similar amount of data.
3.
Note: cpu costing is off, PLAN_TABLE' is old version
You need to re-create your PLAN_TABLE. That's the reason why important information is missing from your plans. It's the so called "Predicate Information" section below the execution plan and it requires the correct version of the plan table. Drop your current plan table and re-run in SQL*Plus on the server:
@?/rdbms/admin/utlxplan
to re-create the plan table.
Dynamic sampling doesn't alter the plan in any way no matter what sampling level I choose.
When I added Cardinality it switched from 1 full table scan and 2 index read
Can you post the statements with the hints included resp. just the first line including the hints used for the different attempts?
# WITH dbms_stats.gather_table_stats, without cardinality it uses indexes all the time.
How did you call DBMS_STATS.GATHER_TABLE_STATS, i.e. which parameter values where you using?
# After deleting the table stats performance improved back
All these different attempts are not really helpful if you don't say which of them was more effective than the other ones. That's why I'm asking for the "Predicate Information" section so that this information can be used to determine which of your tables might benefit from an indexed access path and which don't.
As already mentioned several times if you use SQL tracing as described in one of the links provided you could see which operation produces how many rows. This would allow to determine if it is efficient or not.
But given that you're doing all this with your test data it doesn't say much about the performance in your production environment.
4. whether GTT created with "ON COMMIT PRESERVE ROWS"?
YES - BUT DIFFERENT SESSIONS HAS DIFFERENT NUMBER OF ROWS
The question is, whether the number of rows differs significantly, if yes, then you shouldn't use the DBMS_STATS approach
5. neigher (48 sec. / 25 sec. run time) are sufficient, then what is the expected?
ACTUALLY I AM DOING IT IN DEVELOPMENT MACHINVE. IN PRODUCTION THE NUMBER OF ROWS ARE DIFFERENT. LAST TIME WHEN WE RELEASED THE
PATCH WITH THIS CODE, THE PERFORMANCE WAS BAD.
See 2., you need to have a suitable test environment. It's a more or less useless exercise if you only have a fraction of the actual amount of data.
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

  • Why index is not used by this table

    Dear all,
    Currently I'm facing problem with tuning one sql statement.
    It shows that full table scan in ZTLTBC_FILTER cost 15:19.
    But in table ZTLTBC_FILTER, it have index with field
    index 1    MANDT INT_NAME FNAME VALUE
    index 2    MANDT EXEC_ID COUNTER
    index 3    MANDT INT_NAME VALUE
    the last statistic date for these index is three months before
    Could you please help to find out the reason why index is not used?  statistics are old or small distinct value for field INT_NAME?
    How to solve this full table scan problem?
    Thanks & Regards,
    Chris
    sql statement
    SELECT T_00."MANDT",T_00."EXEC_ID",T_00."COUNTER",T_00."FNAME",T_00."INT_NAME",T_00."VALUE"
    FROM "ZTLTBC_FILTER" T_00
    WHERE T_00."MANDT"=:A0 AND T_00."INT_NAME"=:A1 AND EXISTS
    (SELECT T_100."INT_NAME"
    FROM "ZTLTBC_MIRR_BUFF" T_100
    WHERE T_100."MANDT"=:A2 AND T_100."INT_NAME"=:A3 AND T_100."EXEC_ID"=T_00."EXEC_ID" AND
    T_100."COUNTER"=T_00."COUNTER")
    | Id  | Operation            | Name               | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                    |       |       |       |   176K(100)|          |
    |*  1 |  HASH JOIN RIGHT SEMI|                    |  9958K|  1111M|   598M|   176K  (2)| 00:17:53 |
    |*  2 |   INDEX RANGE SCAN   | ZTLTBC_MIRR_BUFF~0 |  9958K|   484M|       |  6265   (1)| 00:00:39 |
    |*  3 |   TABLE ACCESS FULL  | ZTLTBC_FILTER      |    13M|   822M|       |   150K  (2)| 00:15:19 |
       1 - access("T_100"."EXEC_ID"="T_00"."EXEC_ID" AND "T_100"."COUNTER"="T_00"."COUNTER")
       2 - access("T_100"."MANDT"=:A2 AND "T_100"."INT_NAME"=:A3)
       3 - filter(("T_00"."INT_NAME"=:A1 AND "T_00"."MANDT"=:A0))

    Hello Bret,
    I'm using oracle 11.2
    Thanks & Regards,
    Chris

  • Index not using in select query

    Hello All,
    I have table CITY with 2 composite primary key CITYCODE, COUNTRYCODE of course they are NOT NULL.
    i created an index.
    CREATE UNIQUE INDEX CITYKEY ON CITY     (CITYCODE, COUNTRYCODE);
    then i run explain plan as follows
    explain plan for
    select CityCode, CityName, CountryCode, LexiconId, UserId, Status
    from City
    where CountryCode = 'IR';
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 803 | 57013 | 112 (2)| 00:00:02 |
    |* 1 | TABLE ACCESS FULL| CITY | 803 | 57013 | 112 (2)| 00:00:02 |
    later i analyze table rebuild indexes but again explain plan gives me the same result.
    Could any 1 please guide me to solve this issue.
    Thanks
    Edited by: mohsin javed on Feb 17, 2011 10:10 AM

    Hello All,
    Again with one more query which having join:
    table SDNMASTER with sdnid pk and SDNMASTER_PK index on SDNID, table SDNALIAS sdnid pk and SDNALIAS_PK index on SDNID.
    explain plan for
    SELECT a.SourceId,
              a.SourceName,
              b.LastName,
              a.Status
    FROM SdnMaster a,
              SdnAlias b
    WHERE a.SdnId = b.SdnId
    AND a.Status in ('1', '3')
    AND b.LastName is not null
    ORDER BY b.LastName;
    PLAN_TABLE_OUTPUT
    Plan hash value: 1153036645
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 2399 | 64773 | 69 (5)| 00:00:01 |
    | 1 | SORT ORDER BY | | 2399 | 64773 | 69 (5)| 00:00:01 |
    |* 2 | HASH JOIN | | 2399 | 64773 | 68 (3)| 00:00:01 |
    |* 3 | TABLE ACCESS FULL| SDNALIAS | 2399 | 21591 | 11 (0)| 00:00:01 |
    |* 4 | TABLE ACCESS FULL| SDNMASTER | 4562 | 82116 | 56 (2)| 00:00:01 |
    Even after analyzing table and rebuilding index its not using the index..
    Thanks

  • Valid size not available for this creation when using Greeting Card feature

    Using PSE9 with a Mac.  When attempting to create a greeting card, after selecting the photo, the Greeting Card, I receive a pop up error message as follows:
    "Valid Size Not Available For This Creation".  (All other Create functions such as Photo Book, Photo Calendar, and Photo Collage appear to be working).  I have been in contact with Adobe Support and have been instructed to do a number of things from creating a new preferences file to uninstalling and re-installing the PSE software, with no result.  Has anyone else run into this problem, and if so have found a fix?  Thanks.

    I've been tearing my hair out over this one also. I've been on hold for over 10 hrs with Adobe Support waited over almost 2 weeks and still no resolution. I'm trying to create the Save the Date cards for my wedding and I can't wait for Adobe. Removing the preferences file and uninstalling/reinstalling does not fix the problem.
    That said I did figure out a workaround for this. It's easy but it does require Windows. For me this was no big deal as I do own a Windows box.
    Get the free trial version of PE9 for Windows and install it. If you don't have a Windows computer get to a friend that has one
    Upload some of your photos to the PE9 Windows Organizer (it's identical to the mac version)
    Select Create and then Greeting card. Photoshop will launch the guided edit feature for greeting cards.
    Select the Layout feature and once you find out that you like save it as Photoshop project. Repeat this step for as many layouts as necessary.
    Copy your Photoshop project files (and any folders) to your mac.
    Open the project files as you would with any other Photoshop file.
    You can now select the Create feature. You will be able add your pictures and resize them, you will be able to add/remove text, you'll be able to change the backgound/borders, add graphics...pretty much anything...EXCEPT automatically modify the layout. If you click on Layout, PE9 returns nothing. You can however go into full edit mode and if you have decent Photoshop skills you can make any changes to the layout manually.
    If I had to put money on this I'd say that there is a problem with the PE9 Mac installation package. For some reason it is not deploying the layout data/files or it is not putting them in the right place. For this reason the program can't find the layouts when the user selects the greeting card guided edit.
    Good luck.

  • Becouse of expire of credit card I updated billing information by providing data of new credit card but system just says "We're sorry, the billing information on file could not be used for this payment. Please update your information.". What exactly is wr

    Becouse of expire of credit card I updated billing information by providing data of new credit card but system just says "We're sorry, the billing information on file could not be used for this payment. Please update your information.". What exactly is wrong?

    Are you 100% sure that every detail of your information is the same in each place?
    Make sure that EVERY DETAIL is the same in every place you enter your information
    -right down to how you spell and punctuate the parts of your name and address
    Change/Verify Account https://forums.adobe.com/thread/1465499 may help
    -Credit card https://helpx.adobe.com/utilities/credit-card.html

  • Geting this errror, eventhough information is ok: We're sorry, the billing information on file could not be used for this payment. Please update your information.

    Geting this errror, eventhough information is ok: We're sorry, the billing information on file could not be used for this payment. Please update your information.
    And please remove one of my unassigned user.

    Are you 100% sure that every detail of your information is the same in each place?
    Make sure that EVERY DETAIL is the same in every place you enter your information
    -right down to how you spell and punctuate the parts of your name and address
    Change/Verify Account https://forums.adobe.com/thread/1465499 may help
    -Credit card https://helpx.adobe.com/utilities/credit-card.html

  • Autofill in Google Toolbar does not appear to be working with Firefox 4 - Aways saying Autofill not available for this page even on pages I have used it before FF4 upgrade

    Autofill in Google Toolbar does not appear to be working with Firefox 4 - It aways gives the message "Autofill not available for this page". This is happening on pages I have used Autofill on before upgrading to FF4 from Firefox 3.5.x

    i did not see a solution posted - I tired what I read. Going back to an old version may solve the problem but it is a stupid solution so I have yet to do that.
    I am on version 4 and autofil this does not work :
    Popular answer Go to this answer
    Uninstall version 5, then Google "google toolbar version 4", follow the link to FileHippo.com, and download and install the last version 4. When you reinstall it, make sure you turn off the option to perform automatic updates.
    6 of 7 people found this answer helpful. Did you? Sign in to vote. Report abuse

  • F400917: The current configuration is not valid for this feature. This feature cannot be used until you correct the configuration.

    Hello,
    We recently changed to TFS as our bug tracking system and trying to understand how to change the existing states of Bug\Add new states. We installed TFS 2013 Update 4 and followed below process to change state values. For example, I would like to change
    Bug State value of "Done" to "Closed",
    1. witadmin exportwitd /collection:"http://MyServer:8080/tfs/DefaultCollection" /p:MyProject /n:Bug /f:C:\TFS\bug.xml       
    2. Replace all values of "Done" to Closed
    3. witadmin importwitd /collection:"http://MyServer:8080/tfs/DefaultCollection" /p:MyProject /f:C:\TFS\bug.xml
    Then we see below error in Work -> Backlog
    TF400917: The current configuration is not valid for this feature. This feature cannot be used until you correct the configuration.
    Learn about how to correct your configuration            
    Details about the validation error appear below:
    The following element contains an error: RequirementBacklog/States. TF401098: This element defines the states for work items that appear on your backlog. The state configuration is incorrect. Each work item on this backlog must have one state with the type
    'Complete'. The following work item type does not have any state with the type 'Complete': Bug.
    The following element contains an error: BugWorkItems/BugWorkItems. TF400506: This element defines the states for work items that represent Bugs or Defects. Each state must exist in at least one of the work item types that are defined in: BugWorkItems.
    The following states do not exist in any of the work item types: Done.
    Tried export, made changes to ProcessConfig file for Bug states and imported. Still same issue.
    Please suggest on how to proceed with customization of Bug states\values in TFS 2013 Update 4
    Thanks,
    Aswini

    Hi Aswini,  
    Thanks for your reply.
    I tested in on my Scrum 2013.4 team project, and found we need edit two places in processconfiguration.xml file, please try below:
      <BugWorkItems category="Microsoft.BugCategory" pluralName="Bugs" singularName="Bug">
        <States>
          <State type="Proposed" value="New" />
          <State type="Proposed" value="Approved" />
          <State type="InProgress" value="Committed" />
          <State type="Complete" value="Closed" />
        </States>
      </BugWorkItems>
      <RequirementBacklog category="Microsoft.RequirementCategory" parent="Microsoft.FeatureCategory" pluralName="Backlog items" singularName="Backlog item">
        <AddPanel>
          <Fields>
    <Field refname="System.Title" />
          </Fields>
        </AddPanel>
        <Columns>
          <Column width="100" refname="System.WorkItemType" />
          <Column width="400" refname="System.Title" />
          <Column width="100" refname="System.State" />
          <Column width="50" refname="Microsoft.VSTS.Scheduling.Effort" />
          <Column width="200" refname="System.IterationPath" />
          <Column width="200" refname="System.Tags" />
        </Columns>
        <States>
          <State type="Proposed" value="New" />
          <State type="Proposed" value="Approved" />
          <State type="InProgress" value="Committed" />
          <State type="Complete" value="Closed" />
          <State type="Complete" value="Done" />
        </States>
      </RequirementBacklog>
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have an iPod mini that I have not used for mover 3 years.  I am trying to download music and it  is giving me a warning sign.  How can I fix this issue.

    I have an iPod mini that I have not used for more than 3 years.  I am trying to download music and it is giving me a warning sign.  How can I fix this issue?
    patrishafrombrooklyn

    Try:
    http://snapguide.com/guides/calibrate-your-home-button/?utm_expid=69945963-15
    fix for Home button
    iPhone Home Button Not Working or Unresponsive? Try This Fix
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    You can do it an an Apple store by:
    Apple Retail Store - Genius Bar
    or sent it in to Apple. See:
    Apple - Support - iPod - Service FAQ
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • I have an old AOL account not used for years. No I have realized some years ago I have signed in into the apple storewith this email. Now I am not able to change this apple ID. Has s.o. an idea how to work this out?

    I have an old AOL account not used for years. No I have realized some years ago I have signed in into the apple storewith this email. Now I am not able to change this apple ID. Has s.o. an idea how to work this out?

    See this -> http://support.apple.com/kb/TS1299

  • CUCM 9.1 in VirtualBox - The hardware you are using is not supported for this product

    I'm trying to load CUCM licensed through my work onto an oracle VirtualBox running linux redhat, and its unpacking linux fine onto the vbox, and passes the hardware test on boot but when it goes to load I'm getting the error "The hardware you are using is not supported for this product."
    I have dedicated to the VM:
    4GB ram
    4 CPU's (tried 2 and 4)
    80GB Hard Drive
    What in the world could be jamming this up? Anyone else ever run this or know what the deal is?
    Any input is appreciated, thanks!

    We only support ESXi
    Sent from Cisco Technical Support iPad App

  • Query Problem - Exclude operation is not supported for this characteristic

    Hello all
    I have a little issue with a report problem i have been given and wondered if anyone had any knowledge of this.
    We have a report witn two heriarchy variables for profit centre. One is a authorisation variable and the other a custmer exit.
    When we are in the report and try and drag out some profit centres or exclude some)  it will not allow it and we get the following message: -
    'Exclude operation is not supported for this characteristic'
    Does anyone know why this is happening. I
    Any ideas?

    Hi Andrew,
    if you have a chance confirm this with SAP Support, but I think excluding hierarchy nodes is not supported. The reason for this is the fact that it is not quite clear what should happen to the hierarchy structure when nodes are excluded. For example, what should happen to the value of the parent? Should it still contain the value of the excluded node under it?! or not?! One might want it one way, others might find the other more convenient.
    Hope this helps.
    Regards,
    Maxim

  • ArrayBindSize-implicit (-1) length not valid for this bind or define dataty

    Hello all,
    This has been troubling me for a couple of days.
    I am retriving an oracle type of varchar2 table:
    TYPE VARCHAR2_TABLE IS TABLE OF VARCHAR2(4000) INDEX BY BINARY_INTEGER;
    I create the following array:
    'size of the array
    Dim intValue(4000) As Integer
    Dim idx As Integer = 0
    While idx < intValue.Length
    'assingning 4000 tells that each row size
    'will be of 4000 characters
    intValue(idx) = 4000
    idx = idx + 1
    End While
    Then I assign it to the parameter:
    Dim param As OracleParameter = cmd.Parameters.Add("sBuffer", OracleDbType.Varchar2)
    param.Direction = ParameterDirection.Output
    param.Size = intValue.Length
    param.CollectionType = OracleCollectionType.PLSQLAssociativeArray
    param.ArrayBindSize = intValue
    when I execute the query I get the error:
    implicit (-1) length not valid for this bind or define datatype
    However, if i assign each row the size of 2000 or less it returns fine. But this limits me to getting only 2000 characters. And our current system returns 4000 characters.
    If any one has a solution, please post it.
    thanks,
    Dhaval

    Ok I've now found the patchsets and have ODP.NET 9.2.0.420 up and running - which is a start!
    The 2000 character limit as discussed above does indeed seem to have gone - great! BUT: I'm now running into another limit:
    It seems as though ODP.NEt and/or the layers below reserve 3 bytes of memory for every character when binding a PLSQLAssociativeArray OUTPUT parameter. Due to what looks like the old 16Mb-per-array limit I used to encounter when using Microsoft OLEDB Provider for Oracle, this means that, for an array of VARCHAR2(4000), the maximum number of rows (array elements) I can get back is 1398, before I get an exception with the message:
    "ORA-01044: size 16788000 of buffer bound to variable exceeds maximum 16777216 occured"
    When using the Microsoft OLEDB Provider there seems to be a 1-byte-per-character sizing going on, since I can get up to 4194 rows (array elements) back from the same stored procedure.
    Any reasoning behind the 3-bytes per character with ODP.NET?

  • Any room for improvement for this query? Explain Plan attached.

    Is there any room for improvement for this query? Table stats are up-to-date. Any suggestions Query rewrite, addition of indexes,...etc ??
    select sum(CONF
                 when (cd.actl_qty - cd.total_alloc_qty - lsd.Q < 0) then
                  0
                 else
                  cd.actl_qty - cd.total_alloc_qty - lsd.Q
               end)
      from (select sum(reqd_qty) as Q, ITEM_ID as ITEM
              from SHIP_DTL SD
             where exists (select 1
                      from CONF_dtl
                     where CONF_nbr = '1'
                       and ITEM_id = SD.ITEM_id)
             group by ITEM_id) lsd,
           CONF_dtl cd
    where lsd.ITEM = cd.ITEM_id
       and cd.CONF_nbr = '1'Total number of rows in the tables involved
    select count(*) from CONF_DTL;
      COUNT(*)
       1785889
    select count(*) from shp_dtl;
      COUNT(*)
        286675
      Explain Plan
    PLAN_TABLE_OUTPUT
    Plan hash value: 2325658044
    | Id  | Operation                           | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                    |                    |     1 |    39 |     4  (25)| 00:00:01 |
    |   1 |  SORT AGGREGATE                     |                    |     1 |    39 |            |          |
    |   2 |   VIEW                              |                    |     1 |    39 |     4  (25)| 00:00:01 |
    |   3 |    HASH GROUP BY                    |                    |     1 |   117 |     4  (25)| 00:00:01 |
    |   4 |     TABLE ACCESS BY INDEX ROWID     | SHIP_DTL           |     1 |    15 |     1   (0)| 00:00:01
    |   5 |      NESTED LOOPS                   |                    |     1 |   117 |     3   (0)| 00:00:01 |
    |   6 |       MERGE JOIN CARTESIAN          |                    |     1 |   102 |     2   (0)| 00:00:01 |
    |   7 |        TABLE ACCESS BY INDEX ROWID  | CONF_DTL           |     1 |    70 |     1   (0)| 00:00:01 |
    |*  8 |         INDEX RANGE SCAN            | PK_CONF_DTL        |     1 |       |     1   (0)| 00:00:01 |
    |   9 |        BUFFER SORT                  |                    |     1 |    32 |     1   (0)| 00:00:01 |
    |  10 |         SORT UNIQUE                 |                    |     1 |    32 |     1   (0)| 00:00:01 |
    |  11 |          TABLE ACCESS BY INDEX ROWID| CONF_DTL           |     1 |    32 |     1   (0)| 00:00:01 |
    |* 12 |           INDEX RANGE SCAN          | PK_CONF_DTL        |     1 |       |     1   (0)| 00:00:01 |
    |* 13 |       INDEX RANGE SCAN              | SHIP_DTL_IND_6 |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       8 - access("CD"."CONF_NBR"='1')
      12 - access("CONF_NBR"='1')
      13 - access("ITEM_ID"="SD"."ITEM_ID")
           filter("ITEM_ID"="CD"."ITEM_ID")

    Citizen_2 wrote:
    Is there any room for improvement for this query? Table stats are up-to-date. Any suggestions Query rewrite, addition of indexes,...etc ??You say that the table stats are up-to-date, but is the following assumption of the optimizer correct:
    select count(*)
    from CONF_dtl
    where CONF_nbr = '1';Does this query return a count of 1? I doubt that, but that's what Oracle estimates in the EXPLAIN PLAN output. Based on that assumption you get a cartesian join between the two CONF_DTL table instances, and the result - which is still expected to be one row at most - is then joined to the SHIP_DTL table using a NESTED LOOP.
    If above assumption is incorrect, the number of rows generated by the cartesian join can be tremendous rendering the NESTED LOOP operation quite inefficient.
    You can verify this by using the DBMS_XPLAN.DISPLAY_CURSOR function together with the GATHER_PLAN_STATISTICS hint, if you're already on 10g or later.
    For more information regarding the DISPLAY_CURSOR function, see e.g. here: http://jonathanlewis.wordpress.com/2006/11/09/dbms_xplan-in-10g/
    It will show you the actual cardinalities compared to the estimated cardinalities.
    If the estimate of the optimizer is incorrect, you should find out why. There still might be some issues with the statistics, since this is most obvious reason for incorrect estimates.
    Are your index statistics up-to-date?
    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/

  • Why Inner join or Outer join is not used for Pool or Cluster tables  ?

    Hi SAP-ABAP Experts .
    With Due Regards .
    May u explain me why Inner join or Outer join is not useful for Pool or Cluster tables  ?
    because peoples advised not use Joins for Pool and Cluster tables , What harm will take place , If we do this ?
    Best Regards to all : Rajneesh

    Both Pooled and Cluster Tables are stored as tables within the database. Only the structures of the two table types which represent a single logical view of the data are defined within the ABAP/4 Data Dictionary. The data is actually stored in bulk storage in a different structure. These tables are commonly loaded into memory (i.e., 'buffered') due to the fact they are typically used for storing internal control information and other types of data with little or no external (business) relevance.
    Pooled and cluster tables are usually used only by SAP and not used by customers, probably because of the proprietary format of these tables within the database and because of technical restrictions placed upon their use within ABAP/4 programs. On a pooled or cluster table:
    Secondary indexes cannot be created.
    You cannot use the ABAP/4 constructs select distinct or group by.
    You cannot use native SQL.
    You cannot specify field names after the order by clause. order by primary key is the only permitted variation.
    I hope it helps.
    Best Regards,
    Vibha
    Please mark all the helpful answers

Maybe you are looking for

  • Mini displayport question?

    I have a mac book pro 13" 2009. I want to hook it up to a television that uses RCA composite plugs (might be able to go the s video route as well). On my G4, I was able to do this without any problem. Now, I see that apple only sells mini display por

  • Monitor settings problem

    Hi there! I've experienced a strange problem related to my LG monitor/Mac Mini. Occasionally the monitor becomes "jumpy", the horizontal lines are visible when I scroll over my dock and also on some animated websites. However, if I go to the display

  • Unable to restore Shuffle solution

    Just recently I had a very aggravating experience with my first generation Shuffle that I was able to resolve. I post this in the hopes that it may also work for others experiencing my problem. I "Surprised Removed" my Shuffle from the USB port when

  • Java applet runs w Firefox.. hangs w Internet Explorer

    I know I caused the problem, but have been unable to resolve the issue. Attempting to install Java JRE beta (L), the app would not load because (K) could not be found (as a networked install) and removed. Therefore I removed all references to Java in

  • How to I add an account manually?

    I would like to add an email account manually but I don't seem to be given the choice to do that. I would like to configure my exchange account as an IMAP account but if I let Apple Mail do it for me it will automatically set it up an an Exchange acc