Rewrite the predicate into an equivalent form to take advantage of indices

Hi all,
I'm working on a tuning project on Oracle 10.2.0.5 for HPUX.
While taking an ADDM, I see the following:
The predicate RTRIM("IC_TIPOS_ASIENTOS"."TIP_ASIENTO")=RTRIM(:B1) used at line ID 2 of the execution plan contains an expression on indexed column "TIP_ASIENTO". This expression prevents the optimizer from selecting indices on table "SCHEMA"."IC_TIPOS_ASIENTOS".
Rewrite the predicate into an equivalent form to take advantage of indices. Alternatively, create a function-based index on the expression.
The query is:
select count(*) into :b0 from IC_TIPOS_ASIENTOS where (((((RTRIM(CUENTA_SGC)=rtrim(:b1) or NVL(RTRIM(CUENTA_SGC), ' ')=' ') and RTRIM(TIP_ASIENTO)=rtrim(:b2)) and (RTRIM(TIP_TARIFA)=rtrim(:b3) or RTRIM(TIP_TARIFA)='T')) and (RTRIM(EST_ORIGEN)=rtrim(:b4) or EST_ORIGEN='0999BGRTYP')) and (CO_GRUPO_CON=:b5 or CO_GRUPO_CON=0))
_Does it mean that in order to take advantange of the indexes I should create an funcion-based index of the expression RTRIM(TIP_ASIENTO)?_
I cannot change the code of the application, only indexes.
Thanks a lot.
Regards,

I performed an autotrace, and the index is being used. I didn't create any new index so far.
Take a look:
Execution Plan
Plan hash value: 1322405988
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 27 | 4 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 27 | | |
|* 2 | INDEX FAST FULL SCAN| IC_TIPOS_ASIENTOS_I01 | 1 | 27 | 4 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("CO_GRUPO_CON"=0 AND RTRIM("TIP_ASIENTO")='TJ035' AND
"EST_ORIGEN"='0999BGRTYP' AND (RTRIM("TIP_TARIFA")='G' OR RTRIM("TIP_TARIFA")='T') AND
(RTRIM("CUENTA_SGC")='VA675' OR NVL(RTRIM("CUENTA_SGC"),' ')=' '))
Although RTRIM is used the index is taken into account to solve the query.
If I remove the RTRIM, execution plan is the same and there's no gain.
So, ADDM is wrong?
What does it say that it cannot take advantage of indexes when thay are actually used ?
Thanks

