CBO calculates un acceptable cost while using index.

Hi,
I was wondering to see the execution plan for both the case using index/without index.
We are using oracle 10G(10.2.0.3.0) with RAC in production at O/S:- sun solaris 10.
Java based application is running in this database. One of the sql query is taking long time to fetch the records. I analyzed the sql plan and noticed the FTS. I created indexes to the column(s) which is refering in where clauses. I noticed a strage behavior. Execution plan shows that the CBO is using right path but its not acceptable as application is time outs while return the rows.
first execution plan with/without index (not using the index).
PLAN_TABLE_OUTPUT
Plan hash value: 419342726
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 196 | 3332 | 67845 (3)| 00:13:35 |
|* 1 | TABLE ACCESS FULL | CWDBENUMDESCRIPTIONS | 1 | 35 | 3 (0)| 00:00:01 |
| 2 | SORT GROUP BY | | 196 | 3332 | 67845 (3)| 00:13:35 |
|* 3 | TABLE ACCESS FULL| CWORDERINSTANCE | 51466 | 854K| 67837 (3)| 00:13:35 |
Predicate Information (identified by operation id):
1 - filter("ERR"."CODE"=:B1)
3 - filter("OI"."ERROR_CODE" IS NOT NULL AND "OI"."DIVISION"='OR9' AND
"OI"."ACTIVE"=TO_NUMBER(:1) AND "OI"."ORDER_STATE"<>'O_NR_NS' AND
"OI"."ORDER_STATE"<>'C_C_QR' AND "OI"."ORDER_STATE"<>'O_NR_NS_D')
SQl query was modified to force the index to use /*+ index(oi oi_div) */ the execution is as below:-
PLAN_TABLE_OUTPUT
Plan hash value: 1157277132
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 196 | 3332 | 394K (1)| 01:18:52 |
|* 1 | TABLE ACCESS FULL | CWDBENUMDESCRIPTIONS | 1 | 35 | 3 (0)| 00:00:01 |
| 2 | SORT GROUP BY | | 196 | 3332 | 394K (1)| 01:18:52 |
|* 3 | TABLE ACCESS BY INDEX ROWID| CWORDERINSTANCE | 51466 | 854K| 394K (1)| 01:18:52 |
|* 4 | INDEX RANGE SCAN | OI_DIV | 3025K| | 14226 (1)| 00:02:51 |
Predicate Information (identified by operation id):
1 - filter("ERR"."CODE"=:B1)
3 - filter("OI"."ERROR_CODE" IS NOT NULL AND "OI"."ACTIVE"=TO_NUMBER(:1) AND
"OI"."ORDER_STATE"<>'O_NR_NS' AND "OI"."ORDER_STATE"<>'C_C_QR' AND
"OI"."ORDER_STATE"<>'O_NR_NS_D')
My questions are here:-
1). why FTS is less costly comparing index scan where there are 15000000 rows in the table.
2). while forcing index to use cost increase drastically (the statistics is latest one analyzed on 6th of feb 2009)
3). what should i suppose to change to get the performance benefit.
Thanks,
Pradeep

