Performance issue, same range scan different execution times

Oracle 11gR1, queries run within seconds of each other.
I have 2 queries that are logically the same. Even the explain plans are very similar, except the second one reports an index range scan doing much more work than the first. The table is an IOT with deal_bucket_id and datetime as PK (in that order).
TKPROF output below:
select count(*) from deal_bucket_detail where deal_bucket_id
in
(815
,     816
,     817
,     818
,     997)
and datetime between to_date('01-JUL-08','dd-MON-rr') and to_date('01-JAN-09','dd-MON-rr')
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        2      0.79       2.24       2936       3551          0           1
total        4      0.79       2.24       2936       3551          0           1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 43 
Rows     Row Source Operation
      1  SORT AGGREGATE (cr=3551 pr=2936 pw=2936 time=0 us)
1430928   FILTER  (cr=3551 pr=2936 pw=2936 time=380920 us)
1430928    INLIST ITERATOR  (cr=3551 pr=2936 pw=2936 time=372057 us)
1430928     INDEX RANGE SCAN PK_DEAL_BUCKET_DETAIL (cr=3551 pr=2936 pw=2936 time=8782 us cost=1203 size=4069596 card=339133)(object id 14199)
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                       2        0.00          0.00
  db file sequential read                      2936        0.02          1.49
  SQL*Net message from client                     2        0.00          0.00
select count(*) from deal_bucket_detail where deal_bucket_id
between 815 and 997
and datetime between to_date('01-JUL-08','dd-MON-rr') and to_date('01-JAN-09','dd-MON-rr')
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        2      3.70       8.86      29199      26986          0           1
total        4      3.70       8.86      29199      26986          0           1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 43 
Rows     Row Source Operation
      1  SORT AGGREGATE (cr=26986 pr=29199 pw=29199 time=0 us)
1430928   FILTER  (cr=26986 pr=29199 pw=29199 time=6986078 us)
1430928    INDEX RANGE SCAN PK_DEAL_BUCKET_DETAIL (cr=26986 pr=29199 pw=29199 time=6977063 us cost=45208 size=5195748 card=432979)(object id 14199)
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                       2        0.00          0.00
  db file sequential read                       219        0.04          0.08
  db file parallel read                          35        0.04          0.32
  db file scattered read                        211        0.10          5.02
  SQL*Net message from client                     2        0.00          0.00
********************************************************************************How can I work out why the second query is doing much more work than the first?
Edited by: SamB on Aug 5, 2009 6:09 PM