Similar Messages

  • How do I get a PDF document put into an attachment form that I can drag to an e-mail.  Usually I get an icon showing an spiral note book which then becomes an attachment when I drag it to the e-mail, but occasionally it stays in PDF and prints out on the

    How do I get a PDF document put into an attachment form that I can drag to an e-mail.  Usually I get an icon showing an spiral note book which then becomes an attachment when I drag it to the e-mail, but occasionally it stays in PDF and prints out on the e-mail.  What have I done differently?

    Thanks again for the detailed instructions Srini!
    And I really hate to be a pest . . . but . . .
    Using your example and not modifying it, I get the e-mail form filled out correctly and the pdf attached, however, I'm not prompted to sign it.
    Any more clues?

  • Getting the information from a writable form into Excel ...

    Help!
    I have a writable form that was created in Adobe Acrobat Professional
    I would like to either post or email out this form to fellow employees.
    Once they fill out this form - it needs to come back to me
    I then need to be able to take the data from all forms that will be coming back to me and put it into my Excel Spreadsheet.
    Can anyone help me figure this out?
    I can make oodles of writable forms, but I can't get the data into excel ....
    Thanks!
    Mieke Jeanne

    If your using a Macintosh computer then you can not do it other than  in Acrobat 9, go to advanced menu then  mouse down to extend Reader  Features in Reader ...
    You want the ability to filout and save forms.
    Then you emai to not more than 500 people. then you read the pdfs and manually key or save as fdf file and  can extract the information from the fdf files.
    If your a PC user you have the ability to use a system called liveCycle designer. But you need mucho bucks to subscribe to a special server Aodobe has for such purpose.
    If you need more info. go back to the main form page and click on button for Acrobat LiveCycle the choose appropriate news group.

  • I purchased the Adobe PDF Pack but it won't allow me to convert any files to pdf or combine multiple files to into 1 pdf form. It keeps saying "Error occurred while trying to access the file". WHY

    I purchased the Adobe PDF Pack for $7.50/month (or $89.99/yr) but it won't allow me to convert any files to pdf or combine multiple files into 1 pdf form. It keeps saying "An error occurred while trying to access the service". WHY is this happening & How can I fix it?

    Hi hpmg,
    It seems you are trying to access the service via Adobe Reader. Make sure you are signed in with your Adobe ID. Is Reader updated to the latest patch v 11.0.09?
    It might be possible that a firewall or antivirus might be breaking the connectivity from Reader to the server.
    Try accessing the service from the browser: https://cloud.acrobat.com/exportpdf  and check if that works for you.
    Regards,
    Rave

  • Hi! I have a Creative suite Design Standard 9 Adobe program and I am attempting to make a wizzard form that can be made into an entry form for a competition. So I need to 1. Make the form into a question and answer form that Participants may fill out. 2.

    Hi! I have a Creative suite Design Standard 9 Adobe program and I am attempting to make a wizzard form that can be made into an entry form for a competition. So I need to 1. Make the form into a question and answer form that Participants may fill out. 2. make it possible for them to download it via a link on our website 3. make it possible for them to save the info they have written into the form and mail it to the mail we have supplied in the entry form and 4. make it possible for them to put in a jpg. as part of the entry for and lastly 5. make it possible for us to copy paste the document and use it on other platforms. How do I do this - is it at all possible with adobe?

    Those requirements are go way beyond what PDF forms can do and are meant for, some of them would require involving other programs or are mutually exclusive and contradictory. You are wasting your time even thinking about doing this as an "offline" PDF form. Simply sign up for an online forms/ survey service like FormsCentral or Surveymonkey.
    Mylenium

  • Query a database a show the results into a form

    Hello!
    I have a general question.
    I have created a form and when the user submit it , it calls a servlet that store the information into a database.
    Now I want to make a new page where you can look for the information that the user stored in to the database (according to an ID ) and that information must be showed to the user again into a form (same form but with two or more empty fields that he can update now).
    What is the best way do that?
    Should I include in the query.jsp a bean and program all in the bean and then come back with the results to the query page?
    Im quite new to jsp, java...so , please I need your opinion about the best way to program that...
    thanks in advance

    As promised, here's a way to execute a SQL command and see the results in a JSP. It'll work with all four CRUD operations, as long as you pass valid SQL:
    <%@ page errorPage="error.jsp" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <form name="sqlQueryTester" method="post" action="sqlQueryTester.jsp">
        <center>
            <h3>SQL Query Tester</h3>
            <table>
                <tr>
                    <th>SQL Query:</th>
                    <td>
                        <textarea name="sqlQuery" rows="10" cols="80"></textarea>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                        <input type="submit" name="submit" value="Submit"/>
                    </td>
                    <td>
                        <input type="reset"/>
                    </td>
                </tr>
            </table>
            <c:if test="${not empty param.sqlQuery}">
                <sql:query var="queryResult" sql="${param.sqlQuery}"/>
                <hr />
                <h3>Query Results</h3>
                <c:forEach items="${queryResult.rowsByIndex}" var="row" varStatus="status">
                    <c:if test="${status.first}">
                       <table border="1" align="center" width="100%">
                           <tr bgcolor="#ffad00">
                               <c:forEach items="${queryResult.columnNames}" var="col">
                                   <th><c:out value="${col}"/></th>
                               </c:forEach>
                           </tr>
                    </c:if>
                    <tr>
                        <c:forEach items="${row}" var="value">
                            <td><c:out value="${value}"/></td>
                        </c:forEach>
                    </tr>               
                    <c:if test="${status.last}">
                        </table>
                    </c:if>
                </c:forEach>
            </c:if>
        </center>
    </form>I'll leave the web.xml and error.jsp as an exercise for you.
    This will run on Tomcat 4.1.x and JSTL version 1.0.
    %

  • Taking the data from interactive forms and load the data into SAP system?

    hi all,
    I want to know how to take the data from interactive forms and load the data into sap system?
    if u have any sample scenario, explain with that.
    thanks in advance
    Raja

    Hello,
    Check the program...
    SAPBC480_DEMO.
    Check the below threads
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/88e7ea34-0501-0010-95b0-ed14cfbeb85a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bfbcd790-0201-0010-679d-e36a3c6b89fa
    Thanks
    Seshu

  • Pasting spreadsheet cells into a new form with the wizard ???

    I must be missing something here. Whenever I try to paste new cells from a spreadsheet into a new form using the new form wizard the 'finish' button doesn't turn active. It's like Livecycle isn't aware that spreadsheet cells have been copied to the clipboard.
    When I try to do it manually and create a new form then copy and paste cells into the form I get a grey image (icon?) that is supposed to repesent something, but I don't know what. It is definitely not spreadsheet cell information.
    Is it because I'm using Office 2000? Has anyone successfully done this?

    I checked in the LC ES help file and it indicates that the spreadsheet option works with 2003 and above. So perhaps it is related to my outdated software.
    Thanks for all your help, internet! :P

  • How do I auto populate the date into text fields when form is first opened?

    Hello,
    I read all about the changing the scripts but its not really working for me. I was hoping someone could help me with directions on how to auto populate the date into designated text fields when my adobe document is first opened?
    I am working in Adobe Acrobat 9.
    Thank you,
    Sheri

    When you add a new document JavaScript (Advanced > Document Processing > Document JavaScripts > Script Name (enter something) > Add), you will be given a function skeleton by default. Just delete it and enter the line of code I showed above. Now, whenever the document is opened, the code will get triggered and the field will be updated with the current date. There is no "Document Open" action (at least that's accessible via Acrobat's UI), but this is effectively the same thing since any document-level JavaScripts are executed when the document is opened.

  • How to refer the trigger written in one form from another form ?

    How to refer the trigger written in one form from another form ?
    Thanks,
    Ravi Shankar

    Try to convert the PL/SQL code from Forms trigger into a PL/SQL library(.PLL),
    and then attach that PLL in your forms.
    Note that all Forms objects should be referenced indirectly, for example,
    you have to rewrite
    :B1.DEPT_CODE := :B2.DEPT_CODE;
    :B3.TOTAL_AMOUNT := 100;
    ==>
    copy('B2.DEPT_NO','B1.DEPT_NO');
    copy('100','B3.TOTAL_AMOUNT');
    This is the best way to share PL/SQL code among Oracle Forms.

  • Copy access data into oracle with form builder 9i

    hello
    i need to copy/import data and tables from an MS access database into oracle 9i database. the situation is each time i login to my forms applicatin i will need to do that. any idea pls...
    the access db is frequently updated. so when i login into my forms application it needs to be reimport the data from access db. can any1 pls help me?

    To my opinion, there are 3 potential approaches :
    1. rewrite the application, that data are stored directly in the oracle database
    or the program writes flat files somewhere to the file system which are able getting
    imported from the target instance on daily basis or job driven;
    2. The "Access-driven approach" : link oracle tables into the MS-Access application
    using an ODBC-connection and build a macro in Access which is exporting the stuff to
    the target instance; in order to do so, the Oracle Client and ODBC-Drivers needs to
    get installed on the PC where MS-Access is started to start the exportation process
    (which is probably yours).
    You may then create tables in the target instance and link them from within Access
    using ODBC as the datasource
    3. The "Oracle driven approach". explained in detail here, never tried it, but maybe
    worth a look
    http://www.orafaq.com/node/60
    Basically, install the Oracle Software on a PC, configure an ODBC-Connection and start a
    Listener there;
    The target instance (which may no run on a UNIX system) is now able to commuincate
    with the local running listener on your PC which itself is instantiating a connection to
    the Access "Database" using the ODBC-Connection.
    In this way, your PC acts as a database server from the Oracle Net point of view.
    In theory, this could even work, depending on the ability to connect from the
    instance server directly to the given IP of your PC (Security ?? Hmmmz)

  • Why do columns not appear in the same order as the fields on my imported form?

    Hello All
    I am an Acrobat X user and make numerous forms through Acrobat.  However, when I import the file into FormsCentral, the order of the fields in the table do not correspond to the order in which they appear on my form.  The fields on my form are in a calendar format so they appear from left-to-right.  I'm wondering if when I do the import, it is read by FormsCentral from top-to-bottom instead or is it random.  It's a real inconvenience and severely inhibits my workflow when I have to rearrange the columns to work with the data.  Any suggestions or insight would be appreciated.
    Thanks
    Daryl

    Files have no order. File management programs like the finder or windows explorer will display files according to your selected display sort. Typically alpha by file name, date created, size, date modified. So to view them in a selected order you need to sort on an attribute that accomplishes that. The easiest usually is to export photos using the sequential naming option then displaying in alpha order
    LN

  • Problem in saving the image into SQL database..

    Hello,
    In my application I have to save image file (say jpg) into the database and retrieve back and display it on the applet. I am through with grabbing the pixels of the image & sending the pixel array to the servlet but I am struck in how to store the image into the database and retrieve the same.
    Can anybody please help me in this regard... its really urgent...
    Thanks in advance
    Swarna

    Hello.
    I've been researching this problem (saving images in a MySQL database) in order to accomplish a task I was assigned to. Finally I was able to do it. I'd be glad if it will be of any use.
    First of all: the original question was related to an applet. So, the post from rkippen should be read. It says almost everything, leaving the code job for us. Since I managed to write some code, I'll put it here, but I'm not dealing with the byte transferring issue.
    To obtain a byte array from a file I'd open the file with FileInputStream and use a loop to read bytes from it and save them into a ByteArrayOutputStream object. The ByteArrayOutputStream class has a method named �toByteArray()� which returns an array of bytes (byte [] b = baos.toByteArray()) that can be transferred in a socket connection, as said by rkippen.
    My problem was to save an image captured by a web camera. I had an Image object, which I converted into a byte array and saved into the database. Eventually I had to read the image and show it to the user.
    The table in the MySQL database could be:
    CREATE TABLE  test (
      id int(11) NOT NULL auto_increment,
      img blob NOT NULL,
      PRIMARY KEY  (id)
    )I had problems trying to use the �setBlob� and �getBlob� methods in the Statement object, so I used the �setBytes� and �getBytes� methods . In the end, I liked these methods most because they where more suitable to my application.
    The database operations are:
        public int insertImage(Image image) throws SQLException {
            int id = -1;
            String sql = "insert into test (img) values (?)\n";
            PreparedStatement ps = this.getStatement(sql);  // this method is trivial
            byte [] bytes = this.getBytes(imagem); // * see below
            ps.setBytes(1, bytes);
            ps.executeUpdate();
            id = ps.getGeneratedKeys().getInt(0); //Actually I couldn't make this line work yet.
            return id;
        public Image selectImage(int id) throws SQLException {
            Image img = null;
            String sql = "select img from test where id = ?\n";
            PreparedStatement ps = getStatement(sql);
            ps.setInt(1, id);
            ResultSet rs = ps.executeQuery();
            if (rs.next()) {
                byte [] bytes = rs.getBytes(1);
                img = this.getImage(bytes); // * see below
            return img;
        }* If the bytes are read directly from a file, I think it is not necessary to convert it into an Image. Just send the bytes to the database method would work. On the other hand, if the image read form the DB will be written directly into files, the bytes obtained from rs.getBytes(1) would be enough.
    The image operations are:
        public byte [] getBytes(Image image) {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            try {
                ImageIO.write(this.getBufferedImage(image), "JPEG", baos);
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            return baos.toByteArray();
        public Image getImage(byte [] bytes)  {
            Image image = null;
            ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
            try {
                image = ImageIO.read(bais);
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            return image;
        public BufferedImage getBufferedImage(Image image) {
            int width = image.getWidth(null);
            int height = image.getHeight(null);
            BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
            Graphics2D g2d = bi.createGraphics();
            g2d.drawImage(image, 0, 0, null);
            return bi;
        }That's it. I hope it is useful.

  • I am trying to import cr2files from the camera into lightroom 5 and keep getting an error message saying Lightroom can not read the files and therefore will not import them.  Has anyone had a similar problem-.thanks

    I am trying to import cr2files from the camera into lightroom 5 and keep getting an error message saying Lightroom can not read the files and therefore will not import them.  Has anyone had a similar problem….thanks

    If you are having the same problem, i.e. a disk permission problem, open your favorite search engine and search on, "change disk permissions", and I think you'll find plenty of information on how to fix the problem. This is a Lightroom forum. Your problem is with your operating system. There is no sense in rewriting instructions that are already available if you do a simple search.

  • How to change the fields in a JSF form based on a URL parameter

    I am trying to build a generic JSF form of parameters which I want to dynamically change (i.e.
    change which field is visible, what the label text should be, etc) based on a URL parameter.
    I can set the fields using logic in the backing bean as an action on a command button pressed.
    But how do I do it based on the URL parameter ? I can retrieve the URL parameter but I
    don't know where to put (or hook) the Java code to do this initialization prior to
    the page being rendered for the first time.
    The fields in the JSF is being configured dynamically using a database table.
    BTW I am using Jdeveloper 10.1.3.5
    Thanks
    CK

    Thanks. I decided to set a Session bean to store the value of the URL parameter (if it is set)
    and then to use the session bean to initialize the attributes of the fields on the JSF Page.
    There also seems to be some caching of the inputText fields (i.e. it reverts back to the first
    initialized value) even though I tried to change it using the URL parameter in the requestScope
    backing bean. So, setting the values into the Session bean and retrieving it back from there
    seems to be more reliable.

Maybe you are looking for

  • How do I convert my .mpeg /  .bat files into ones compatible with iPod ?

    I know its a basic question but I want to find out as a new user of iPod Video as to how i can convert .mpeg and .bat files to ones which are compatible with iPod ?

  • LDAP directory portlet

    Hi there, I need to deliver a Yellow Page portlet. This portlet would render a list of users already registered in my BEA embedded LDAP portal and their personnal information such as Name, First Name, Phone Numbers, Email,... Has anyone ever done tha

  • 2540 Lost Communication problem

    Hi, I came across a strange problem with two of Storagetek 2540s that we are using. When I check their status on CAM, it shows OK. But after a while, their status turns to "Lost Communication" all of a sudden. Once the network cables are unplugged an

  • How the PURGE INDEX command works

    Hi all,<br><br> PURGE INDEX command purges the specified index from the recyclebin.<br> My question is: I noticed that the dropped index doesn't appear in the recyclebin, so from where it could be purged?<br><br> SQL> CREATE INDEX Z_IND ON Z (Z); Ind

  • Flash Player gone with Firefox, Still works with IE.

    Flash Player suddenly stopped working with Firefox. I uninstalled and reloaded. Works with IE, but still not with Firefox. That's my primary browser. Any ideas? Thank you, -Bob