user587112 wrote:
select null, oi.division, oi.METADATATYPE, oi.ERROR_CODE,
       (  select err.DESCRIPTION
FROM   CWDBENUMDESCRIPTIONS err
WHERE  oi.ERROR_CODE = err.CODE
count(*)
from CWORDERINSTANCE oi
where
     oi.ERROR_CODE is not null
      and oi.division in ('BK9')
     and oi.order_state not in ('O_NR_NS_D', 'C_C_QR', 'O_NR_NS')
      and oi.metadatatype = :1
     and oi.duedate>=:2
     and oi.active = :3
group by oi.division, oi.metadatatype, oi.error_code
order by oi.division, oi.metadatatype, oi.error_code
In this query, if we use as it is how its being displayed, it runs like a rocket, but if we change division in ('OR9') instead of 'BK9' it does not use index and leads to time out the application.
Number of records   division
1964690                             ---------------- why this field is null ?
3090666              OR9
3468                 BA9
1242                 EL9
2702                 IN9
258                  EU9
196198               DT9
1268                 PA9
8                    BK9
2332                 BH9
1405009              TP9
According to the stats in your original execution plan, it looks like you have a histogram on this column, and the index you want to use is on just the division column.
Oracle estimate for 'OR9' is 3M rowids from the index, resulting in 50,000+ rows from the table - that's a lot of work - it's not surprising that the optimizer chose a tablescan for 'OR9' - but chose to use the index for 'BK9' which has only 8 rows.
How often do you want to run this query ? And how accurate does the answer have to be ?
If you want this query to run faster even when it's processing a huge number of rows, one option would be to create a materialized view over the data that could supply the result set much more efficiently (possibly getting your front-end code to call a materialized view refresh before running the query).
The only other altenative is probably to create an index that covers all the columns in the query so that you don't have to visit the table - and if you order them correctly you won't have to do a sort group by. I think this index should do the trick: (division, metadatatype, error_code,active, duedate,orderstate). You could also compress this index on at least the first column, but possibly on far more columns, to minimise the size,
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."
Stephen Hawking
To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • "llegal character in path at index" Error While Using wsimport from ant.

    Hi,
    I am getting the following error, while using wsimport from ant build script. you have the details below. I dont have a clue on this error.
    Error :
    wsimport:
    [echo] Generating the client stubs
    [wsimport] error: Unable to parse "HelloService_schema1.xsd" : Illegal character in path at index 25: file:/D:/Study/WebService Eclipse Project/examples/jaxws/helloservice/service/server/wsdl/HelloService.wsdl#types?schema1
    [wsimport] line 0 of file:/D:/Study/WebService Eclipse Project/examples/jaxws/helloservice/service/server/wsdl/HelloService.wsdl#types?schema1
    [wsimport] error: Unable to parse "HelloService_schema1.xsd" : Illegal character in path at index 25: file:/D:/Study/WebService Eclipse Project/examples/jaxws/helloservice/service/server/wsdl/HelloService.wsdl#types?schema1
    [wsimport] line ? of file:/D:/Study/WebService Eclipse Project/examples/jaxws/helloservice/service/server/wsdl/HelloService.wsdl#types?schema1
    [wsimport] error: Element "{http://endpoint.helloservice/}sayHello" not found.
    Java WebService :
    package helloservice.endpoint;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    @WebService()
    public class Hello {
    private String message = new String("Hello, ");
    @WebMethod()
    public String sayHello(String name) {
    return message + name + ".";
    Ant Build.xml
    <project name="${project.name}" basedir="." default="ear">
         <property file="WS_build.properties"/>
         <target name="init">
              <!-- Path Setting-->
              <echo description="Setting the path for the project"/>
              <path id="classpath">
                   <fileset dir="${lib.dir}" includes="*.jar"/>          
                   <fileset dir="${commonWSLib.dir}" includes="*.jar"/>
              </path>
              <!-- WSGen -->
              <echo description="WSGEN Definition"/>
              <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
                   <classpath>
                        <path refid="classpath"/>
                   </classpath>
              </taskdef>
              <!-- WS Import-->
              <echo description="WSImport Definition" />
              <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
                   <classpath>
                        <path refid="classpath"/>
                   </classpath>
              </taskdef>
         </target>
         <target name="Compile" depends="init">
              <echo description="Compiling the project"/>
              <mkdir dir="${build.dir}"/>
              <mkdir dir="${build.dir}/classes"/>
              <javac destdir="${build.dir}/classes" srcdir="${java.base}">
                   <classpath>
                        <path refid="classpath"/>
                   </classpath>
              </javac>
              <copy todir="${build.dir}/classes">
                   <fileset dir="${java.base}" excludes="**/*.java"/>
              </copy>
         </target>
         <target name="wsgen" depends="Compile">
                   <echo message="Generating the wsdl file[${project.name}Service.wsdl]" />
                   <mkdir dir="${service.dir}"/>
                   <mkdir dir="${service.dir}/server"/>
                   <mkdir dir="${service.dir}/server/classes"/>
                   <mkdir dir="${service.dir}/server/src"/>          
                   <mkdir dir="${service.dir}/server/wsdl"/>                    
                   <wsgen sei="${sei.class}" destdir="${service.dir}/server/classes" genwsdl="true"
                   sourcedestdir="${service.dir}/server/src" resourcedestdir="${service.dir}/server/wsdl">
                        <classpath>
                             <path refid="classpath" />
                             <pathelement location="${build.dir}/classes" />
                        </classpath>
                   </wsgen>
         </target>
         <target name="copy" depends="wsgen">
                   <echo message="Copying class and config files into ${web-inf.dir} folder" />
                   <copy todir="${web-inf.dir}">
                        <fileset dir="${build.dir}"/>
                        <fileset dir="${service.dir}/server" includes="**/*.class"/>
                        <fileset dir="." includes="${lib.dir}/*.jar"/>
                   </copy>
                   <copy todir="${web-inf.dir}/${lib.dir}">
                        <fileset dir="${commonWSLib.dir}" includes="*.jar"/>
                   </copy>
                   <copy todir="${web-inf.dir}">
                        <fileset dir="${web-inf.dir}" includes="**/*.xml"/>
                   </copy>
         </target>
         <!-- Create the WAR file     -->
         <target name="war" depends="copy">
              <echo message="Creating the war file [${project.name}.war]" />     
              <mkdir dir="${dist.dir}"/>
              <mkdir dir="${dist.dir}/server"/>
              <war destfile="${dist.dir}/server/${project.name}.war" webxml="${web-inf.dir}/web.xml" basedir="${web.dir}"/>
         </target>
         <target name="wsimport" depends="war">
              <echo message="Generating the client stubs" />          
              <mkdir dir="${service.dir}"/>
              <mkdir dir="${service.dir}/client"/>
              <mkdir dir="${service.dir}/client/classes"/>
              <mkdir dir="${service.dir}/client/src"/>     
              <wsimport wsdl="${basedir}/${service.dir}/server/wsdl/${project.name}.wsdl"
                   destdir="${service.dir}/client/classes"
                   package="${wsimport.package}"
                   sourcedestdir="${service.dir}/client/src">
              </wsimport>
         </target>
         <target name="clientjar" depends="wsimport">
    <echo message="Creating the client jar file [${project.name}Client.jar] " />
    <copy todir="${service.dir}/client/classes">
    <fileset dir="${service.dir}/client/src"/>
    </copy>
    <mkdir dir="${dist.dir}/client"/>
                   <tstamp>
                   <format property="TODAY" pattern="yyyy-MM-dd hh:mm:ss" />
                   </tstamp>
    <jar destfile="${dist.dir}/client/${project.name}Client.jar"
    basedir="${service.dir}/client/classes">
                   <manifest>
                   <attribute name="Built-By" value="${user.name}"/>
                   <attribute name="Built-Date" value="${TODAY}"/>
                   <attribute name="Implementation-Version" value="${version}-b${build.number}"/>
              </manifest>
              </jar>          
    <mkdir dir="${dist.dir}/client"/>
         </target>
         <!-- JAR THE ENGINE -->
         <target name="enginejar" depends="clientjar">
         <echo message="Creating the engine jar file for local call [${project.name}.jar] " />
              <!-- <copy todir="${build.dir}/classes">
                        <fileset dir="." includes="${config.dir}/hibernate.cfg.xml"/>           
         </copy> -->
              <tstamp>
                   <format property="TODAY" pattern="yyyy-MM-dd hh:mm:ss" />
              </tstamp>
         <jar destfile="${dist.dir}/server/${project.name}.jar"
         basedir="${build.dir}/classes">
                   <manifest>
                        <attribute name="Built-By" value="${user.name}"/>
                        <attribute name="Built-Date" value="${TODAY}"/>
                        <attribute name="Implementation-Version" value="${version}-b${build.number}"/>
              </manifest>
              </jar>          
              </target>
              <!-- GENERATE EAR FOR THE ENGINE -->
              <target name="ear" depends="enginejar" >
                   <echo message="Creating the ear file [${project.name}.ear]" />
                   <ear destfile="${dist.dir}/server/${project.name}.ear" appxml="META-INF/application.xml">
                   <fileset dir="${dist.dir}/server" includes="${project.name}.war"/>
              </ear>
                   <antcall target="clean"></antcall>
              </target>
              <!-- CLEAN UP THE FOLDERS     -->
              <target name="clean">
                   <echo message="Cleaning up folders " />          
                   <delete dir="${build.dir}"/>
                   <delete dir="${service.dir}"/>
                   <delete dir="${web-inf.dir}/classes"/>
                   <delete dir="${web-inf.dir}/lib"/>
                   <echo message="${project.name}.ear, ${project.name}.war, ${project.name}.jar and ${project.name}Client.jar is available in project's ${dist.dir} folder"/>
              </target>
    </project>
    Generated wsdl(HelloService.wsdl) :
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <definitions targetNamespace="http://endpoint.helloservice/" name="HelloService" xmlns:tns="http://endpoint.helloservice/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
    <xsd:schema>
    <xsd:import namespace="http://endpoint.helloservice/" schemaLocation="HelloService_schema1.xsd"/>
    </xsd:schema>
    </types>
    <message name="sayHello">
    <part name="parameters" element="tns:sayHello"/>
    </message>
    <message name="sayHelloResponse">
    <part name="parameters" element="tns:sayHelloResponse"/>
    </message>
    <portType name="Hello">
    <operation name="sayHello">
    <input message="tns:sayHello"/>
    <output message="tns:sayHelloResponse"/>
    </operation>
    </portType>
    <binding name="HelloPortBinding" type="tns:Hello">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="sayHello">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="HelloService">
    <port name="HelloPort" binding="tns:HelloPortBinding">
    <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
    </port>
    </service>
    </definitions>
    Generated : HelloService_schema1.xsd
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <xs:schema version="1.0" targetNamespace="http://endpoint.helloservice/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://endpoint.helloservice/"/>
    <xs:complexType name="sayHello">
    <xs:sequence>
    <xs:element name="arg0" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://endpoint.helloservice/"/>
    <xs:complexType name="sayHelloResponse">
    <xs:sequence>
    <xs:element name="return" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    If u need any other information let me know.

    This has been resolved by uploading relevant jar file

  • How oracle decide whetehr to use index or full scan (statistics)

    Hi Guys,
    Let say i have a index on a column.
    The table and index statistics has been gathered. (without histograms).
    Let say i perform a select * from table where a=5;
    Oracle will perform a full scan.
    But from which statistics it will be able to know indeed most of the column = 5? (histograms not used)
    After analyzing, we get the below:
    Table Statistics :
    (NUM_ROWS)
    (BLOCKS)
    (EMPTY_BLOCKS)
    (AVG_SPACE)
    (CHAIN_COUNT)
    (AVG_ROW_LEN)
    Index Statistics :
    (BLEVEL)
    (LEAF_BLOCKS)
    (DISTINCT_KEYS)
    (AVG_LEAF_BLOCKS_PER_KEY)
    (AVG_DATA_BLOCKS_PER_KEY)
    (CLUSTERING_FACTOR)
    thanks
    Index Column (A)
    ======
    1
    1
    2
    2
    5
    5
    5
    5
    5
    5

    I have prepared some explanation and have not noticed that the topic has been marked as answered.
    This my sentence is not completely true.
    A column "without histograms" means that the column has only one bucket. More correct: even without histograms there are data in dba_tab_histograms which we can consider as one bucket for whole column. In fact these data are retrieved from hist_head$, not from histgrm$ as usual buckets.
    Technically there is no any buckets without gathered histograms.
    Let's create a table with skewed data distribution.
    SQL> create table t as
      2  select least(rownum,3) as val, '*' as pad
      3    from dual
      4  connect by level <= 1000000;
    Table created
    SQL> create index idx on t(val);
    Index created
    SQL> select val, count(*)
      2    from t
      3   group by val;
           VAL   COUNT(*)
             1          1
             2          1
             3     999998So, we have table with very skewed data distribution.
    Let's gather statistics without histograms.
    SQL> exec dbms_stats.gather_table_stats( user, 'T', estimate_percent => 100, method_opt => 'for all columns size 1', cascade => true);
    PL/SQL procedure successfully completed
    SQL> select blocks, num_rows  from dba_tab_statistics
      2   where table_name = 'T';
        BLOCKS   NUM_ROWS
          3106    1000000
    SQL> select blevel, leaf_blocks, clustering_factor
      2    from dba_ind_statistics t
      3   where table_name = 'T'
      4     and index_name = 'IDX';
        BLEVEL LEAF_BLOCKS CLUSTERING_FACTOR
             2        4017              3107
    SQL> select column_name,
      2         num_distinct,
      3         density,
      4         num_nulls,
      5         low_value,
      6         high_value
      7    from dba_tab_col_statistics
      8   where table_name = 'T'
      9     and column_name = 'VAL';
    COLUMN_NAME  NUM_DISTINCT    DENSITY  NUM_NULLS      LOW_VALUE      HIGH_VALUE
    VAL                     3 0,33333333          0           C102            C104So, Oracle suggests that values between 1 and 3 (raw C102 and C104) are distributed uniform and the density of the distribution is 0.33.
    Let's try to explain plan
    SQL> explain plan for
      2  select --+ no_cpu_costing
      3         *
      4    from t
      5   where val = 1
      6  ;
    Explained
    SQL> @plan
    | Id  | Operation         | Name | Rows  | Cost  |
    |   0 | SELECT STATEMENT  |      |   333K|   300 |
    |*  1 |  TABLE ACCESS FULL| T    |   333K|   300 |
    Predicate Information (identified by operation id):
       1 - filter("VAL"=1)
    Note
       - cpu costing is off (consider enabling it)Below is an excerpt from trace 10053
    BASE STATISTICAL INFORMATION
    Table Stats::
      Table:  T  Alias:  T
        #Rows: 1000000  #Blks:  3106  AvgRowLen:  5.00
    Index Stats::
      Index: IDX  Col#: 1
        LVLS: 2  #LB: 4017  #DK: 3  LB/K: 1339.00  DB/K: 1035.00  CLUF: 3107.00
    SINGLE TABLE ACCESS PATH
      BEGIN Single Table Cardinality Estimation
      Column (#1): VAL(NUMBER)
        AvgLen: 3.00 NDV: 3 Nulls: 0 Density: 0.33333 Min: 1 Max: 3
      Table:  T  Alias: T
        Card: Original: 1000000  Rounded: 333333  Computed: 333333.33  Non Adjusted: 333333.33
      END   Single Table Cardinality Estimation
      Access Path: TableScan
        Cost:  300.00  Resp: 300.00  Degree: 0
          Cost_io: 300.00  Cost_cpu: 0
          Resp_io: 300.00  Resp_cpu: 0
      Access Path: index (AllEqRange)
        Index: IDX
        resc_io: 2377.00  resc_cpu: 0
        ix_sel: 0.33333  ix_sel_with_filters: 0.33333
        Cost: 2377.00  Resp: 2377.00  Degree: 1
      Best:: AccessPath: TableScan
             Cost: 300.00  Degree: 1  Resp: 300.00  Card: 333333.33  Bytes: 0Cost of FTS here is 300 and cost of Index Range Scan here is 2377.
    I have disabled cpu costing, so selectivity does not affect the cost of FTS.
    cost of Index Range Scan is calculated as
    blevel + (leaf_blocks * selectivity + clustering_factor * selecivity) = 2 + (4017*0.33333 + 3107*0.33333) = 2377.
    Oracle considers that it has to read 2 root/branch blocks of the index, 1339 leaf blocks of the index and 1036 blocks of the table.
    Pay attention that selectivity is the major component of the cost of the Index Range Scan.
    Let's try to gather histograms:
    SQL> exec dbms_stats.gather_table_stats( user, 'T', estimate_percent => 100, method_opt => 'for columns val size 3', cascade => true);
    PL/SQL procedure successfully completedIf you look at dba_tab_histograms you will see following
    SQL> select endpoint_value,
      2         endpoint_number
      3    from dba_tab_histograms
      4   where table_name = 'T'
      5     and column_name = 'VAL'
      6  ;
    ENDPOINT_VALUE ENDPOINT_NUMBER
                 1               1
                 2               2
                 3         1000000ENDPOINT_VALUE is the column value (in number for any type of data) and ENDPOINT_NUMBER is cumulative number of rows.
    Number of rows for any ENDPOINT_VALUE = ENDPOINT_NUMBER for this ENDPOINT_VALUE - ENDPOINT_NUMBER for the previous ENDPOINT_VALUE.
    explain plan and 10053 trace of the same query:
    | Id  | Operation                   | Name | Rows  | Cost  |
    |   0 | SELECT STATEMENT            |      |     1 |     4 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T    |     1 |     4 |
    |*  2 |   INDEX RANGE SCAN          | IDX  |     1 |     3 |
    Predicate Information (identified by operation id):
       2 - access("VAL"=1)
    Note
       - cpu costing is off (consider enabling it)
    BASE STATISTICAL INFORMATION
    Table Stats::
      Table:  T  Alias:  T
        #Rows: 1000000  #Blks:  3106  AvgRowLen:  5.00
    Index Stats::
      Index: IDX  Col#: 1
        LVLS: 2  #LB: 4017  #DK: 3  LB/K: 1339.00  DB/K: 1035.00  CLUF: 3107.00
    SINGLE TABLE ACCESS PATH
      BEGIN Single Table Cardinality Estimation
      Column (#1): VAL(NUMBER)
        AvgLen: 3.00 NDV: 3 Nulls: 0 Density: 5.0000e-07 Min: 1 Max: 3
        Histogram: Freq  #Bkts: 3  UncompBkts: 1000000  EndPtVals: 3
      Table:  T  Alias: T
        Card: Original: 1000000  Rounded: 1  Computed: 1.00  Non Adjusted: 1.00
      END   Single Table Cardinality Estimation
      Access Path: TableScan
        Cost:  300.00  Resp: 300.00  Degree: 0
          Cost_io: 300.00  Cost_cpu: 0
          Resp_io: 300.00  Resp_cpu: 0
      Access Path: index (AllEqRange)
        Index: IDX
        resc_io: 4.00  resc_cpu: 0
        ix_sel: 1.0000e-06  ix_sel_with_filters: 1.0000e-06
        Cost: 4.00  Resp: 4.00  Degree: 1
      Best:: AccessPath: IndexRange  Index: IDX
             Cost: 4.00  Degree: 1  Resp: 4.00  Card: 1.00  Bytes: 0Pay attention on selectivity, ix_sel: 1.0000e-06
    Cost of the FTS is still the same = 300,
    but cost of the Index Range Scan is 4 now: 2 root/branch blocks + 1 leaf block + 1 table block.
    Thus, conclusion: histograms allows to calculate selectivity more accurate. The aim is to have more efficient execution plans.
    Alexander Anokhin
    http://alexanderanokhin.wordpress.com/

  • While using FF Browser, a window appeared, telling me I had an outdated version and should upgrade and it won't complete install nor allow me to uninstall to re

    First of all, I have Windows XP/HE/SP3 and my main browser is IE8, tho i also have Google and did have, FF V#21. And while using the FF browser, was alerted that my current version was outdated, etc, even tho I just installed V#21 only 1 week ago, but I took FF's word for it and clicked (x'd) to install the upgrade. The application (AP) used to install was called "Optimum Installer" and had the word "Firefox" in smaller print in the upper left hand corner. This seemed diff from the AP i had used to install just 1 week prior, but since i was using IE8 to install FFV#21 originally, I figured the FF browser used this "Optimum" AP, so I proceeded. The small window then said, "you have chosen to open this file" and yet there was no option to "open" only to "save" or cancel. So i x'd on "save" and my Norton file checker popped up to tell me this file is "safe." But afterwards no install window appeared, so i tried to DL the file again and still no Install window after a total of 8 attempts. I finally found the setup file in "my documents" and opened it and x'd to install. It seemed to work ok, tho again, I was asked alot of questions about making thus and such my default browser, or search engine, or home page, etc, and even some other, but i declined them all, i think, but not sure about one possible miscue. Anyways, the AP told me I'd successfully installed this newer version of FF. So of course i wanted to open it and see how it would work, and i went to my task bar/notification tray to X on the globe icon and instead it showed a "setup" icon. I put my mouse under it and it said "Mozilla Firefox" so i went ahead and x'd on it expecting FF to open. Instead, a small warning appeared telling me i had to reboot for the install..to be completed, so i did, but no change. Tried atleast half a dozen times and nothing, no new or any, version of FF working on my pc now. I even tried to look at support, but no answers, then tried to uninstall and it won't even let me do that, it keeps saying that "your computer must first be restarted to complete a previous upgrade"; yet that already hasn't been working. Also, i went from a V#21 to a V#13.0.1 with 77MB+ of space, which is way more than FF#21. Now I do believe this version is corrupt and really don't want it, but can't get rid of it. I even tried to reinstall V21 (also from IE8, since I don't even have FF browser now) and it goes to a point, but then also tells me I can't get this V21 til I complete an install/upgrade of another version. So basically, i have what i believe is a corrupt/malicious piece of software on my pc, calling itself Mozilla V#13.0.1 - which I can't get rid of, and also can't reinstall the version I had, least i finish installing the one i have but don't think I now want. Keep in mind also, I can't do any of the suggestions from within the FF browser that have been suggested, because I don't have it any more, only IE8 and Google....Any suggestions?

    Dear Colbabomb; thankyou for your links.
    So far, I looked at your first solution, Revo Uninstaller and it gives you a 30 free trial. Ergo, it will eventually cost money so I'm leery of using those kinds of programs in general, meaning most "free trials" have unwanted strings attached and often are big probs to get rid of later. Perhaps you can assure me that it is easy and very user friendly, before I proceed. And I already ran malwarebytes and it found nothing tho the program still can't be uninstalled. I downloaded Adw Cleaner and during the install, my Norton's security popped up and warned that there were (low risk) threats with two of their "other offers" and i hadn't even actually clicked to agree either of them. Nonetheless, Norton warned me against the "lyrics finder" and "deal ply." In fact, there was a box already with an x in it, saying that you are accepting deal ply if you x on "next." Well, except I unchecked that box before clicking on next, yet when it went to fully install, it still showed that it was adding itself; so, just before the install was 100% completed, I had to abort the whole thing. I really do hope your other suggestions are programs that you personally know that they don't try and trick you. But right now, I would not suggest Adw Cleaner to anyone. I even read the fine print about what they will try and install and how to decline and it still tried sticking stuff on that i believed I had declined. Anyways, i have to leave now, shall pick up later this evening, if my pc is still functioning.

  • [ps3mediaserver][pms-svn][AUR] No sound while using external subtitles

    Greetings everyone,
    I am experiencing some weird behavior while using External Subtitles, e.g. Playing an AVI file with PS3MediaServer works fine but playing the very same AVI file with external subtitles gives me the video with subtitles and no sound.
    My Server configuration is as follows :
    Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
    RAM :2048 Mo
    OS : Archlinux 2.6.37-ARCH #1 SMP PREEMPT Tue Mar 8 08:34:35 CET 2011 x86_64
    Target : Playstation 3 Slim, firmware 3.60
    Here are the various Sofware versions I use :
    PMS version I am using is PS3 Media Server 1.21.0 (built from AUR, PKG: pms-svn)
    Java version is Java: 1.6.0_22-Sun Microsystems Inc.
    MPlayer version is "MPlayer SVN-r32792-4.5.2 (C) 2000-2011 MPlayer Team" and so is "MEncoder SVN-r32792-4.5.2 (C) 2000-2011 MPlayer Team"
    TSMuxer version is "1.10.6-10"
    FFMpeg version is "FFmpeg version git-2611e52"
    The network configuration of the server is : 192.168.0.20, netmask 255.255.255.0 ; 100MBits Full Duplex (Wired)
    The network configuration of the Playstation 3 is : 192.168.0.15, netmask 255.255.255.0 ; Auto (Wired, no WiFi !)
    Both are linked on a 100MBits Switch : Playstation 3 <--> Switch 100 Mbits <--> PS3 Media Server
    My PMS.conf is :
    thumbnails = true
    language =
    prevents_sleep_mode = true
    folders = \/srv\/shares
    network_interface = eth0
    hide_empty_folders = true
    hide_media_library_folder = true
    hide_transcode_folder = true
    hide_enginenames = true
    enable_archive_browsing = false
    audio_thumbnails_method = 2
    mencoder_subfribidi = false
    mencoder_disablesubs = false
    autoloadsrt = true
    hostname =
    port = 5001
    thumbnail_seek_pos = 10
    nbcores = 4
    turbomode = true
    minimized = false
    hidevideosettings = false
    charsetencoding = 850
    engines = mencoder,avsmencoder,tsmuxer,mplayeraudio,ffmpegaudio,tsmuxeraudio,mencoderwebvideo,mplayervideodump,mplayerwebaudio,ffmpegdvrmsremux
    avisynth_convertfps = true
    avisynth_script = #AviSynth script is now fully customisable
    transcode_block_multiple_connections = false
    tsmuxer_forcefps = true
    tsmuxer_preremux_pcm = false
    tsmuxer_preremux_ac3 = false
    audiochannels = 2
    audiobitrate = 384
    maximumbitrate = 0
    skiploopfilter = false
    mencoder_fontconfig = false
    mencoder_font =
    mencoder_forcefps = false
    mencoder_usepcm = false
    mencoder_intelligent_sync = true
    mencoder_decode =
    mencoder_encode = keyint=1:vqscale=1:vqmin=2
    mencoder_nooutofsync = true
    # mencoder_audiolangs = fre,eng
    # mencoder_sublangs = fre,off;fr,off;eng,off;en,off
    mencoder_audiosublangs = fre,off;fr,off;eng,off;en,off
    mencoder_ass_scale = 1.0
    mencoder_ass_margin = 10
    mencoder_ass_outline = 1
    mencoder_ass_shadow = 1
    mencoder_noass_scale = 3
    mencoder_noass_subpos = 2
    mencoder_noass_blur = 1
    mencoder_noass_outline = 1
    mencoder_subcp = cp1252
    mencoder_ass = false
    mencoder_yadif = false
    mencoder_scaler = false
    mencoder_scalex = 0
    mencoder_scaley = 0
    ffmpeg = -g 1 -qscale 1 -qmin 2
    # The next value has to be chosen very carefully: to low = possible stuttering if the network is congested, but
    # to high causes the java heap to be to small. Check the -Xmx-setting in /opt/pms/PMS.sh and raise it to 1024M
    # or higher if you see unexplainable Out Of Memory-errors in the debug.log
    maxvideobuffer = 400
    use_mplayer_for_video_thumbs = false
    # The next value sorts your media files. 0 (default) = A-Z while 1 = Z-A
    sort_method =
    usecache = true
    forcetranscode=
    Here are the tests I have run :
    MediaInfo output
    General
    Complete name : test without subs.avi
    Format : AVI
    Format/Info : Audio Video Interleave
    File size : 350 MiB
    Duration : 42mn 24s
    Overall bit rate : 1 153 Kbps
    Writing application : transcode-1.0.6
    Video
    ID : 0
    Format : MPEG-4 Visual
    Format profile : Advanced Simple@L5
    Format settings, BVOP : 2
    Format settings, QPel : No
    Format settings, GMC : No warppoints
    Format settings, Matrix : Default (H.263)
    Codec ID : XVID
    Codec ID/Hint : XviD
    Duration : 42mn 24s
    Bit rate : 978 Kbps
    Width : 624 pixels
    Height : 352 pixels
    Display aspect ratio : 16:9
    Frame rate : 23.976 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.186
    Stream size : 296 MiB (85%)
    Writing library : XviD 1.2.1 (UTC 2008-12-04)
    Audio
    ID : 1
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Mode : Joint stereo
    Codec ID : 55
    Codec ID/Hint : MP3
    Duration : 42mn 23s
    Bit rate mode : Variable
    Bit rate : 160 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Stream size : 49.4 MiB (14%)
    Alignment : Aligned on interleaves
    Interleave, duration : 24 ms (0.58 video frame)
    Writing library : LAME3.90.
    Encoding settings : -m j -V 4 -q 2 -lowpass 18 --abr 160
    And its very same but with external subtitles :
    -rw-r--r-- 1 svc-pms svc-pms 77159 Oct 12 12:57 test with subs.srt
    -rw-rw-r-- 1 svc-pms svc-pms 366711578 Oct 23 10:50 test with subs.avi
    MediaInfo output, just to acknowledge it is the same file, but with a different name
    General
    Complete name : test with subs.avi
    Format : AVI
    Format/Info : Audio Video Interleave
    File size : 350 MiB
    Duration : 42mn 24s
    Overall bit rate : 1 153 Kbps
    Writing application : transcode-1.0.6
    Video
    ID : 0
    Format : MPEG-4 Visual
    Format profile : Advanced Simple@L5
    Format settings, BVOP : 2
    Format settings, QPel : No
    Format settings, GMC : No warppoints
    Format settings, Matrix : Default (H.263)
    Codec ID : XVID
    Codec ID/Hint : XviD
    Duration : 42mn 24s
    Bit rate : 978 Kbps
    Width : 624 pixels
    Height : 352 pixels
    Display aspect ratio : 16:9
    Frame rate : 23.976 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.186
    Stream size : 296 MiB (85%)
    Writing library : XviD 1.2.1 (UTC 2008-12-04)
    Audio
    ID : 1
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Mode : Joint stereo
    Codec ID : 55
    Codec ID/Hint : MP3
    Duration : 42mn 23s
    Bit rate mode : Variable
    Bit rate : 160 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Stream size : 49.4 MiB (14%)
    Alignment : Aligned on interleaves
    Interleave, duration : 24 ms (0.58 video frame)
    Writing library : LAME3.90.
    Encoding settings : -m j -V 4 -q 2 -lowpass 18 --abr 160
    A- I tried playing the AVI file without external subtitles and it is working fine. 
    /var/log/pms.log :
    GUI environment not available
    Switching to console mode
    [main] TRACE 06:17:02.228 Starting PS3 Media Server 1.21.0
    [main] TRACE 06:17:02.237 by shagrath / 2008-2011
    [main] TRACE 06:17:02.237 http://ps3mediaserver.org
    [main] TRACE 06:17:02.237 http://ps3mediaserver.blogspot.com
    [main] TRACE 06:17:02.238 http://code.google.com/p/ps3mediaserver
    [main] TRACE 06:17:02.238
    [main] TRACE 06:17:02.238 Java: 1.6.0_22-Sun Microsystems Inc.
    [main] TRACE 06:17:02.238 OS: Linux amd64 2.6.37-ARCH
    [main] TRACE 06:17:02.238 Encoding: UTF-8
    [main] TRACE 06:17:02.238 PMS.conf: /filers/fvEXT3-01/_applications_/opt/pms/PMS.conf
    [main] TRACE 06:17:02.238 Working directory: /filers/fvEXT3-01/_applications_/opt/pms
    [main] TRACE 06:17:02.245 Temp folder: /tmp/ps3mediaserver
    [main] TRACE 06:17:02.652 Loading configuration file: FreeboxHD.conf
    [main] TRACE 06:17:02.662 Loading configuration file: XBMC.conf
    [main] TRACE 06:17:02.666 Loading configuration file: FreecomMusicPal.conf
    [main] TRACE 06:17:02.669 Loading configuration file: XBOX360.conf
    [main] TRACE 06:17:02.685 Loading configuration file: PS3.conf
    [main] TRACE 06:17:02.705 Loading configuration file: Streamium.conf
    [main] TRACE 06:17:02.708 Loading configuration file: WDTVLive.conf
    [main] TRACE 06:17:02.710 Loading configuration file: N900.conf
    [main] TRACE 06:17:02.712 Loading configuration file: Philips.conf
    [main] TRACE 06:17:02.715 Loading configuration file: Bravia4500.conf
    [main] TRACE 06:17:02.718 Loading configuration file: WMP.conf
    [main] TRACE 06:17:02.720 Loading configuration file: Samsung.conf
    [main] TRACE 06:17:02.722 Loading configuration file: Bravia5500.conf
    [main] TRACE 06:17:02.724 Loading configuration file: Realtek.conf
    [main] TRACE 06:17:02.726 Loading configuration file: Kuro.conf
    [main] TRACE 06:17:02.729 Loading configuration file: Android.conf
    [main] TRACE 06:17:02.731 Loading configuration file: BraviaEX.conf
    [main] TRACE 06:17:02.734 Loading configuration file: PopcornHour.conf
    [main] TRACE 06:17:02.736 Checking font cache... launching simple instance of MPlayer... You may have to wait 60 seconds!
    [main] TRACE 06:17:04.173 Done!
    [main] TRACE 06:17:04.210 Loading plugins from /filers/fvEXT3-01/_applications_/opt/pms/plugins
    [main] TRACE 06:17:04.227 No plugins found
    [main] TRACE 06:17:04.257 Registering transcoding engine FFmpeg Audio
    [main] TRACE 06:17:04.300 Registering transcoding engine MEncoder
    [main] TRACE 06:17:04.300 Registering transcoding engine MPlayer Audio
    [main] TRACE 06:17:04.301 Registering transcoding engine MEncoder Web
    [main] TRACE 06:17:04.301 Registering transcoding engine MPlayer Video Dump
    [main] TRACE 06:17:04.301 Registering transcoding engine MPlayer Web
    [main] TRACE 06:17:04.303 Registering transcoding engine TsMuxer
    [main] TRACE 06:17:04.303 Registering transcoding engine Audio High Fidelity
    [main] TRACE 06:17:04.303 Registering transcoding engine VLC Audio Streaming
    [main] TRACE 06:17:04.304 Registering transcoding engine VLC Video Streaming
    [main] TRACE 06:17:04.304 Registering transcoding engine Raws Thumbnailer
    [main] TRACE 06:17:04.401 Scanning network interface eth0 / eth0
    [main] TRACE 06:17:04.403 Using address /192.168.0.20 found on network interface: name:eth0 (eth0) index: 2 addresses: /192.168.0.20;
    [main] TRACE 06:17:04.403 Created socket: /192.168.0.20:5001
    [main] TRACE 06:17:04.548 Using database located at : /filers/fvEXT3-01/_applications_/opt/pms/database
    [main] TRACE 06:17:04.930 A tiny media library admin interface is available at: http://192.168.0.20:5001/console/home
    [main] TRACE 06:17:05.001 Using the following UUID: d83f2e45-d8b8-3db7-b0ff-a6fc95ce046c
    [New I/O server worker #1-1] TRACE 06:17:08.787 Renderer Playstation 3 found on this address: /192.168.0.15
    [main] TRACE 06:17:09.902 It's ready! You should see the server appear on the XMB
    [New I/O server worker #1-1] TRACE 06:17:10.794 Renderer Playstation 3 has an estimated network speed of: 93 Mb/s
    /opt/pms/debug.log :
    available at : http://dpaste.org/774i/
    B - I tried playing the AVI file with external subtitles (SRT) and the file is playing with subtitles but no sound :-(
    /var/log/pms.log :
    GUI environment not available
    Switching to console mode
    [main] TRACE 06:20:24.967 Starting PS3 Media Server 1.21.0
    [main] TRACE 06:20:24.968 by shagrath / 2008-2011
    [main] TRACE 06:20:24.968 http://ps3mediaserver.org
    [main] TRACE 06:20:24.968 http://ps3mediaserver.blogspot.com
    [main] TRACE 06:20:24.968 http://code.google.com/p/ps3mediaserver
    [main] TRACE 06:20:24.969
    [main] TRACE 06:20:24.969 Java: 1.6.0_22-Sun Microsystems Inc.
    [main] TRACE 06:20:24.969 OS: Linux amd64 2.6.37-ARCH
    [main] TRACE 06:20:24.969 Encoding: UTF-8
    [main] TRACE 06:20:24.969 PMS.conf: /filers/fvEXT3-01/_applications_/opt/pms/PMS.conf
    [main] TRACE 06:20:24.969 Working directory: /filers/fvEXT3-01/_applications_/opt/pms
    [main] TRACE 06:20:24.973 Temp folder: /tmp/ps3mediaserver
    [main] TRACE 06:20:25.038 Loading configuration file: FreeboxHD.conf
    [main] TRACE 06:20:25.040 Loading configuration file: XBMC.conf
    [main] TRACE 06:20:25.041 Loading configuration file: FreecomMusicPal.conf
    [main] TRACE 06:20:25.044 Loading configuration file: XBOX360.conf
    [main] TRACE 06:20:25.047 Loading configuration file: PS3.conf
    [main] TRACE 06:20:25.055 Loading configuration file: Streamium.conf
    [main] TRACE 06:20:25.057 Loading configuration file: WDTVLive.conf
    [main] TRACE 06:20:25.059 Loading configuration file: N900.conf
    [main] TRACE 06:20:25.061 Loading configuration file: Philips.conf
    [main] TRACE 06:20:25.063 Loading configuration file: Bravia4500.conf
    [main] TRACE 06:20:25.065 Loading configuration file: WMP.conf
    [main] TRACE 06:20:25.068 Loading configuration file: Samsung.conf
    [main] TRACE 06:20:25.069 Loading configuration file: Bravia5500.conf
    [main] TRACE 06:20:25.071 Loading configuration file: Realtek.conf
    [main] TRACE 06:20:25.073 Loading configuration file: Kuro.conf
    [main] TRACE 06:20:25.076 Loading configuration file: Android.conf
    [main] TRACE 06:20:25.077 Loading configuration file: BraviaEX.conf
    [main] TRACE 06:20:25.080 Loading configuration file: PopcornHour.conf
    [main] TRACE 06:20:25.082 Checking font cache... launching simple instance of MPlayer... You may have to wait 60 seconds!
    [main] TRACE 06:20:25.144 Done!
    [main] TRACE 06:20:25.153 Loading plugins from /filers/fvEXT3-01/_applications_/opt/pms/plugins
    [main] TRACE 06:20:25.153 No plugins found
    [main] TRACE 06:20:25.160 Registering transcoding engine FFmpeg Audio
    [main] TRACE 06:20:25.166 Registering transcoding engine MEncoder
    [main] TRACE 06:20:25.167 Registering transcoding engine MPlayer Audio
    [main] TRACE 06:20:25.167 Registering transcoding engine MEncoder Web
    [main] TRACE 06:20:25.167 Registering transcoding engine MPlayer Video Dump
    [main] TRACE 06:20:25.168 Registering transcoding engine MPlayer Web
    [main] TRACE 06:20:25.169 Registering transcoding engine TsMuxer
    [main] TRACE 06:20:25.169 Registering transcoding engine Audio High Fidelity
    [main] TRACE 06:20:25.170 Registering transcoding engine VLC Audio Streaming
    [main] TRACE 06:20:25.170 Registering transcoding engine VLC Video Streaming
    [main] TRACE 06:20:25.170 Registering transcoding engine Raws Thumbnailer
    [main] TRACE 06:20:25.223 Scanning network interface eth0 / eth0
    [main] TRACE 06:20:25.224 Using address /192.168.0.20 found on network interface: name:eth0 (eth0) index: 2 addresses: /192.168.0.20;
    [main] TRACE 06:20:25.224 Created socket: /192.168.0.20:5001
    [main] TRACE 06:20:25.279 Using database located at : /filers/fvEXT3-01/_applications_/opt/pms/database
    [main] TRACE 06:20:26.010 A tiny media library admin interface is available at: http://192.168.0.20:5001/console/home
    [main] TRACE 06:20:26.017 Using the following UUID: d83f2e45-d8b8-3db7-b0ff-a6fc95ce046c
    [New I/O server worker #1-1] TRACE 06:20:28.867 Renderer Playstation 3 found on this address: /192.168.0.15
    [New I/O server worker #1-1] TRACE 06:20:30.872 Renderer Playstation 3 has an estimated network speed of: 93 Mb/s
    [main] TRACE 06:20:32.488 It's ready! You should see the server appear on the XMB
    [New I/O server worker #1-6] TRACE 06:20:56.875 Starting transcode/remux of test with subs.avi
    So, obviously here, the only thing which changes from before was that, this time, the PS3 Media Server did a transcode/remux of the file (for the subtitles to be streamed)
    /opt/pms/debug.log :
    available at : http://dpaste.org/6XMI/
    I have pasted the complete debug.log but I believe the problem is around this :
    [New I/O server worker #1-6] DEBUG 06:20:56.874 Opened request handler on socket /192.168.0.15:64494 // Playstation 3
    [New I/O server worker #1-6] DEBUG 06:20:56.874 Request: HTTP/1.0 : HEAD : get/0$0$4$0/test+with+subs.avi
    [New I/O server worker #1-6] DEBUG 06:20:56.874 Received on socket: Accept-Encoding: identity
    [New I/O server worker #1-6] DEBUG 06:20:56.874 Received on socket: Cache-Control: no-cache
    [New I/O server worker #1-6] DEBUG 06:20:56.874 Received on socket: Connection: close
    [New I/O server worker #1-6] DEBUG 06:20:56.874 Received on socket: Host: 192.168.0.20:5001
    [New I/O server worker #1-6] DEBUG 06:20:56.874 Received on socket: User-Agent: PLAYSTATION 3
    [New I/O server worker #1-6] INFO 06:20:56.874 HTTP: get/0$0$4$0/test+with+subs.avi / 0-0
    [New I/O server worker #1-6] DEBUG 06:20:56.874 Searching for objectId: 0$0$4$0 with children option: false
    [New I/O server worker #1-6] DEBUG 06:20:56.875 Asked stream chunk [0-0] timeseek: 0.0 of test with subs.avi and player MEncoder
    [New I/O server worker #1-6] TRACE 06:20:56.875 Starting transcode/remux of test with subs.avi
    [New I/O server worker #1-6] DEBUG 06:20:56.875 Looking for an audio track with lang: eng
    [New I/O server worker #1-6] DEBUG 06:20:56.883 Looking for an audio track with lang: fre
    [New I/O server worker #1-6] DEBUG 06:20:56.884 Looking for an audio track with lang: jpn
    [New I/O server worker #1-6] DEBUG 06:20:56.886 Looking for an audio track with lang: ger
    [New I/O server worker #1-6] DEBUG 06:20:56.887 Looking for an audio track with lang: und
    [New I/O server worker #1-6] DEBUG 06:20:56.888 Matched audio track: Audio: MP3 / lang: und / ID: 1
    [New I/O server worker #1-6] DEBUG 06:20:56.888 Search a match for: und with fre and off
    [New I/O server worker #1-6] DEBUG 06:20:56.889 Search a match for: und with fr and off
    [New I/O server worker #1-6] DEBUG 06:20:56.889 Search a match for: und with eng and off
    [New I/O server worker #1-6] DEBUG 06:20:56.890 Search a match for: und with en and off
    [New I/O server worker #1-6] DEBUG 06:20:56.891 Found subtitles track: Sub: SubRip / lang: und / ID: 100 / FILE: /srv/shares/test_with_sub/test with subs.srt
    [New I/O server worker #1-6] DEBUG 06:20:56.891 Found external file: /srv/shares/test_with_sub/test with subs.srt
    [New I/O server worker #1-6] DEBUG 06:20:56.892 channels=2
    [mkfifo] INFO 06:20:56.979 Starting mkfifo --mode=777 /tmp/ps3mediaserver/mencoder1300252856978
    [mkfifo] INFO 06:20:56.995 Unix process ID (mkfifo): 4390
    [mencoder] INFO 06:20:57.029 Starting mencoder -ss 0 -quiet /srv/shares/test_with_sub/test with subs.avi -quiet -quiet -oac lavc -of mpeg -quiet -quiet -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 2 -lavdopts debug=0:threads=4 -lavcopts autoaspect=1:vcodec=mpeg2video:acodec=ac3:abitrate=256:threads=4:keyint=1:vqscale=1:vqmin=2 -spuaa 3 -subfont-text-scale 3 -subfont-outline 1 -subfont-blur 1 -subpos 98 -quiet -quiet -sid 100 -quiet -quiet -ofps 24000/1001 -sub /srv/shares/test_with_sub/test with subs.srt -utf8 -mc 0 -noskip -af lavcresample=48000 -srate 48000 -o /tmp/ps3mediaserver/mencoder1300252856978
    [mencoder] INFO 06:20:57.048 Reading pipe: /tmp/ps3mediaserver/mencoder1300252856978
    [mencoder] DEBUG 06:20:57.049 Opening file /tmp/ps3mediaserver/mencoder1300252856978 for reading...
    [New I/O server worker #1-6] DEBUG 06:20:57.129 Sleeping for 6000 milliseconds
    [mencoder] INFO 06:20:57.395 Attaching thread: mencoder
    [Timer-1] DEBUG 06:20:57.396 Buffered Space: 0 bytes / inputs: 0
    [mencoder] INFO 06:20:57.396 Unix process ID (mencoder): 4395
    [Thread-30] DEBUG 06:20:57.396 MEncoder SVN-r32792-4.5.2 (C) 2000-2011 MPlayer Team
    [Thread-30] DEBUG 06:20:57.397 161 audio & 351 video codecs
    [Thread-30] DEBUG 06:20:57.397 success: format: 0 data: 0x0 - 0x15db931a
    [Thread-30] DEBUG 06:20:57.397 AVI file format detected.
    [Thread-30] DEBUG 06:20:57.397 [aviheader] Video stream found, -vid 0
    [Thread-30] DEBUG 06:20:57.397 [aviheader] Audio stream found, -aid 1
    [Thread-30] DEBUG 06:20:57.397 VIDEO: [XVID] 624x352 24bpp 23.976 fps 977.5 kbps (119.3 kbyte/s)
    [Thread-30] DEBUG 06:20:57.397 [V] filefmt:3 fourcc:0x44495658 size:624x352 fps:23.976 ftime:=0.0417
    [Thread-30] DEBUG 06:20:57.397 ==========================================================================
    [Thread-30] DEBUG 06:20:57.397 Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
    [Thread-30] DEBUG 06:20:57.397 AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
    [Thread-30] DEBUG 06:20:57.397 Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
    [Thread-30] DEBUG 06:20:57.397 ==========================================================================
    [Thread-30] DEBUG 06:20:57.397 PACKET SIZE: 2048 bytes, deltascr: 884
    [Thread-30] DEBUG 06:20:57.397 Opening video filter: [expand osd=1]
    [Thread-30] DEBUG 06:20:57.397 Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    [Thread-30] DEBUG 06:20:57.397 ==========================================================================
    [Thread-30] DEBUG 06:20:57.397 Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    [Thread-30] DEBUG 06:20:57.403 Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
    [Thread-30] DEBUG 06:20:57.403 ==========================================================================
    [Thread-27] DEBUG 06:20:57.403 [ac3 @ 0xd37ca0]No channel layout specified. The encoder will guess the layout, but it might be incorrect.
    [Thread-27] DEBUG 06:20:57.437 Limiting audio preload to 0.4s.
    [Thread-27] DEBUG 06:20:57.437 Increasing audio density to 4.
    [Thread-30] DEBUG 06:20:57.463 Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
    [Thread-30] DEBUG 06:20:57.463 videocodec: libavcodec (624x352 fourcc=3267706d [mpg2])
    [Thread-30] DEBUG 06:20:57.463 [VE_LAVC] Using constant qscale = 1.000000 (VBR).
    [Thread-30] DEBUG 06:20:57.617 Writing header...
    [Timer-1] DEBUG 06:20:59.396 Buffered Space: 26595328 bytes / inputs: 0
    [Thread-28] DEBUG 06:21:01.227 freeMemory: 25791584
    [Thread-28] DEBUG 06:21:01.227 totalMemory: 81592320
    [Thread-28] DEBUG 06:21:01.228 maxMemory: 715849728
    [Thread-28] DEBUG 06:21:01.228 Extending buffer to 419430400
    [Timer-1] DEBUG 06:21:01.397 Buffered Space: 49999872 bytes / inputs: 0
    [Thread-28] DEBUG 06:21:01.726 Done extending
    Thing is, I do not have the same issue with files that are not (yet) MP3-Audio powered, for instance :
    General
    Complete name : /srv/shares/media03/directories/toto.avi
    Format : AVI
    Format/Info : Audio Video Interleave
    Format profile : OpenDML
    Format settings : rec
    File size : 1.59 GiB
    Duration : 1h 46mn
    Overall bit rate : 2 140 Kbps
    Writing application : AVI-Mux GUI 1.17.8.3, Feb 16 201019:42:50
    Video
    ID : 0
    Format : MPEG-4 Visual
    Format profile : Advanced Simple@L5
    Format settings, BVOP : 2
    Format settings, QPel : Yes
    Format settings, GMC : No warppoints
    Format settings, Matrix : Default (H.263)
    Codec ID : XVID
    Codec ID/Hint : XviD
    Duration : 1h 46mn
    Bit rate : 1 620 Kbps
    Width : 1 280 pixels
    Height : 544 pixels
    Display aspect ratio : 2.35:1
    Frame rate : 23.976 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.097
    Stream size : 1.20 GiB (76%)
    Writing library : XviD 1.2.1 (UTC 2008-12-04)
    Audio #1
    ID : 1
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Codec ID : 2000
    Duration : 1h 46mn
    Bit rate mode : Constant
    Bit rate : 384 Kbps
    Channel(s) : 6 channels
    Channel positions : Front: L C R, Side: L R, LFE
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Stream size : 292 MiB (18%)
    Alignment : Aligned on interleaves
    Interleave, duration : 64 ms (1.53 video frames)
    Interleave, preload duration : 192 ms
    Title : UW 6ch audio
    Audio #2
    ID : 2
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Codec ID : 2000
    Duration : 1h 46mn
    Bit rate mode : Constant
    Bit rate : 128 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Stream size : 97.4 MiB (6%)
    Alignment : Aligned on interleaves
    Interleave, duration : 64 ms (1.53 video frames)
    Interleave, preload duration : 192 ms
    Title : UW 2ch audio
    This file is well played by PS3 Media Server.
    I am quite confused with this issue ; did anyone experienced the same thing ?
    Best Regards,

    Having the same problem. I'm watching all of my movies without subs now, because transcoding kills the 5.1 audio (no problems with 2 channel audio). A workaround is posted in the comments of the pms-svn package.
    I will post the URL to this thread to another thread with probably the same problem (mplayer/x264). I have not yet seen a real solution to this, and I'm not really familiar with the bugzilla's from both projects.
    Other threads with similar problems:
    https://bbs.archlinux.org/viewtopic.php?id=112219 (devede also uses mplayer and x264)
    https://bugs.archlinux.org/task/22654 (related bug in Archlinux)
    http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1865 (related bug in mplayer)
    https://bbs.archlinux.org/viewtopic.php?id=115165 (this thread)
    Another workaround might be to trick pms into using ffmpeg or vlc rather than mencoder. I'm also streaming to a ps3 - I didn't try it, but it could be as easy as temporarily changing settings inside the profile for a ps3-client.
    Last edited by zenlord (2011-03-22 16:15:38)

  • USING INDEXES DEFINED ON TABLES IN SELECT STATEMENTS

    Hi there,
    I would like to ask a simple question, how i can use indexes defined on certain columns on one of my database tables in a select clause:
    table name: B2TECDOC
    schema name: AWDBT1M4
    indexes defined: AWDBT1M4.B2TECDOC_B2TECDOCKEY
    index AWDBT1M4.B2TECDOC_B2TECDOCKEY is defined on columns:
    documentname
    documenttype
    organizationid
    organizationtype
    revision
    sequence
    versionnumbercould you help me construct a select sql using this index?
    another question is will using this index in my select clause increase the overall query performance?
    thanks
    rohan

    A query like
    SELECT *
      FROM AWDBT1M4.B2TECDOC
    WHERE documentname = <<some value>>
       AND documenttype = <<some value>
       AND organizationid = <<some value>>
       AND organizationtype = <<some value>>
       AND revision = <<some value>>
       AND sequence = <<some value>>
       AND versionnumber = <<some value>>should use the index.
    An index is a more efficient way to access a relatively small fraction of the rows in the table. A table scan will be more efficient if you are trying to access a relatively large fraction of the rows in the table. Exactly what "small fraction" and "large fraction" means will depend on a variety of factors that the cost-based optimizer (CBO) attempts to evaluate in determing the query plan.
    Justin

  • Forcing to use index

    I have a query which is taking 2 minutes to respond. When I see the explain plan, it said for two tables it is doing the full table scan. So I tried forcing to use the index on the inner tables(xcm, detail) of the views(vw_xcm , vw_vw_detail). But it is still not using indexes when the query is running. Please let me know if I am forcing the indexes right.
    Here is my code
    SELECT x.customer_gci AS hdr_borrower_gci,
                    x.industry_group_name AS hdr_borrower_sector,
                    x.industry_subgroup_name AS hdr_borrower_industry,
                    CAST (NULL AS number) AS hdr_incremental_fvo_amt,
                    x.industry_subgroup_code AS hdr_industry_cd,
                    x.industry_subgroup_name AS hdr_industry,
                    CAST (NULL AS integer) AS hdr_cds_tenor,
                    x.industry_group_code AS hdr_req_borrower_sector_cd,
                    x.industry_subgroup_code AS hdr_req_borrower_industry_cd,
                    x.customer_gci AS dtl_borrower_gci,
                    x.customer_name AS dtl_company_name,
                    (SELECT NVL (MAX (market_cap), 0)
                     FROM data_v2 kmv
                     WHERE     kmv.asof_date = (SELECT MAX (actual_data_date)
                                                FROM fvo_process_dtl dtl
                                                WHERE dtl.process_name = 'KMV')
                           AND kmv.spineid = x.spineid
                           AND kmv.market_cap <> 0)
                       AS dtl_marketcap,
                    x.industry_subgroup_name AS dtl_industry,
                    x.dtl_region,
                    (SELECT SUM (NVL (notional, 0))
                     FROM vw_gcm
                     WHERE     datestamp = (SELECT MAX (datestamp)
                                            FROM vw_fvo_gcm_trade)
                           AND familygci = family_gci
                           AND rpt_product = 'LOAN'
                           AND rpt_risk_group = 'FVO')
                       AS dtl_current_fvo_amt,
                    NULL AS dtl_trader_liquidity_cd,
                    CAST (NULL AS number) AS dtl_manager_acceptable_amt,
                    NULL AS dtl_lastused_date,
                    NULL AS dtl_trader_comments,
                    NULL AS dtl_manager_comments,
                    CAST (NULL AS number) AS dtl_incremental_fvo_amt,
                    x.industry_subgroup_code AS dtl_industry_code,
                    x.spineid,
                    (SELECT SUBSTR (MAX(TO_CHAR (ratingdate, 'YYYYMMDD')
                                        || iss.issuerrating),
                                    9
                     FROM issuerrating iss
                     WHERE iss.ratingschemeid =
                              (SELECT rs.ratingschemeid
                               FROM ratingscheme rs
                               WHERE rs.ratingschemename = 'SNP')
                           AND iss.ratingtypeid = (SELECT rt.ratingtypeid
                                                   FROM ratingtype rt
                                                   WHERE rt.ratingtypecode = 'LT')
                           AND iss.ratingdate <= TRUNC (SYSDATE)
                           AND iss.issuerrating NOT IN
                                    ('NR',
                                     'WR',
                                     'SD',
                                     'NM',
                                     'NRpi',
                                     'Rpi',
                                     'R',
                                     'SDpi')
                           AND iss.spineid = x.spineid)
                       AS dtl_snp_rating,
                    (SELECT SUBSTR (MAX(TO_CHAR (ratingdate, 'YYYYMMDD')
                                        || iss.issuerrating),
                                    9
                     FROM rating iss
                     WHERE iss.ratingschemeid =
                              (SELECT rs.ratingschemeid
                               FROM rating rs
                               WHERE rs.ratingschemename = 'MOODYS')
                           AND iss.ratingtypeid = (SELECT rt.ratingtypeid
                                                   FROM ratingtype rt
                                                   WHERE rt.ratingtypecode = 'LT')
                           AND iss.ratingdate <= TRUNC (SYSDATE)
                           AND iss.issuerrating NOT IN ('NR', 'WR', 'SD')
                           AND iss.spineid = x.spineid)
                       AS dtl_moodys_rating,
                    risk_rating AS dtl_internal_rating
             FROM (SELECT /* + INDEX(xcm fvo_xcm_customer_ix3) INDEX(id fvo_ecris_d_industry_dtl_ix1)*/ xcm.customer_gci AS customer_gci,
                          xcm.customer_name AS customer_name,
                          TRIM (REPLACE (id.industry_group_name, '"', ' '))
                             AS industry_group_name,
                          id.industry_group_code,
                          TRIM (REPLACE (id.industry_subgroup_name, '"', ' '))
                             AS industry_subgroup_name,
                          id.industry_subgroup_code,
                          TRIM (REPLACE (id.industry_subgroup_name, '"', ' '))
                             AS dtl_industry,
                          (SELECT threealphacountrycode
                           FROM xcm_region_country_map r
                           WHERE     r.twoalphacountrycode = xcm.country_code
                                 AND r.regioncode != 'INTL'
                                 AND r.region IN ('North American', 'EMEA'))
                             AS dtl_region,
                          (SELECT spineid
                           FROM companymap cm
                           WHERE     cm.sourcereferenceid = 24
                                 AND cm.sourcereferencevalue = xcm.customer_gci
                                 AND cm.enddate IS NULL)
                             AS spineid,
                          xcm.family_gci AS family_gci,
                          xcm.risk_rating AS risk_rating
                   FROM vw_xcm xcm,
                        (SELECT naics_code,
                                industry_group_name,
                                industry_group_code,
                                industry_subgroup_name,
                                industry_subgroup_code
                         FROM vw_detail
                         WHERE industry_subgroup_code IS NOT NULL) id
                   WHERE     xcm.period = (SELECT MAX (period)
                                           FROM vw_xcm)
                         --                                  AND xcm.industry_detail_key =
                         --                                        id.industry_detail_key
                         AND xcm.naics_code = id.naics_code
                        AND TRIM (xcm.customer_gci) NOT LIKE 'S%') x
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Sometimes the cost-based optimizer will not take hints because it thinks it knows better. This is a matter of debate here on OTN, where some posters dogmatically assert that hints are instructions that must be followed. My experience is different. I have on rare occasions used perfectly good hints (usually INDEX) that the database simply refused to use.
    Someone noted on a post a month or two ago that there may be a glitch with the CBO where it loses indexes when considering execution plans. This was based on a 10053 trace, which will show the different access paths considered during query evaluation.
    Ultimately the CBO is deciding you query is more efficient not to use the indexes, even with your hint.
    Looking again at your query I'll note that it is very complicated with inline views and more inline views. The CBO has trouble running multiple views efficiently - inline views, views of views, views joined to views - because views have no valid statistics associated with them. The choices the CBO makes based on views use defaults that are all but certain to be incorrect.
    In particular, your index use for "id" makes no sense because it is an inline view. you could try using a global hint by pushing the hint inside the view, something like
    INDEX(id.table_in_view fvo_ecris_d_industry_dtl_ix1)Unfortunately, the table inside the inline view id itself appears to be a view compliating this effort.
    Try using the USE_NL hint instead of INDEX and see if that helps
    Good luck

  • Jvm 1.5.0_06 crashing while used in tomcat as service

    ANyone ever seen this one.
    JVM crashes while used by tomcat as service. The crash occurs randomly. In this case while writing an index for lucene. Lucene is used within our jackrabbit application. This crash caused the index en thus the data in jackrabbit to become corrupt. All content of repository was therefor useless.
    Tomcat 5.5.17 is installed on a windows 2003 server.
    Does anyone know the cause of this crash. See hs_errpidx.og file below
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6da727b6, pid=1132, tid=1160
    # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode)
    # Problematic frame:
    # V [jvm.dll+0x1f27b6]
    --------------- T H R E A D ---------------
    Current thread (0x26b175d8): JavaThread "CompilerThread0" daemon [_thread_in_native, id=1160]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000000
    Registers:
    EAX=0x272bf5c4, EBX=0x26dcf1b0, ECX=0x00000000, EDX=0x6db74d28
    ESP=0x26dcf15c, EBP=0x272c1424, ESI=0x272c0d1c, EDI=0x272c0cd8
    EIP=0x6da727b6, EFLAGS=0x00010246
    Top of Stack: (sp=0x26dcf15c)
    0x26dcf15c: 272c0cd8 272c0d1c 6da728bd 272bf5a4
    0x26dcf16c: 272c1424 26dcf1b0 272c1488 00000000
    0x26dcf17c: 272c1424 26dcf280 6da72adf 272c0d1c
    0x26dcf18c: 272c1424 26dcf1b0 26dcf280 272c1424
    0x26dcf19c: 272be300 272c1424 26dcf280 00000000
    0x26dcf1ac: 278b0794 00000000 00000002 276942e0
    0x26dcf1bc: 00000000 6dac5e2f 26dcf280 00000001
    0x26dcf1cc: 0000002e 26dcf3c0 272c1424 6dac5cc7
    Instructions: (pc=0x6da727b6)
    0x6da727a6: 83 78 0c 03 0f 85 87 00 00 00 8b 40 04 8b 48 08
    0x6da727b6: 8b 11 ff 52 28 85 c0 74 78 8b 40 04 8b 08 8b 11
    Stack: [0x26d90000,0x26dd0000), sp=0x26dcf15c, free space=252k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x1f27b6]
    Current CompileTask:
    opto:2085 org.apache.lucene.index.IndexReader$1.doBody()Ljava/lang/Object; (99 bytes)
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x27f95fb8 JavaThread "IndexMerger" daemon [_thread_blocked, id=2588]
    0x2737c618 JavaThread "ObservationManager" daemon [_thread_blocked, id=2584]
    0x279fc6c8 JavaThread "IndexMerger" daemon [_thread_blocked, id=192]
    0x27c40a70 JavaThread "ObservationManager" daemon [_thread_blocked, id=1796]
    0x27c40bf8 JavaThread "File Reaper" daemon [_thread_blocked, id=548]
    0x29488c20 JavaThread "IndexMerger" daemon [_thread_blocked, id=2288]
    0x28b8a008 JavaThread "ObservationManager" daemon [_thread_blocked, id=2268]
    0x27ee5e28 JavaThread "TP-Monitor" daemon [_thread_blocked, id=1392]
    0x29427008 JavaThread "TP-Processor4" daemon [_thread_in_native, id=1208]
    0x27641e50 JavaThread "TP-Processor3" daemon [_thread_blocked, id=1320]
    0x27749e08 JavaThread "TP-Processor2" daemon [_thread_blocked, id=2020]
    0x277de008 JavaThread "TP-Processor1" daemon [_thread_blocked, id=1916]
    0x270005e0 JavaThread "http-8080-Monitor" [_thread_blocked, id=1808]
    0x26bff010 JavaThread "http-8080-Processor25" daemon [_thread_in_native, id=1100]
    0x276345a0 JavaThread "http-8080-Processor24" daemon [_thread_blocked, id=1840]
    0x28e82820 JavaThread "http-8080-Processor23" daemon [_thread_blocked, id=1136]
    0x26bb5848 JavaThread "http-8080-Processor22" daemon [_thread_blocked, id=1452]
    0x26f000c0 JavaThread "http-8080-Processor21" daemon [_thread_blocked, id=1460]
    0x26bb4820 JavaThread "http-8080-Processor20" daemon [_thread_blocked, id=1456]
    0x29617648 JavaThread "http-8080-Processor19" daemon [_thread_blocked, id=296]
    0x28af65d0 JavaThread "http-8080-Processor18" daemon [_thread_blocked, id=300]
    0x291b4790 JavaThread "http-8080-Processor17" daemon [_thread_blocked, id=1660]
    0x28b1a7f0 JavaThread "http-8080-Processor16" daemon [_thread_blocked, id=1340]
    0x28b1a5c8 JavaThread "http-8080-Processor15" daemon [_thread_blocked, id=1076]
    0x276ca838 JavaThread "http-8080-Processor14" daemon [_thread_blocked, id=1332]
    0x291bd6b8 JavaThread "http-8080-Processor13" daemon [_thread_blocked, id=1008]
    0x29657630 JavaThread "http-8080-Processor12" daemon [_thread_blocked, id=1028]
    0x29657408 JavaThread "http-8080-Processor11" daemon [_thread_blocked, id=1764]
    0x290197a8 JavaThread "http-8080-Processor10" daemon [_thread_blocked, id=580]
    0x279d2d50 JavaThread "http-8080-Processor9" daemon [_thread_blocked, id=304]
    0x27557600 JavaThread "http-8080-Processor8" daemon [_thread_blocked, id=204]
    0x27150d60 JavaThread "http-8080-Processor7" daemon [_thread_blocked, id=212]
    0x27150a00 JavaThread "http-8080-Processor6" daemon [_thread_blocked, id=232]
    0x27150740 JavaThread "http-8080-Processor5" daemon [_thread_blocked, id=1980]
    0x29869be8 JavaThread "http-8080-Processor4" daemon [_thread_blocked, id=2004]
    0x29869a60 JavaThread "http-8080-Processor3" daemon [_thread_blocked, id=2044]
    0x298698d8 JavaThread "http-8080-Processor2" daemon [_thread_blocked, id=1992]
    0x290a5ab0 JavaThread "http-8080-Processor1" daemon [_thread_blocked, id=1988]
    0x2926b408 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=1924]
    0x290741e8 JavaThread "RMI TCP Accept-2099" daemon [_thread_in_native, id=1020]
    0x29063df0 JavaThread "GC Daemon" daemon [_thread_blocked, id=1752]
    0x29488228 JavaThread "RMI Reaper" [_thread_blocked, id=1220]
    0x2912dc50 JavaThread "Timer-2" daemon [_thread_blocked, id=692]
    0x274ce768 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=928]
    0x2796ce48 JavaThread "IndexMerger" daemon [_thread_blocked, id=520]
    0x27181e58 JavaThread "Timer-1" daemon [_thread_blocked, id=504]
    0x27546e48 JavaThread "Timer-0" daemon [_thread_blocked, id=484]
    0x274cc618 JavaThread "ObservationManager" daemon [_thread_blocked, id=444]
    0x27469a38 JavaThread "derby.rawStoreDaemon" daemon [_thread_blocked, id=188]
    0x2720ab98 JavaThread "derby.antiGC" daemon [_thread_blocked, id=1432]
    0x26b452d0 JavaThread "Thread-1" [_thread_in_native, id=2016]
    0x26b19750 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1928]
    0x26b183a8 JavaThread "CompilerThread1" daemon [_thread_blocked, id=1828]
    =>0x26b175d8 JavaThread "CompilerThread0" daemon [_thread_in_native, id=1160]
    0x26b166a0 JavaThread "AdapterThread" daemon [_thread_blocked, id=1296]
    0x0082f730 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1164]
    0x0082ce90 JavaThread "Finalizer" daemon [_thread_blocked, id=1692]
    0x0082c1f0 JavaThread "Reference Handler" daemon [_thread_blocked, id=460]
    0x003c5a50 JavaThread "main" [_thread_in_native, id=1468]
    Other Threads:
    0x0082a050 VMThread [id=1276]
    0x26b1aa68 WatcherThread [id=2012]
    VM state:at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x003c5170/0x0000013c] Threads_lock - owner thread: 0x0082a050
    [0x003c52f0/0x00000178] Heap_lock - owner thread: 0x26bb5848
    Heap
    PSYoungGen total 47936K, used 32542K [0x22f50000, 0x26830000, 0x26830000)
    eden space 38016K, 65% used [0x22f50000,0x2477cbd8,0x25470000)
    from space 9920K, 78% used [0x25e70000,0x2660adc0,0x26820000)
    to space 10112K, 10% used [0x25470000,0x255840c0,0x25e50000)
    PSOldGen total 76800K, used 59040K [0x06830000, 0x0b330000, 0x22f50000)
    object space 76800K, 76% used [0x06830000,0x0a1d8068,0x0b330000)
    PSPermGen total 30080K, used 29859K [0x02830000, 0x04590000, 0x06830000)
    object space 30080K, 99% used [0x02830000,0x04558e70,0x04590000)
    Dynamic libraries:
    0x00400000 - 0x0041b000      C:\Programme\PLM\tomcat\bin\tomcat5.exe
    0x7c920000 - 0x7c9e6000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c915000      C:\WINDOWS\system32\kernel32.dll
    0x77e20000 - 0x77eb3000      C:\WINDOWS\system32\USER32.dll
    0x77bd0000 - 0x77c18000      C:\WINDOWS\system32\GDI32.dll
    0x77f30000 - 0x77fdc000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77c20000 - 0x77cbf000      C:\WINDOWS\system32\RPCRT4.dll
    0x77ec0000 - 0x77f12000      C:\WINDOWS\system32\SHLWAPI.dll
    0x77b70000 - 0x77bca000      C:\WINDOWS\system32\msvcrt.dll
    0x7c9f0000 - 0x7d1fd000      C:\WINDOWS\system32\SHELL32.dll
    0x77340000 - 0x77443000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.1830_x-ww_7AE38CCF\comctl32.dll
    0x6d880000 - 0x6dc31000      C:\Programme\PLM\jdk\jre\bin\server\jvm.dll
    0x76990000 - 0x769be000      C:\WINDOWS\system32\WINMM.dll
    0x6d2f0000 - 0x6d2f8000      C:\Programme\PLM\jdk\jre\bin\hpi.dll
    0x76a60000 - 0x76a6b000      C:\WINDOWS\system32\PSAPI.DLL
    0x76e40000 - 0x76e53000      C:\WINDOWS\system32\Secur32.dll
    0x6d6b0000 - 0x6d6bc000      C:\Programme\PLM\jdk\jre\bin\verify.dll
    0x6d370000 - 0x6d38d000      C:\Programme\PLM\jdk\jre\bin\java.dll
    0x6d6d0000 - 0x6d6df000      C:\Programme\PLM\jdk\jre\bin\zip.dll
    0x6d530000 - 0x6d543000      C:\Programme\PLM\jdk\jre\bin\net.dll
    0x71a10000 - 0x71a27000      C:\WINDOWS\system32\WS2_32.dll
    0x71a00000 - 0x71a08000      C:\WINDOWS\system32\WS2HELP.dll
    0x71930000 - 0x71972000      C:\WINDOWS\system32\mswsock.dll
    0x27b20000 - 0x27b7a000      C:\WINDOWS\system32\hnetcfg.dll
    0x718f0000 - 0x718f8000      C:\WINDOWS\System32\wshtcpip.dll
    0x6d550000 - 0x6d559000      C:\Programme\PLM\jdk\jre\bin\nio.dll
    0x68000000 - 0x6802f000      C:\WINDOWS\system32\rsaenh.dll
    0x76dc0000 - 0x76dea000      C:\WINDOWS\system32\DNSAPI.dll
    0x76e60000 - 0x76e67000      C:\WINDOWS\System32\winrnr.dll
    0x76e00000 - 0x76e2f000      C:\WINDOWS\system32\WLDAP32.dll
    0x76e70000 - 0x76e75000      C:\WINDOWS\system32\rasadhlp.dll
    VM Arguments:
    jvm_args: -Dcatalina.base=C:\Programme\PLM\tomcat -Dcatalina.home=C:\Programme\PLM\tomcat -Djava.endorsed.dirs=C:\Programme\PLM\tomcat\common\endorsed -Xmx512M vfprintf
    java_command: <unknown>
    Launcher Type: generic
    Environment Variables:
    PATH=C:\oracle\ora92\jre\1.4.2\bin\client;C:\oracle\ora92\jre\1.4.2\bin;C:\oracle\ora92\bin;C:\Programme\Oracle\jre\1.3.1\bin;C:\Programme\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 1
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free)
    vm_info: Java HotSpot(TM) Server VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 10:53:00 by "java_re" with MS VC++ 6.0

    This is a known incompatiblitly. See #5 in http://java.sun.com/j2se/1.5.0/compatibility.html

  • Using Index

    I am running a query against the table that has few million records using a column in where clause.The column has got low cardinality values (only 19 ) unique values of the millions of rows. i created a bit map index on the column. For what so ever reason the query does not use the index at all and the cost is way high in the Explain plan. I used hints to use index to improve the query which on the other hand increased the cost instead of reducing it. It looks like full table scans are lot better than indexed scans. Any suggestions on what could be done. It is a report and it needs to be tuned to reduced the execution time.
    -- Bala

    If the 19 distinct values are roughly equally likely, so any query is going to retrieve roughly 5% of the rows from the table, the CBO is likely to prefer a full-table scan because it is generally going to be quicker than doing single-block reads to get that volume of data back. If, on the other hand, the data is skewed so some values are more common that others, gathering histograms on the column and using literals rather than bind variables should allow the CBO to use an index where appropriate (i.e. to retrieve the less common results)
    Presumably, you're not presenting 5% of a few million rows to users. You're probably aggregating those results somehow. In that case, you may be able to create a materialized view that does the aggregation and is refreshed after each load (ideally it would be fast-refreshable, but that depends on logistics).
    Note as well that I'm assuming that you have some sort of data warehouse type system since you've created a bitmap index and bitmap indexes are generally incompatible with OLTP systems.
    Justin

  • Query tuning and how to force  table to use index?

    Dear Experts,
    i have two (2) question regarding performance during DRL.
    Question # 1
    There is a column name co_id in every transaction table. DBA suggest me to add [co_id='KPG'] in every clause which forces query to use index, resulting immediate processing. As an index was created for each table on the co_id column.
    Please note that co_id has constant value 'KPG' through out the table. is it make sense to add that column in where caluse like
    select a,b,c from tab1
    where a='89' and co_id='KPG'
    Question # 2
    if i am using a column name in where clause having index on it and that column is not in my column list does it restrict query for full table scan. like
    select a,b,c,d from tabletemp
    where e='ABC';
    Thanks in advance
    Edited by: Fiz Dosani on Mar 27, 2009 12:00 PM

    Fiz Dosani wrote:
    Dear Experts,
    i have two (2) question regarding performance during DRL.
    Question # 1
    There is a column name co_id in every transaction table. DBA suggest me to add [co_id='KPG'] in every clause which forces query to use index, resulting immediate processing. As an index was created for each table on the co_id column.
    Please note that co_id has constant value 'KPG' through out the table. is it make sense to add that column in where caluse like
    select a,b,c from tab1
    where a='89' and co_id='KPG'If co_id is always 'KPG' it is not needed to add this condition to the table. It would be very stupid to add an (normal) index on that column. An index is used to reduce the resultset of a query by storing the values and the rowids in a specified order. When all the values are equal and index justs makes all dml operations slower without makeing any select faster.
    And of cause the CBO is clever enough not to use such a index.
    >
    Question # 2
    if i am using a column name in where clause having index on it and that column is not in my column list does it restrict query for full table scan. like
    select a,b,c,d from tabletemp
    where e='ABC';
    Yes this is possible. However it depends from a few things.
    1) How selective this condition is. In general an index will be used when selectivity is less than 5%. This factor depends a bit on the database version. it means that when less then 5% of your rows have the value 'ABC' then an index access will be faster than the full table scan.
    2) Are the statistics up to date. The cost based optimizer (CBO) needs to know how many values are in that table, in the columns, in that index to make a good decision bout using an index access or a full table scan. Often one forgets to create statistics for freshly created data as in temptables.
    Edited by: Sven W. on Mar 27, 2009 8:53 AM

  • Query can not use index

    1,i found a sql :select userid,repute from user_attribute where
    repute>3000 order by repute desc
    cost heavily;
    SELECT STATEMENT Cost = 637
    SORT ORDER BY
    TABLE ACCESS FULL USER_ATTRIBUTE
    2,i use: select index_name from user_indexes where table_name
    = 'USER_ATTRIBUTE'
    INDEX_NAME
    IDX_USER_ATTRIBUTE_FACE
    IDX_USER_ATTRIBUTE_POWER
    IDX_USER_ATTRIBUTE_REPUTE
    IDX_USER_ATTRIBUTE_USERID
    so column repute has indexed
    3, i use CBO with analysize shema compute
    optimizer_index_caching integer 99
    optimizer_index_cost_adj integer 5
    4,i use: select /*index(IDX_USER_ATTRIBUTE_REPUTE)*/
    userid,repute from user_attribute where repute>3000 order by
    repute desc
    i got same explain plan as old
    5,why it can not use index to query,thanks.

    I think your optimizer hint syntax is wrong. you need a "+"
    sign to indicate that the comment block is an optimizer hint,
    and the table name is not optional in the index hints
    select /*+ index(user_attribute
    IDX_USER_ATTRIBUTE_REPUTE)*/
    userid,repute from user_attribute where repute>3000 order
    by
    repute desc
    also, try ...
    select /*+ index_desc(user_attribute
    IDX_USER_ATTRIBUTE_REPUTE)*/
    userid,repute from user_attribute where repute>3000
    This should order the result for you.

  • How to make sql to use index/make to query to perform better

    Hi,
    I have 2 sql query which results the same.
    But both has difference in SQL trace.
    create table test_table
    (u_id number(10),
    u_no number(4),
    s_id number(10),
    s_no number(4),
    o_id number(10),
    o_no number(4),
    constraint pk_test primary key(u_id, u_no));
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030301, 1, 1001, 1, 2001, 1);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030302, 1, 1001, 1, 2001, 2);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030303, 1, 1001, 1, 2001, 3);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030304, 1, 1001, 1, 2001, 4);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030305, 1, 1002, 1, 1001, 2);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030306, 1, 1002, 1, 1002, 1);
    commit;
    CREATE INDEX idx_test_s_id ON test_table(s_id, s_no);
    set autotrace on
    select s_id, s_no, o_id, o_no
    from test_table
    where s_id <> o_id
    and s_no <> o_no
    union all
    select o_id, o_no, s_id, s_no
    from test_table
    where s_id <> o_id
    and s_no <> o_no;
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    3 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    Statistics
    223 recursive calls
    2 db block gets
    84 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    508 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    5 sorts (memory)
    0 sorts (disk)
    8 rows processed
    -- i didnt understand why the above query is not using the index idx_test_s_id.
    -- But still it is faster
    select s_id, s_no, o_id, o_no
    from test_table
    where (u_id, u_no) in
    (select u_id, u_no from test_table
    minus
    select u_id, u_no from test_table
    where s_id = o_id
    or s_no = o_no)
    union all
    select o_id, o_no, s_id, s_no
    from test_table
    where (u_id, u_no) in
    (select u_id, u_no from test_table
    minus
    select u_id, u_no from test_table
    where s_id = o_id
    or s_no = o_no);
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=16 Card=2 Bytes=156)
    1 0 UNION-ALL
    2 1 FILTER
    3 2 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=6 Bytes=468)
    4 2 MINUS
    5 4 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1 Bytes=26)
    6 4 TABLE ACCESS (BY INDEX ROWID) OF 'TEST_TABLE' (TABLE) (Cost=2 Card=1 Bytes=78)
    7 6 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1)
    8 1 FILTER
    9 8 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=6 Bytes=468)
    10 8 MINUS
    11 10 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1 Bytes=26)
    12 10 TABLE ACCESS (BY INDEX ROWID) OF 'TEST_TABLE' (TABLE) (Cost=2 Card=1 Bytes=78)
    13 12 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1)
    Statistics
    53 recursive calls
    8 db block gets
    187 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    508 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    4 sorts (memory)
    0 sorts (disk)
    8 rows processed
    -- The above query is using index PK_TEST. But still it has FULL SCAN to the
    -- table two times it has the more cost.
    1st query --> SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=8 Bytes=416)
    2nd query --> SELECT STATEMENT Optimizer=ALL_ROWS (Cost=16 Card=2 Bytes=156)
    My queries are:
    1) performance wise which query is better?
    2) how do i make the 1st query to use an index
    3) is there any other method to get the same result by using any index
    Appreciate your immediate help.
    Best regards
    Muthu

    Hi William
    Nice...it works.. I have added "o_id" and "o_no" are in part of the index
    and now the query uses the index
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    3 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    Statistics
    7 recursive calls
    0 db block gets
    21 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    507 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    8 rows processed
    But my questions are:
    1) In a where clause, if "<>" condition is used, then, whether the system will use the index. Because I have observed in several situations even though the column in where clause is indexed, since the where condition is "like" or "is null/is not null"
    then the index is not used. Same as like this, i assumed, if we use <> then indexes will not be used. Is it true?
    2) Now, after adding "o_id" and "o_no" columns to the index, the Execution plan is:
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    3 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    Before it was :
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    3 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    Difference only in Cost (reduced), not in Card, Bytes.
    Can you explain, how can i decide which makes the performace better (Cost / Card / Bytes). Full Scan / Range Scan?
    On statistics also:
    Before:
    Statistics
    52 recursive calls
    0 db block gets
    43 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    507 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    8 rows processed
    After:
    Statistics
    7 recursive calls
    0 db block gets
    21 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    507 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    8 rows processed
    Difference in recursive calls & consistent gets.
    Which one shows the query with better performance?
    Please explain..
    Regards
    Muthu

  • Using Index Vs dbms_stats.gather_table_stats

    Hello All,
    I would like to know in what situation would we benefit from using index and not analyse table as it takes time and in what situation analysing table is more beneficial then indexes.
    I have a task which creates 14 tables CATS, 2nd table is depended on 1st table for eg create table as t2 as select * from t1 so on and so forth. I am indexing all the 14 tables and gathering statistics.. my colleague says that if tables are indexed then gathering statistics is not required. So table1 - table14 need not have gather statistics. This module is used for large volume of data extract.
    My task is like
    1. create table t1 as select * from <table_name>
    create index
    gather_table_stats
    2. create table t2 as select * from t1
    create index
    gather_table_stats
    3. create table t3 as select * from t2
    create index
    gather_table_stats
    Regards,
    Rashida

    Rashida wrote:
    Hello All,
    I would like to know in what situation would we benefit from using index and not analyse table as it takes time and in what situation analysing table is more beneficial then indexes. You are comparing Apples and Oranges. They are different. They cant be compared.
    ANALYSE is done on a table to collect statistics of the table. CBO needs this information to get the best execution plan. INDEX is a data structure like your table. They help you in searching your data in your table in a faster way.
    For the optimizer to use your INDEX you need to have statistics of your TABLE and INDEX collected.
    I have a task which creates 14 tables CATS, 2nd table is depended on 1st table for eg create table as t2 as select * from t1 so on and so forth. I am indexing all the 14 tables and gathering statistics.. my colleague says that if tables are indexed then gathering statistics is not required. That is a totally wrong statement. This only means your colleague does not know about both INDEX and Statistics. And also how CBO works.

  • Using index and NULL

    Hi,
    I have the following issue (10.2.0.4)
    I have index on NO0_SESSION_ID and TBNAME
    how can I force using index ?
    Thanks for your help
    UPDATE BXAT.no5                                    
       SET TBNAME = :p0,                               
           REPLICATION_METHOD = :p1,                   
           STATUS = :p2,                               
           STARTING_TIME = :p3,                        
           ENDING_TIME = :p4,                          
           REC_INSERTED = :p5,                         
           REC_UPDATED = :p6,                          
           REC_UNCHANGED = :p7,                        
           REC_IN_ERROR = :p8,                         
           REC_CONFLICTS = :p9,                        
           TOTAL_REC = :p10,                           
           REC_CONF_UPDATED = :p11,                    
           REC_CONF_UNCHANGED = :p12,                  
           MASTER_TABLE = :p13,                        
           MASTER_SQ0_NRID = :p14,                     
           NO0_SESSION_ID = :p15,                      
           REC_PURGED = :p16,                          
           SQ0_NRID = :p17                             
    WHERE     (NO0_SESSION_ID = :wp18 OR :wp18 IS NULL)
           AND (TBNAME = :wp19 OR :wp19 IS NULL)              
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT   |      |  1723 | 96488 |  1361   (1)| 00:00:17 |
    |   1 |  UPDATE            | NO5  |       |       |            |          |
    |*  2 |   TABLE ACCESS FULL| NO5  |  1723 | 96488 |  1361   (1)| 00:00:17 |
    Predicate Information (identified by operation id):                       
       2 - filter((:WP19 IS NULL OR "TBNAME"=:WP19) AND (:WP18 IS NULL OR     
                  "NO0_SESSION_ID"=TO_NUMBER(:WP18)))                         

    user12045475 wrote:
    Hi,
    I have the following issue (10.2.0.4)
    I have index on NO0_SESSION_ID and TBNAME
    how can I force using index ?
    Thanks for your help
    UPDATE BXAT.no5                                    
    SET TBNAME = :p0,                               
    REPLICATION_METHOD = :p1,                   
    STATUS = :p2,                               
    STARTING_TIME = :p3,                        
    ENDING_TIME = :p4,                          
    REC_INSERTED = :p5,                         
    REC_UPDATED = :p6,                          
    REC_UNCHANGED = :p7,                        
    REC_IN_ERROR = :p8,                         
    REC_CONFLICTS = :p9,                        
    TOTAL_REC = :p10,                           
    REC_CONF_UPDATED = :p11,                    
    REC_CONF_UNCHANGED = :p12,                  
    MASTER_TABLE = :p13,                        
    MASTER_SQ0_NRID = :p14,                     
    NO0_SESSION_ID = :p15,                      
    REC_PURGED = :p16,                          
    SQ0_NRID = :p17                             
    WHERE     (NO0_SESSION_ID = :wp18 OR :wp18 IS NULL)
    AND (TBNAME = :wp19 OR :wp19 IS NULL)              
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT   |      |  1723 | 96488 |  1361   (1)| 00:00:17 |
    |   1 |  UPDATE            | NO5  |       |       |            |          |
    |*  2 |   TABLE ACCESS FULL| NO5  |  1723 | 96488 |  1361   (1)| 00:00:17 |
    Predicate Information (identified by operation id):                       
    2 - filter((:WP19 IS NULL OR "TBNAME"=:WP19) AND (:WP18 IS NULL OR     
    "NO0_SESSION_ID"=TO_NUMBER(:WP18)))                         
    It has already been pointed out that the FTS is probably due to the OR whatever IS NULL predicates.
    A hack that might/might not work - assuming indexes on the columns exist - is to use the syntax
    --'' is an empty string, interpreted by Oracle as null
    +column+ > ''A better way is to create a function-based index using NVL() or COALECSE on the affected column.

  • How can i use index in select query.. facing problem with the select query.

    Hi Friends,
    I am facing a serious problem in one of the select query. It is taking a lot of time to fetch data in Production Scenario.
    Here is the query:
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelat LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelatrprctr
        WHERE rldnr  = c_telstra_accounting
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          And rzzlstar in r_lstar                            
          AND rpmax  = c_max_period.
    There are 5 indices present for Table ZTFTELAT.
    Indices of ZTFTELAT:
      Name   Description                                               
      0        Primary key( RCLNT,RLDNR,RRCTY,RVERS,RYEAR,ROBJNR,SOBJNR,RTCUR,RUNIT,DRCRK,RPMAX)                                          
      005    Profit (RCLNT,RPRCTR)
      1        Ledger, company code, account (RLDNR,RBUKRS, RACCT)                                
      2        Ledger, company code, cost center (RLDNR, RBUKRS,RCNTR)                           
      3        Account, cost center (RACCT,RCNTR)                                        
      4        RCLNT/RLDNR/RRCTY/RVERS/RYEAR/RZZAUFNR                        
      Z01    Activity Type, Account (RZZLSTAR,RACCT)                                        
      Z02    RYEAR-RBUKRS- RZZZBER-RLDNR       
    Can anyone help me out why it is taking so much time and how we can reduce it ? and also tell me if I want to use index number 1 then how can I use?
    Thanks in advance.

    Hi Shiva,
    I am using two more select queries with the same manner ....
    here are the other two select query :
    ***************1************************
    SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelpt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelptrprctr
        WHERE rldnr  = c_telstra_projects
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar             
          AND rpmax  = c_max_period.
    and the second one is
    *************************2************************
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelnt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelntrprctr
        WHERE rldnr  = c_telstra_networks
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar                              
          AND rpmax  = c_max_period.
    for both the above table program is taking very less time .... although both the table used in above queries have similar amount of data. And i can not remove the APPENDING CORRESPONDING. because i have to append the data after fetching from the tables.  if i will not use it will delete all the data fetched earlier.
    Thanks on advanced......
    Sourabh

Maybe you are looking for

  • The file can't open due to error.

    This message can appear if a file has been saved with permissions. Permissions, also known as rights or privileges, can be applied to a file, folder, or almost any resource available from a network (printers, shares, files, databases, Web sites, etc)

  • Problem with nokia maps N95 8Gb

    I've been trying to use the GPS navigation trough NOKIA MAPS but it doesn't work, in my phone's screen appears "the license has expired" or something like that. I'd like to know what i've to do to make it work.  Because Iv'e heard that tthe GPS navig

  • Migration of ADF project from JDev 10.1.2.2 to JDev 10.1.3.1; Model cloning

    Is there a way to migrate an Oracle ADF project, specifically a Model using ADF Business Components from JDev 10.1.2.2.0 to JDev 10.1.3.1.0? Is there a way to create a clone of a Model using ADF Business Components from one application to be used in

  • Power Interruption During Library Import

    While importing one library into another I experienced a electrical power interruption. The importing process hadn't completed and those projects being imported are either not there or only partially present. Unfortunately I did not have a vault for

  • Unlocking a phone for use abroad

    I will be traveling abroad in the fall for three months.  I would like to suspend my Verizon service here and unlock my phone so that while I am abroad, I can obtain a sim card to use in my current phone (droid charge) .  My two year contract is up w