Both are doing an index range scan, however a different index range scan.
query 1: inlist iterator with <n> index range scan for 1 value, due to hard-coded values.
query 2: index range scan for all values, starting at the lowest, due to between.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Why same query takes different execution time in sql 2008

    Hi!
    With below query in SQL Server 2008 R2 when I change Book_ID  to another value like '99000349'  it takes very long time to execute while both result sets have same number of records!?
    select Card_Serial,Asset_ID, Field_Name,Field_Value,Asset_Number,Field_ID,Book_ID from dbo.vw_InspectionReport where Book_ID='99000347'
    I've test it more and more,A time I ran quickest one, or longest one first, restart Windows, but for some specific Book_ID values (although with same number of result set rows) it take multiple time slower than rest of Book_IDs.
    Also showing state of the result set is different for these diffrent Book_IDs:
    for fast ones it looks like below picture:
    for slow ones it looks like below picture:
    if you note, order of returned records are different!?
    I'm waiting for your kindly reply!...

    Do you see any changes if you add a hint to the query?
    select Card_Serial,Asset_ID, Field_Name,Field_Value,Asset_Number,Field_ID,Book_ID from dbo.vw_InspectionReport where Book_ID='99000347OPTION(RECOMPILE)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Same sqlID with different  execution plan  and  Elapsed Time (s), Executions time

    Hello All,
    The AWR reports for two days  with same sqlID with different  execution plan  and  Elapsed Time (s), Executions time please help me to find out what is  reason for this change.
    Please find the below detail 17th  day my process are very slow as compare to 18th
    17th Oct                                                                                                          18th Oct
    221,808,602
    21
    2tc2d3u52rppt
    213,170,100
    72,495,618
    9c8wqzz7kyf37
    209,239,059
    71,477,888
    9c8wqzz7kyf37
    139,331,777
    1
    7b0kzmf0pfpzn
    144,813,295
    1
    0cqc3bxxd1yqy
    102,045,818
    1
    8vp1ap3af0ma5
    128,892,787
    16,673,829
    84cqfur5na6fg
    89,485,065
    1
    5kk8nd3uzkw13
    127,467,250
    16,642,939
    1uz87xssm312g
    67,520,695
    8,058,820
    a9n705a9gfb71
    104,490,582
    12,443,376
    a9n705a9gfb71
    62,627,205
    1
    ctwjy8cs6vng2
    101,677,382
    15,147,771
    3p8q3q0scmr2k
    57,965,892
    268,353
    akp7vwtyfmuas
    98,000,414
    1
    0ybdwg85v9v6m
    57,519,802
    53
    1kn9bv63xvjtc
    87,293,909
    1
    5kk8nd3uzkw13
    52,690,398
    0
    9btkg0axsk114
    77,786,274
    74
    1kn9bv63xvjtc
    34,767,882
    1,003
    bdgma0tn8ajz9
    Not only queries are different but also the number of blocks read by top 10 queries are much higher on 17th than 18th.
    The other big difference is the average read time on two days
    Tablespace IO Stats
    17th Oct
    Tablespace
    Reads
    Av Reads/s
    Av Rd(ms)
    Av Blks/Rd
    Writes
    Av Writes/s
    Buffer Waits
    Av Buf Wt(ms)
    INDUS_TRN_DATA01
    947,766
    59
    4.24
    4.86
    185,084
    11
    2,887
    6.42
    UNDOTBS2
    517,609
    32
    4.27
    1.00
    112,070
    7
    108
    11.85
    INDUS_MST_DATA01
    288,994
    18
    8.63
    8.38
    52,541
    3
    23,490
    7.45
    INDUS_TRN_INDX01
    223,581
    14
    11.50
    2.03
    59,882
    4
    533
    4.26
    TEMP
    198,936
    12
    2.77
    17.88
    11,179
    1
    732
    2.13
    INDUS_LOG_DATA01
    45,838
    3
    4.81
    14.36
    348
    0
    1
    0.00
    INDUS_TMP_DATA01
    44,020
    3
    4.41
    16.55
    244
    0
    1,587
    4.79
    SYSAUX
    19,373
    1
    19.81
    1.05
    14,489
    1
    0
    0.00
    INDUS_LOG_INDX01
    17,559
    1
    4.75
    1.96
    2,837
    0
    2
    0.00
    SYSTEM
    7,881
    0
    12.15
    1.04
    1,361
    0
    109
    7.71
    INDUS_TMP_INDX01
    1,873
    0
    11.48
    13.62
    231
    0
    0
    0.00
    INDUS_MST_INDX01
    256
    0
    13.09
    1.04
    194
    0
    2
    10.00
    UNDOTBS1
    70
    0
    1.86
    1.00
    60
    0
    0
    0.00
    STG_DATA01
    63
    0
    1.27
    1.00
    60
    0
    0
    0.00
    USERS
    63
    0
    0.32
    1.00
    60
    0
    0
    0.00
    INDUS_LOB_DATA01
    62
    0
    0.32
    1.00
    60
    0
    0
    0.00
    TS_AUDIT
    62
    0
    0.48
    1.00
    60
    0
    0
    0.00
    18th Oct
    Tablespace
    Reads
    Av Reads/s
    Av Rd(ms)
    Av Blks/Rd
    Writes
    Av Writes/s
    Buffer Waits
    Av Buf Wt(ms)
    INDUS_TRN_DATA01
    980,283
    91
    1.40
    4.74

    The AWR reports for two days  with same sqlID with different  execution plan  and  Elapsed Time (s), Executions time please help me to find out what is  reason for this change.
    Please find the below detail 17th  day my process are very slow as compare to 18th
    You wrote with different  execution plan, I  think, you saw plans. It is very difficult, you get old plan.
    I think Execution plans is not changed in  different days, if you not added index  or ...
    What say ADDM report about this script?
    As you know, It is normally, different Elapsed Time for same statement in different  day.
    It is depend your database workload.
    It think you must use SQL Access and SQl Tuning advisor for this script.
    You can get solution for slow running problem.
    Regards
    Mahir M. Quluzade

  • Different execution times for back ground jobs - why?

    We have few jobs scheduled and each time they run, we see a different execution times. Some times, it increases and some times it decreases steeply . What could be the reasons?
    Note:
    1. We have the same load of jobs on the system in all the cases.
    2. We haven't changed any settings at system level.
    3. Data is more or less at the same range in all the executions.
    4. We mainly run these jobs
    Thanks,
    Kiran
    Edited by: kiran dasari on Mar 29, 2010 7:12 PM

    Thank you Sandra.
    We have no RFC calls or other instances. Ours is a very simple system. We have two monster jobs, the first one for HR dataand second an extract program to update a Z table for BW loads.
    Our basis and admin confirmed that there are no network issues
    Note: We are executing these jobs over the weekend nights.
    Thanks,
    Kiran

  • Different execution time

    Hello, when i run the bellow code more than one time i am getting different execution time("Total time taken"),
    Ex. when i run first time it prints Total time taken 47
    second time it prints Total time taken 16
    thrid time Total time taken 78 ,why its vary,
    Please solve my question
    long l = System.currentTimeMillis();
    System.out.println(l);
         for(int i=0; i <88; i++){
              System.out.print("Hello ");
         System.out.println("\n"+" Total time taken "+(System.currentTimeMillis() - l));

    Its worth noting that the application is IO bound (due to printing to a device/console)
    So you are really testing the performance of your IDE/console.
    public static void main(String... args) throws IOException {
        int count = 100 * 1000;
        long start = 0;
        for (int i = -count / 10; i < count; i++) {
            if (i == 0)
                start = System.nanoTime();
            System.out.print("Hello ");
        long time = System.nanoTime() - start;
        System.out.printf("%nTotal time taken %,5d micro-seconds per call%n", time / count);
    }

  • Performance issue with SQL with different input data

    Hi Experts,
    I have an SQL query that uses three tables imtermination, imconnection, imconnectiondesign. Each of these tables have around 23Lakh, 11Lakh, 11Lakh rows respectively. There are appropriate indexes on these tables.
    Now there is a query:
    SELECT
    /*+ NO_MERGE(a) ORDERED USE_NL(c) */ c.objectid,
    c.typeid,
    c.transactionstatus,
    c.usersessionid,
    cd.objectid designid,
    c.reservationid,
    c.networkid,
    c.networktype,
    cd.inprojectid,
    cd.inprojecttype,
    cd.outprojectid,
    cd.outprojecttype,
    cd.asiteid,
    cd.asitetype,
    cd.anetworkelementid,
    cd.anetworkelementtype,
    cd.aportid,
    cd.aporttype,
    cd.achannelpath,
    c.asignaltype,
    cd.zsiteid,
    cd.zsitetype,
    cd.znetworkelementid,
    cd.znetworkelementtype,
    cd.zportid,
    cd.zporttype,
    cd.zchannelpath,
    c.zsignaltype,
    c.signaltype,
    c.visualkey,
    c.resourcestate,
    cd.assignmentstate,
    c.effectivefrom,
    cd.effectiveto,
    c.channelized,
    c.circuitusage,
    c.hardwired,
    c.consumedsignaltype,
    c.flowqualitycode,
    c.capacityused,
    c.percentused,
    c.maxcapacity,
    c.warningthreshold,
    c.typecode,
    cd.lastupdateddate,
    c.lastreconcileddate,
    c.bandwidth,
    c.unit
    FROM
    (SELECT terminatedid
    FROM imtermination t1
    WHERE t1.networkelementid = 9200150)
    a,
    imconnectiondesign cd,
    imconnection c
    WHERE cd.objectid = a.terminatedid
    AND c.objectid = cd.connectionid
    AND(SUBSTR('10000000000000000000011111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', c.consumedsignaltype + 1, 1) = '1' OR SUBSTR('10000000000000000000011111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', c.signaltype + 1, 1) = '1')
    AND c.typeid = '$131'
    AND cd.assignmentstate IN(2, 3)
    The above query takes around 70 secs to execute when input t1.networkelementid = 9200150. Moreover i have observed in the enterprise manager that this has very high i/o wait time.
    Now the same query takes around 5 secs to execute when the input t1.networkelementid = 42407448. Both these obejcts with id 9200150 and 42407448 have almost same number of rows and output and without any condition each have 6500 rows in all the three tables.
    The execution plan for both these queries with t1.networkelementid = 9200150 and t1.networkelementid = 42407448 is also coming same.
    The rows that are corresponding to t1.networkelementid = 9200150 in these three tables are the result of the data created through the application over a period of time. While in case of rows corresponding to t1.networkelementid = 42407448 i have created manually and are contiguous in the three tables.
    Does the above behavior is because in case of t1.networkelementid = 42407448 the rows that corresponds to it are not contiguous as they are created over a period of time ?
    Execution Statistics
    Total     Per Execution     Per Row
    Executions     1     1     0.02
    CPU Time (sec)     0.91     0.91     0.02
    Buffer Gets     11943     11943.00     238.86
    Disk Reads     4804     4804.00     96.08
    Direct Writes     0     0.00     0.00
    Rows     50     50.00     1
    Fetches     5     5.00     0.10
              User I/O Waits(98.7%)          
                   CPU(1.3%)
    Enterprise manager shows high db file scattered read in case of t1.networkelementid = 9200150, the input for which it is taking 70 secs.
    Request experts to provide some pointers to fix this issue as i am not an expert in db tuning.
    Thanks in advance for your help.
    Regards

    Hi David,
    Please find below the output:
    SQL> SELECT table_name, num_rows, last_analyzed
      2    FROM all_tables
      3   WHERE table_name IN ('IMTERMINATION', 'IMCONNECTIONDESIGN', 'IMCONNECTION')
      4  /
    TABLE_NAME                       NUM_ROWS LAST_ANAL
    IMTERMINATION                     2338746 19-SEP-11
    IMCONNECTIONDESIGN                1129298 19-SEP-11
    IMCONNECTION                      1169373 19-SEP-11
    IMTERMINATION                       19852 13-SEP-11
    IMCONNECTIONDESIGN                   6820 13-SEP-11
    IMCONNECTION                         9926 13-SEP-11
    6 rows selected.
    SQL> SELECT table_name, index_name,num_rows, last_analyzed
      2    FROM all_indexes
      3   WHERE table_name IN ('IMTERMINATION', 'IMCONNECTIONDESIGN', 'IMCONNECTION')
      4  order by table_name,index_name
      5  /
    TABLE_NAME                     INDEX_NAME                       NUM_ROWS LAST_ANAL
    IMCONNECTION                   IMCONNECTION_A_NE                    9925 13-SEP-11
    IMCONNECTION                   IMCONNECTION_A_NE                 1169154 19-SEP-11
    IMCONNECTION                   IMCONNECTION_A_PORT                 84743 19-SEP-11
    IMCONNECTION                   IMCONNECTION_A_PORT                  3371 13-SEP-11
    IMCONNECTION                   IMCONNECTION_A_SITE               1169373 19-SEP-11
    IMCONNECTION                   IMCONNECTION_A_SITE                  9926 13-SEP-11
    IMCONNECTION                   IMCONNECTION_NET                        0 19-SEP-11
    IMCONNECTION                   IMCONNECTION_NET                       12 13-SEP-11
    IMCONNECTION                   IMCONNECTION_PK                      9926 13-SEP-11
    IMCONNECTION                   IMCONNECTION_PK                   1169373 19-SEP-11
    IMCONNECTION                   IMCONNECTION_RES                        0 13-SEP-11
    IMCONNECTION                   IMCONNECTION_RES                        0 19-SEP-11
    IMCONNECTION                   IMCONNECTION_ST                         2 13-SEP-11
    IMCONNECTION                   IMCONNECTION_ST                        60 19-SEP-11
    IMCONNECTION                   IMCONNECTION_TYPEID                     4 13-SEP-11
    IMCONNECTION                   IMCONNECTION_TYPEID                    64 19-SEP-11
    IMCONNECTION                   IMCONNECTION_UR                     26880 19-SEP-11
    IMCONNECTION                   IMCONNECTION_UR                         3 13-SEP-11
    IMCONNECTION                   IMCONNECTION_VK                      9810 13-SEP-11
    IMCONNECTION                   IMCONNECTION_VK                   1191866 19-SEP-11
    IMCONNECTION                   IMCONNECTION_Z_NE                 1169173 19-SEP-11
    IMCONNECTION                   IMCONNECTION_Z_NE                    9925 13-SEP-11
    IMCONNECTION                   IMCONNECTION_Z_PORT                 84092 19-SEP-11
    IMCONNECTION                   IMCONNECTION_Z_PORT                  3370 13-SEP-11
    IMCONNECTION                   IMCONNECTION_Z_SITE                  9926 13-SEP-11
    IMCONNECTION                   IMCONNECTION_Z_SITE               1169373 19-SEP-11
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_CON            1129298 19-SEP-11
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_CON               6820 13-SEP-11
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_PK             1129298 19-SEP-11
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_PK                6820 13-SEP-11
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_ST                6820 13-SEP-11
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_ST             1129298 19-SEP-11
    IMTERMINATION                  IMTERMINATION_ID                    19852 13-SEP-11
    IMTERMINATION                  IMTERMINATION_ID                  2279477 19-SEP-11
    IMTERMINATION                  IMTERMINATION_NE                    19850 13-SEP-11
    IMTERMINATION                  IMTERMINATION_NE                  2327175 19-SEP-11
    IMTERMINATION                  IMTERMINATION_PORT                 168835 19-SEP-11
    IMTERMINATION                  IMTERMINATION_PORT                   6741 13-SEP-11
    IMTERMINATION                  IMTERMINATION_SITE                  19852 13-SEP-11
    IMTERMINATION                  IMTERMINATION_SITE                2391415 19-SEP-11
    40 rows selected.
    SQL> select table_name,index_name,column_name,column_position
      2    FROM all_ind_columns
      3   WHERE table_name IN ('IMTERMINATION', 'IMCONNECTIONDESIGN', 'IMCONNECTION')
      4  order by table_name,index_name, column_position
      5  /
    TABLE_NAME                     INDEX_NAME
    COLUMN_NAME
    COLUMN_POSITION
    IMCONNECTION                   IMCONNECTION_A_NE
    ANETWORKELEMENTID
                  1
    IMCONNECTION                   IMCONNECTION_A_NE
    ANETWORKELEMENTID
                  1
    IMCONNECTION                   IMCONNECTION_A_PORT
    APORTID
                  1
    IMCONNECTION                   IMCONNECTION_A_PORT
    APORTID
                  1
    IMCONNECTION                   IMCONNECTION_A_SITE
    ASITEID
                  1
    IMCONNECTION                   IMCONNECTION_A_SITE
    ASITEID
                  1
    IMCONNECTION                   IMCONNECTION_NET
    NETWORKID
                  1
    IMCONNECTION                   IMCONNECTION_NET
    NETWORKID
                  1
    IMCONNECTION                   IMCONNECTION_PK
    OBJECTID
                  1
    IMCONNECTION                   IMCONNECTION_PK
    OBJECTID
                  1
    IMCONNECTION                   IMCONNECTION_RES
    RESERVATIONID
                  1
    IMCONNECTION                   IMCONNECTION_RES
    RESERVATIONID
                  1
    IMCONNECTION                   IMCONNECTION_ST
    RESOURCESTATE
                  1
    IMCONNECTION                   IMCONNECTION_ST
    RESOURCESTATE
                  1
    IMCONNECTION                   IMCONNECTION_TYPEID
    TYPEID
                  1
    IMCONNECTION                   IMCONNECTION_TYPEID
    TYPEID
                  1
    IMCONNECTION                   IMCONNECTION_UR
    USERSESSIONID
                  1
    IMCONNECTION                   IMCONNECTION_UR
    USERSESSIONID
                  1
    IMCONNECTION                   IMCONNECTION_VK
    VISUALKEY
                  1
    IMCONNECTION                   IMCONNECTION_VK
    VISUALKEY
                  1
    IMCONNECTION                   IMCONNECTION_Z_NE
    ZNETWORKELEMENTID
                  1
    IMCONNECTION                   IMCONNECTION_Z_NE
    ZNETWORKELEMENTID
                  1
    IMCONNECTION                   IMCONNECTION_Z_PORT
    ZPORTID
                  1
    IMCONNECTION                   IMCONNECTION_Z_PORT
    ZPORTID
                  1
    IMCONNECTION                   IMCONNECTION_Z_SITE
    ZSITEID
                  1
    IMCONNECTION                   IMCONNECTION_Z_SITE
    ZSITEID
                  1
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_CON
    CONNECTIONID
                  1
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_CON
    CONNECTIONID
                  1
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_PK
    OBJECTID
                  1
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_PK
    OBJECTID
                  1
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_ST
    ASSIGNMENTSTATE
                  1
    IMCONNECTIONDESIGN             IMCONNECTIONDESIGN_ST
    ASSIGNMENTSTATE
                  1
    IMTERMINATION                  IMTERMINATION_ID
    TERMINATEDID
                  1
    IMTERMINATION                  IMTERMINATION_ID
    TERMINATEDID
                  1
    IMTERMINATION                  IMTERMINATION_NE
    NETWORKELEMENTID
                  1
    IMTERMINATION                  IMTERMINATION_NE
    NETWORKELEMENTID
                  1
    IMTERMINATION                  IMTERMINATION_PORT
    PORTID
                  1
    IMTERMINATION                  IMTERMINATION_PORT
    PORTID
                  1
    IMTERMINATION                  IMTERMINATION_SITE
    SITEID
                  1
    IMTERMINATION                  IMTERMINATION_SITE
    SITEID
                  1
    40 rows selected.
    Plan without sql hints:
    SQL> select * from table(dbms_xplan.display)
      2  /
    PLAN_TABLE_OUTPUT
    Plan hash value: 2493901029
    | Id  | Operation                     | Name                  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT              |                       |    40 |  9960 |  6316   (1)| 00:01:16 |
    |   1 |  NESTED LOOPS                 |                       |    40 |  9960 |  6316   (1)| 00:01:16 |
    |   2 |   NESTED LOOPS                |                       |  1359 |   160K|  3592   (1)| 00:00:44 |
    |   3 |    TABLE ACCESS BY INDEX ROWID| IMTERMINATION         |  1359 | 16308 |   915   (1)| 00:00:11 |
    |*  4 |     INDEX RANGE SCAN          | IMTERMINATION_NE      |  1359 |       |     6   (0)| 00:00:01 |
    |*  5 |    TABLE ACCESS BY INDEX ROWID| IMCONNECTIONDESIGN    |     1 |   109 |     2   (0)| 00:00:01 |
    |*  6 |     INDEX UNIQUE SCAN         | IMCONNECTIONDESIGN_PK |     1 |       |     1   (0)| 00:00:01 |
    |*  7 |   TABLE ACCESS BY INDEX ROWID | IMCONNECTION          |     1 |   128 |     2   (0)| 00:00:01 |
    |*  8 |    INDEX UNIQUE SCAN          | IMCONNECTION_PK       |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("T1"."NETWORKELEMENTID"=9200150)
       5 - filter("CD"."ASSIGNMENTSTATE"=2 OR "CD"."ASSIGNMENTSTATE"=3)
       6 - access("CD"."OBJECTID"="TERMINATEDID")
       7 - filter((("C"."CONSUMEDSIGNALTYPE"=21 OR "C"."CONSUMEDSIGNALTYPE"=22 OR
                  "C"."CONSUMEDSIGNALTYPE"=23 OR "C"."CONSUMEDSIGNALTYPE"=24 OR "C"."CONSUMEDSIGNALTYPE"=25 OR
                  "C"."CONSUMEDSIGNALTYPE"=26 OR "C"."CONSUMEDSIGNALTYPE"=27 OR "C"."CONSUMEDSIGNALTYPE"=28 OR
                  "C"."CONSUMEDSIGNALTYPE"=29 OR "C"."CONSUMEDSIGNALTYPE"=30 OR "C"."CONSUMEDSIGNALTYPE"=31 OR
                  "C"."CONSUMEDSIGNALTYPE"=32 OR "C"."CONSUMEDSIGNALTYPE"=33) OR ("C"."SIGNALTYPE"=21 OR
                  "C"."SIGNALTYPE"=22 OR "C"."SIGNALTYPE"=23 OR "C"."SIGNALTYPE"=24 OR "C"."SIGNALTYPE"=25 OR
                  "C"."SIGNALTYPE"=26 OR "C"."SIGNALTYPE"=27 OR "C"."SIGNALTYPE"=28 OR "C"."SIGNALTYPE"=29 OR
                  "C"."SIGNALTYPE"=30 OR "C"."SIGNALTYPE"=31 OR "C"."SIGNALTYPE"=32 OR "C"."SIGNALTYPE"=33)) AND
                  "C"."TYPEID"='$131')
       8 - access("C"."OBJECTID"="CD"."CONNECTIONID")
    32 rows selected.

  • Why does the same clip play differently each time I play it?

    Playing a flash animation clip in Adobe Media Player plays differently each time I play it.  I'm looking at animation we made that has a left to right move.  Sometimes it plays smoothly, other times it stutters, but the stutters happen at different points each time I play it, and the amount of stuttering changes each time I play it.  I'm trying to decide if the file is acceptable to post on the web, so I'm playing the same 34 second file from my hard drive, each time in succession, yet each play is different.  Boy, if you can help me with this I would sure appreciate it, as it is driving me crazy.  (The same thing happens on other flash players).  And no, the file isn't haunted...

    Hello and thank you for trying to help me out. When I click on the itunes icon on my desktop, it does the preparing to install.... on my laptop, when I click on the icon, itunes opens automatically. I really can't figure out why one does this and the other does not.
    Apparently, I was not having trouble connecting to the itunes store like I thought. Many other people complain of the same problem I had---the connecting to the itunes store progress bar goes halfway, stops, and then all I see is a blank white page that says itunes store. Well, after playing around, and clicking on VIEW and SHOW sidebar browser, I was able to see the itunes store! Yay!! It was so simple, it was unreal that so many people are having the same problem I thought I was having, connecting, when all that was was a VIEW issue.
    As far as my desktop doing the preparing to install, I don't get it. I have uninstalled itunes9 and redownloaded it, reinstalled it. Same problem. Preparing to install. No matter what itunes icon I click on, or even if I click ont he application itself from it's folder. Any ideas?
    So just forget about my connection problem---it was not a problem after all. Yet one pc does preparing to install when the itunes icon is clicked on, and the other pc does not. Both are running windows vista home premium. One is a desktop, one a laptop. I can't figure it out.

  • Same query with different execution plan

    Hello All,
    I wonder why does sql server create different execution plan for these below queries ?
    Thanks.

    You can look at the expected query plan. Either visually in SSMS, or alternatively, you can run the query after the instruction SET SHOWPLAN_TEXT ON.
    The Optimizer is the component of SQL Server that determines how the query is executed. It is cost based. It will assess different execution plans, estimate the cost of each of them and then select the cheapest. In this context, cheapest means the one with
    the shortest runtime.
    In your particular case, the estimation for the second query is, that scanning just a small part of the nonclustered index and then looking up the table data of the qualifying rows is the cheapest approach, because the estimated number of qualifying rows
    is low.
    In the first query, it estimated that looking up the many qualifying rows there would be too expensive, and that it would be cheaper to simply scan the entire clustered index, and simply filter out all unwanted rows. Note that the clustered index includes
    the actual table data.
    Gert-Jan

  • Performance issues using JavaFX on different notebooks

    Hello,
    unfortunately i feel forced to ask a question about performance issues. As far as i understood, most of the problems with JavaFX 2.0 that are discussed here or somewhere else seem to have there roots in a huge count of nodes and/or some kind of animations. In opposition to this I'm writing a business application for the desktop with JavaFX as a Swing-replacement. There are no permanent animations at all and the scene has all in all 200 nodes(measured it with ScenicView) yet. I use no WebView-Nodes.
    The application runs very well on my development computer with 16 GB of RAM, a Intel Corei7 2600K processor and a mid-class AMD grafics device. Also, there are no performance issues on a Core i3 Notebook. As soon as i start the application on my Thinkpad X220 with Core i7-2620M CPU, 8 GB RAM and Intel HD graphics it get's almost unusable. For example, there is a diagramm(see attached screenshot), which is situated in a scrollpane. As soon as i try to pan it, the panning extremely slow(i'd say 2-4 fps). Another example is that hovering buttons is not very responsive. Moving the mouse over a button causes the hover effect 0.3-0.5 seconds after it entered the button. Fading transitions that i use at some places are not smooth as well.
    I made sure that the app is running using a hardware renderer on each computer. Also, i tried to force a fallback to the software renderer using the "-Dprism.order=j2d" switch but it only performed worse.
    So my first question is: Are there known issues with mobile processors/graphic devices of the mentioned type?

    I just tested it with Java 8 ea build 61 and beside the fact that a small amount of css didn't work anymore, it runs very well with this version of Java(/FX). Damn...i hope that some of this performance fixes will be backported to some Java 7 update.

  • Execution of TestStand-Sequence in LabVIEW via TS-API: Different Execution times for same sequence

    Hello Forum-Members,
    I have a problem concerning the execution of an TestStand-Sequence in LabVIEW. I have created a VI that offers the ability to choose a TestStand-Sequence-File and then executes the sequence using the TestStand-API. The implementation is based on an example in C++-Application found following this link:
    http://forums.ni.com/t5/NI-TestStand/Unreleased-references-using-engine-API-in-C/m-p/2927314#M46034
    The implementation works quite solid in case the VI is executed the first time. The VI processes the chosen sequence in a acceptable duration.
    But in case the execution is started a second time, the execution of the sequence takes ca. 30sec more than in the first case.
    Until now I have not found a solution and hope someones got a hint concerning this problem...
    I am using LabVIEW 2013 and TestStand 2013.
    I have attached my own VI, a sample sequence with a small sample VI, so you can reproduce the problem.
    Kind regards,
    TobiKi
    Solved!
    Go to Solution.
    Attachments:
    Exe-TestStand-Sequence.vi ‏25 KB
    Sequenz.vi ‏8 KB
    Test-Sequenz.seq ‏5 KB

    Hi Norbert,
    first thanks for your answer.
    What would be a reasonable way to replace the "Execution.WaitForEndEx"? My first idea is to get the respective thread of the execution and use the "Thread.WaitForEnd".
    To clarify my problem:
    The execution of the sequence itself takes longer time and so the execution of the calling VI. I have attached pictures of the log file of the first and second execution.
    Further I don't get any dialog popups during the shutdown of TestStand. (I have activated the "ReportObjectLeaks" using the "DebugOptions") While developing the attached VI I've gotten several popups. But these popups disappeared after closing all references.
    Maybe you have another hint how to locate the problem.
    TobiKi
    Attachments:
    FirstExecution_20-08-2014.png ‏16 KB
    SecondExecution_20-08-2014.png ‏16 KB

  • Performance issue: stmt.execute() takes a long time when using Oracle objs

    Folks,
    I have a PL/SQL API that returns a REF CURSOR over an Oracle object that contains other objects. In the JDBC layer, when I do a stmt.execute(), it takes about 1.2s for this statement to run while the execution of the PL/SQL API in the database takes only about 100ms or so. When I connect to a database that is physically located really far away, the delta here increases (perhaps due to the network latency).
    I believe it is not as efficient to use Oracle ADTs in conjunction with JDBC. However, not using an Oracle object and replacing that with a bunch of linear arrays is not really an option for me considering the amount of change involved and what a maintenance nightware that would be. At the same time, I need to get this to perform better. Any thoughts?
    I suspect that there are a number of network round trips with Oracle objects are involved. If that is infact true, what are my options?
    I use Oracle 10g, and the Oracle JDBC thin driver. Thanks.

    I have an Oracle object that has say 3 fields - number, number and number_table (indexed table of numbers). Right now, I return a REF CURSOR and do a getObject() in the java layer. But, I want to try and change this so that I return linear arrays (meaning, all these fields are not embedded in an Oracle object). Dont know if that would make things quicker but wanted to check to see if there were other alternatives.
    Also, can I define a procedure that returns an OUT parameter which is an indexed table, and then do a registerOutParameter(<index>, OracleTypes.ARRAY)? I tried that but it gives me a PLS-00306 error (wrong number of types of arguments).

  • Same Computers/Settings - Different Render Times

    Hello, great and powerful Adobe Community.  My coworker and I have identical machines (Dell Precision T7600 - Xeon 2GB, 32 GB RAM, NVIDIA Quadro K5000, Windows 64 bit OS), both running Adobe CS6.  Our render set-up for After Effects is to pull source footage from the main HD (2 TB), render to a second HD (150GB), with a third HD (150GB) set up for cache, media cache, and database folders.  Both machines are set up to render multiple frames simultaneously.  However, for some reason his machine is taking ridiculously long to render.  For the same file, my machine finishes rendering in about 2hrs, while his is showing an estimated time of 17 hours.  When left to run overnight, his machine still hasn't finished the next morning and shows 60+ hrs remaining.  This is a recent problem and his computer has had reasonable render times up until recently.  Software is up to date across the board, no new software has been installed on either machine lately, and any updates required by our system admin would have been applied to both.
    Other than checking that the above listed conditiions are identical between our two towers, I'm not sure where to look for the problem.  Can anyone suggest a reason for his machine's poor performance?  Any insight would be appreciated.  My thanks in advance for your help.

    I wouldn't call it a bug. 
    Besides, although the effects you use in all these comps might all be precisely the same, you didn't breathe a word whether the codec of the footage used in these comps is precisely the same... and codecs can make a big difference. 
    Sure, you may have rendered to the same codec.  Did you START with source footage that's all the same codec?  If not, you're not comparing apples to apples.

  • Same query at same time, but different execution plans from two schemas

    Hi!
    We just had some performance problems in our production system and I would like to ask for some advice from you.
    We had a select-query that was run from USER1 on SCHEMA1, and it ran a table scan on a huge table.
    Using session browser in TOAD I copied the Sql-statement, logged on SCHEMA1 and ran the same query. I got a different execution plan where I avoided the table scan.
    So my question is:
    How is it possible that the same query get different execution plans when running in two different schemas at the same time.
    Some more information:
    The user USER1 runs "alter session set current_schema=SCHEMA1;" when it logs on. Besides that it doesn't do anything so session parameter values are the same for USER1 and SCHEMA1.
    SCHEMA1 is the schema owning the tables.
    ALL_ROWS is used for both USER1 and SCHEMA1
    Our database:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    PL/SQL Release 9.2.0.8.0 - Production
    CORE     9.2.0.8.0     Production
    TNS for Linux: Version 9.2.0.8.0 - Production
    NLSRTL Version 9.2.0.8.0 - Production
    Anybody has some suggestions to why I experience different execution plan for the same query, run at the same time, but from different users?

    Thanks for clarification of the schema structure.
    What happens if instead of setting the current session schema to SCHEMA1, if you simply add the schema name to alle tables, views and other objects inside your select statement?
    As in select * from schema1.dual;I know that this is not what you want eventually, but it might help to find any misleading objects.
    Furthermore it is not clear what you meant with: "avoided a table scan".
    Did you avoid a full table scan (FTS) or was the table completely removed from the execution plan?
    Can you post both plans?
    Edited by: Sven W. on Mar 30, 2010 5:27 PM

  • Issues with reverse key indexes and range scan

    I have a question. Why is it that reverse key indexes do not work in a range scan?
    Thanks

    Chris, well said in simple terms.
    Extract from metalink:
    Oracle8 provides the ability to create reverse key indexes. Reverse key indexes
    reverse the bytes of each indexed column with the exception of ROWID and still
    maintains the column order. Reverse key indexes are useful for Oracle Parallel
    Server environments.
    In an OPS environment, modifications to indexes are focused on a small
    set of leaf blocks. Reversing the keys of the index allows insertions to be
    distributed across all the leaf keys in the index. Reverse key indexes prevent
    queries from performing an index range scan since lexically adjacent keys
    are not stored next to each other. Reverse key indexes can also be used in
    situations where users insert ascending values and delete lower values from the
    table, thus helping to prevent skewed indexes.
    ===
    Good discussion at
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2737861489787945222::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:627823669999
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2737861489787945222::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6163160472530
    Jaffar
    Message was edited by:
    The Human Fly

  • DELETE performance issue

    Dear All,
    I am posting again my performance issue for a delete statement (this time according to the instructions for posting SQL statements tunning request). The following delete statement was running more than 2 hours without success. Please note that the tables are indexed on the used fields in the query. If i try simple select it is done within 16 seconds:
    DELETE FROM aux_exist_relationship_3 aer_3
            WHERE EXISTS (SELECT ''
                          FROM aux_kind_of_control_1 akc_1
                          WHERE aer_3.cons_rel_id_new= akc_1.cons_rel_id)
            AND NOT EXISTS (SELECT ''
                            FROM aux_kind_of_control_3 akc_3
                            WHERE akc_3.cons_rel_id=aer_3.cons_rel_id_new)The version of the DB is 10.2.0.4
    These are the parameters relevant to the optimizer:
    show parameter optimizer
    NAME TYPE VALUE
    optimizer_dynamic_sampling integer 2
    optimizer_features_enable string 10.2.0.4
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_mode string ALL_ROWS
    optimizer_secure_view_merging boolean TRUE
    SQL> show parameter db_file_multi
    NAME TYPE VALUE
    db_file_multiblock_read_count integer 128
    SQL>
    SQL>
    SQL> show parameter db_block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    SQL>
    SQL> show parameter cursor_sharing;
    NAME TYPE VALUE
    cursor_sharing string EXACT
    SQL>
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL>
    SQL> select sname, pname, pval1, pval2 from sys.aux_stats$;
    SNAME PNAME PVAL1 PVAL2
    SYSSTATS_INFO STATUS COMPLETED
    SYSSTATS_INFO DSTART 10-30-2008 16:28
    SYSSTATS_INFO DSTOP 10-30-2008 16:28
    SYSSTATS_INFO FLAGS 1
    SYSSTATS_MAIN CPUSPEEDNW 1217.17877
    SYSSTATS_MAIN IOSEEKTIM 10
    SYSSTATS_MAIN IOTFRSPEED 4096
    SYSSTATS_MAIN SREADTIM
    SYSSTATS_MAIN MREADTIM
    SYSSTATS_MAIN CPUSPEED
    SYSSTATS_MAIN MBRC
    SNAME PNAME PVAL1 PVAL2
    SYSSTATS_MAIN MAXTHR
    SYSSTATS_MAIN SLAVETHR
    13 rows selected.
    Here is the output of EXPLAIN PLAN
    explain plan for
    2 DELETE FROM aux_exist_relationship_3 aer_3
    3 WHERE EXISTS (SELECT ''
    4 FROM aux_kind_of_control_1 akc_1
    5 WHERE aer_3.cons_rel_id_new= akc_1.cons_rel_id)
    6 AND NOT EXISTS (SELECT ''
    7 FROM aux_kind_of_control_3 akc_3
    8 WHERE akc_3.cons_rel_id=aer_3.cons_rel_id_new);
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4002353621
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU) | Time |
    | 0 | DELETE STATEMENT | | 2334 | 42012 | | 1174 (1) | 00:00:15 |
    | 1 | DELETE | AUX_EXIST_RELATIONSHIP_3 | | | | | |
    |* 2 | HASH JOIN SEMI | | 2334 | 42012 | | 1174 (1) |00:00:15 |
    |* 3 | HASH JOIN ANTI | | 2334 | 28008 | 1992K | 989 (1) | 00:00:12 |
    | 4 | TABLE ACCESS FULL | AUX_EXIST_RELATIONSHIP_3 | 113K| 663K| | 718 (1) | 00:00:09 |
    | 5 | INDEX FAST FULL SCAN| AUX_KIND_OF_CONTROL_3_IDX1 | 113K| 663K| | 74 (2) | 00:00:01 |
    | 6 | INDEX FAST FULL SCAN | AUX_KIND_OF_CONTROL_1_IDX1 | 221K| 1298K| | 183 (2) | 00:00:03 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    2 - access("AER_3"."CONS_REL_ID_NEW"="AKC_1"."CONS_REL_ID")
    3 - access("AKC_3"."CONS_REL_ID"="AER_3"."CONS_REL_ID_NEW")
    19 rows selected.
    I will be very grateful if someone can tel me where might be the problem. i got suggestions yesterday for using MINUS in the delete clause:
    DELETE  FROM aux_exist_relationship_3 aer_3
          WHERE aer_3.cons_rel_id_new IN(SELECT akc_1.cons_rel_id
                                           FROM aux_kind_of_control_1 akc_1
                                         MINUS
                                         SELECT akc_3.cons_rel_id
                                           FROM aux_kind_of_control_3 akc_3)or using view, but it did not help.
    My guess is that this is linked to the UNDO_TABLESPACE but how to prove it? Or perhaps I am wrong?

    Good day to everyone!
    Thanks a lot for th suggestions.
    I have tested the same query in a different DB where I have imported the 3 tables together with the data and the execution took 2.54 seconds. I guess the problem might be coming from the UNDO_TABLESPACE. I have found the following query:
    select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb
    from  (select tablespace_name, round(sum(bytes)/1024/1024 ,2) as free_space
           from dba_free_space
           group by tablespace_name) a,
          (select tablespace_name, sum(bytes)/1024/1024 as tbs_size
           from dba_data_files
           group by tablespace_name) b
    where a.tablespace_name(+)=b.tablespace_name;and the result is:
    TABLESPACE_NAME | SIZEMB | FREEMB
    SYSAUX | 600 | 48
    UNDOTBS | 9500 | 2.44
    SYSTEM | 400 | 122.69
    EGR_TBS_DATA | 13000 | 96.56
    and also
    select SEGMENT_SPACE_MANAGEMENT,RETENTION,MAX_EXTENTS
    from dba_tablespaces
    where tablespace_name = 'UNDOTBS'result:
    SEGMENT_SPACE_MANAGEMENT |RETENTION | MAX_EXTENTS
    MANUAL | NOGUARANTEE | 2147483645
    so perhaps it is from the UNDO_TABLESPACE.
    Do you think this could be the issue?

Maybe you are looking for

  • Conversion of Date value to Timestamp

    I have a value like "00000000000000" in Date format. Now I want to convert it in timestamp. How can I do it? Please help me. I am using mysql-3.23.51-win and j2sdk-1_4_0_01-windows-i586. Thanks Amit Pandya

  • How do i get a script for a table

    hai i need sql query to create table script for already existing table. can any body help me. Edited by: 800324 on Feb 24, 2011 12:07 AM

  • Errors occurred

    errors occurred while installing the update, if the problem persists, choose tools> downloadf only and try installing manually

  • Lost Management IP

    Hi, i am playing around with the backup and restore feature in UCS. After restoring a system from sratch with the full-state backup, the Management IP for the Fabric B Interconnect is missing.  It seems to be, that the ip is not restored. Is that a k

  • BAPI_GOODSMVT_CREATE used with mvt type 105

    Hi, That is easy. Somebody has worked with the mvt type 105* and the BAPI_GOODSMVT_CREATE in the same development? Release GR blocked stock for warehouse I am trying to use this combination but it does not work. Thanks in advance.