Oracle blobs performance

I am using Oracle Blobs to write 100 KB XML file to the database. I find the time required for writing this file to the database is around 300 ms .
Can anyone suggest performance improvements

Which jdbc driver are you using? Have you looked at the docs for the driver that you are using for performance hints?
Is this a standalone program or is it a J2EE application? If a J2EE application, try the same thing from a standalone app to benchmark against

Similar Messages

  • Oracle error ORA-01461when trying to insert into an ORACLE BLOB field

    I am getting Oracle error ‘ORA-01461: can bind a LONG value only  for insert into a LONG column' when trying to insert into an ORACLE BLOB field. The error occurs when trying to insert a large BLOB (JPG), but does not occur when inserting a small (<1K) picture BLOB.(JPG). Any ideas?
    BTW, when using a SQL Server datasource using the same code.... everything works with no problems.
    ORACLE version is 11.2.0.1
    The ORACLE datasource is JDBC using Oracle's JDBC driver ojdbc6.jar v11.2.0.1 (I also have tried ojdbc5.jar v11.2.0.1; ojdbc5.jar v11.2.0.4; and ojdbc6.jar v11.2.0.4 with the same error result.)
    Here is my code:
    <cfset file_mime = Lcase(Right(postedXMLRoot.objname.XmlText, 3))>
    <cfif file_mime EQ 'jpg'><cfset file_mime = 'jpeg'></cfif>
    <cfset file_mime = 'data:image/' & file_mime & ';base64,'>
    <cfset image64 = ImageReadBase64("#file_mime##postedXMLRoot.objbase64.XmlText#")>
    <cfset ramfile = "ram://" & postedXMLRoot.objname.XmlText>
    <cfimage action="write" source="#image64#" destination="#ramfile#" overwrite="true">
    <cffile action="readbinary" file="#ramfile#" variable="image_bin">
    <cffile action="delete" file="#ramfile#">
    <cfquery name="InsertImage" datasource="#datasource#">
    INSERT INTO test_images
    image_blob
    SELECT
    <cfqueryparam value="#image_bin#" cfsqltype="CF_SQL_BLOB">
    FROM          dual
    </cfquery>

    Can't you use "alter index <shema.spatial_index_name> rebuild ONLINE" ? Thanks. I could switch to "rebuild ONLINE" and see if that helps. Are there any potential adverse effects going forward, e.g. significantly longer rebuild than not using the ONLINE keyword, etc? Also wondering if spatial index operations (index type = DOMAIN) obey all the typical things you'd expect with "regular" indexes, e.g. B-TREE, etc.

  • JDBC Receiver Adapter and Oracle BLOB

    Hi,
    I would like to put some raw data into an ORACLE BLOB using XI. My idea was to put the data in an xml element, but the JDBC sender adapter doesn't seem to be able to cope with writing. Has anybody gathered experiences regarding this topic?
    Kind regards,
    Heiko

    Hi,
    The error saying it is unable to connect to the Database, so it may be the drivers problem. once check the drivers and its syntaxes.
    Syntax :
    http://www.devx.com/tips/tip/28818
    For Download and configure the drivers :
    http://www.aquafold.com/docs-jdbcdrivers-oracle10g.html
    http://www.oxygenxml.com/database_drivers.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f04ce027-934d-2a10-5a8f-fa0b1ed4d88f

  • Oracle 10G Performance Tuning Documents

    Hi all
    Can any one tell where can I get the oracle 10G Performance Tuning materials(PDF),Documents.
    Thanks in advance

    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14211.pdf

  • Oracle Express Performance

    Hi,
    We are using Oracle Express 6.3.2 & Oracle 8.1.5 for a decision
    support system that we are building.
    We are using a server with 2GB RAM, Dual CPU( 550MHz) along with
    more than 100 GB HDD.The OS being used is Windows NT enterprise
    edition server 4.0.On which both Oracle Relational database and
    Express express server resides.
    The building of multi-dimensional database(MDDB) doesn't take
    time, we are using around 9 dimensions with total data in MDDB
    being in the range of 5- 10 Lakhs records.The building time is
    about 3 minutes.
    However, the running of an application(XPJ) based on the MDDB
    takes lot of time. The report takes about 2 Minutes to appear
    and situtation is even worse in what-if analysis kind of
    reports!.The MDDB is being accessed from Windows NT Client
    workstation 4.0 with 128 MB RAM.
    We have read Oracle Express Performance Tuning and Database
    Design Guide which is available from both Oracle Technology
    Network (technet.oracle.com) and Metalink, however it doesn't
    seem to be of much help.The sparsity etc. have been taken care
    of by us.
    CAN ANYBODY PROVIDE ASSISTANCE ON THIS ISSUE OR IS IT NORMAL
    THING TO EXPECT FROM ORACLE EXPRESS????...., .Request someone to
    respond to this issue, as it very urgent & bothersome to us.
    Thanks

    Dear Friend,
    I am trying to configure reports for express data and in this regard I have done the following :
    1.Machine A having reports 9i Developer suite Release 2 and Pluggable Express Connection Editor installed on Windows 2000 professional.
    2.Machine B having which Express Server 6.3.4 installed on Windows 2000 professional.
    3.In Machine A created user OESDBA with Administrator privilige.
    In the reports I am able to connect to the Express Server and attach the database and choose the measure.Once all the other steps are done I am able to print the data on the reports.
    But if I use a parameter form in which I give the HOST,USER and PASSWORD then substitute the same in the express_server parameter value in the AFTER PARAMETER FORM trigger block then the report gives an error saying that
    Express query contains incorrect,missing or damaged information.
    How to solve this error ?
    Can you please help.
    Regds,
    Ramakrishnan
    [email protected]

  • Oracle apps performance tunning

    Hey
    could u any one tell me where i will get the Oracle Apps Performance
    Tunning on Module wise like OM/AP/AR.
    how to verify that my oracle Apps[11.5.10] instance running fine on linux based !!
    i need check list Oracle Apps Performance !!

    best would be to start with http://docs.oracle.com/cd/E11882_01/server.112/e16638/toc.htm
    Regards
    Karan

  • Oracle 10g performance is slow

    Dear Exports
    how we can imporve the Oracle 10g performance........we are upgrading from Oracle 8 to Oracle 10g. Windows platform. and using Oracle developer 6 as front end .
    thanks in advance

    Do you have statistics gathered on the tables in the 8i database? Can you post the explain plan for the query in both databases?
    Since you know what SQL is having poor performance you can use TKPROF and SQL TRACE to see where your query is spending its time.
    Try the following:
    alter session set timed_statistics=true;
    alter session set max_dump_file_size=unlimited;
    alter session set tracefile_identifier='BAD_SQL';
    alter session set events '10046 trace name context forever, level 12';
    <insert sql with poor response time>
    disconnect
    Use the TKPROF utility on the file found in USER_DUMP_DEST that contains the string BAD_SQL.
    For information on how to interrupt the TKPROF output, see the following link.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm

  • Can I use oracle blob by CMP bean in weblogic 6?

    I use weblogic 6.1(sp3) and Jbuilder 7.when I try to use oracle blob by CMP bean,the
    errors are:
    javax.ejb.FinderException: Exception raised in findByPrimaryKey
    java.io.StreamCorruptedException: InputStream does not contain a serialized object
    What should I do?Is there examples about using oracle blob?
    thanks a lot!

    Great! So what was the problem?
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    >
    Finally got it working with CMP, which is my preferred choice (over BMP).
    I read the Excel Spreadsheet into a "byte []" array, and the Entity Beanmapped
    "byte []" to the Blob column in the Oracle table.
    "Slava Imeshev" <[email protected]> wrote:
    Roger,
    I'm not quite sure I undestand the problem. Could you:
    1. Post deployment descriptors in part related to this
    CMP bean?
    2. Post the piece of code that is failing?
    Please post the information above and we will help
    you to hunt the problem down.
    No, I don't have any problems accessing blobs
    from CMP.
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    Yes. I have added;
    <dbms_column-type>OracleBlob</dbms-column-type>
    It fails because the locater to the blob, obtained by findBYPrimaryKeyis
    null.
    i.e. an empty_blob() is not created.
    Have you got CMP to access Blobs in WLS 6.1?
    "Slava Imeshev" <[email protected]> wrote:
    Hi Roger,
    Have you tried using OracleBlob as dbms-column-type?
    Also, could you post that part of your code that is failing?
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    I can access Clobs using CMP. If you are using the Oracle OCI Driveryou
    do not
    need to add this line.
    However if you are using the Oracle Type 4 Thin drivers you need
    to
    add;
    <dbms_column-type>OracleClob</dbms-column-type>
    to the file;
    weblogic-cmp-rdbms-jar-xml
    This DOES NOT work with Blobs.
    I am unable to get WebLogic 6.1 sp4 persist a Blob to an Oracle
    8.1.x
    table and
    retrieve it using either CMP or BMP.
    Unless any one show me a complete working CMP and BMP example?
    Roger Lee
    Deepak Vohra <[email protected]> wrote:
    BLOB and CLOB DBMS Column Support for the Oracle DBMS
    http://edocs.bea.com/wls/docs61/ejb/cmp.html#1061636
    shybird wrote:
    I use weblogic 6.1(sp3) and Jbuilder 7.when I try to use oracle
    blob
    by CMP bean,the
    errors are:
    javax.ejb.FinderException: Exception raised in findByPrimaryKey
    java.io.StreamCorruptedException: InputStream does not contain
    a
    serialized
    object
    What should I do?Is there examples about using oracle blob?
    thanks a lot!

  • Sending image from MS SQL SERVER to Oracle BLOB

    Hey all, we're trying update Oracle via a SQL Server linked server and we're having an issue with a blob column. The update from SQL is:
    UPDATE Banner..GENERAL.PS_EBI_IF_TBL
    set photo = a.blob_file, photo_change_date=a.blob_date
    from PWNT.dbo.BLOBS a, PWNT.dbo.BADGE_V b
    where a.ID = b.ID
    and base_name = b.BADGE_BASE_NAME
    and b.BADGE_blob_date > getdate()-.021
    GO
    The error we get is:
    OLE DB provider "OraOLEDB.Oracle" for linked server "Banner" returned message "ORA-01747: invalid user.table.column, table.column, or column specification".
    The syntax is correct, we can run it if the column being updated (photo) is not a blob, so we believe there is something else we have to do because of the blob. Has anybody done anything like this and know how it works? Thanks!
    Tom

    Given that there are no version numbers is your post I can imagine many possibilities for misconfiguration. Especially as an Oracle BLOB bears no direct size relationship to anything MS SQL could possibly support.

  • Oracle BLOB value to a LC variable

    Hello,
    Is it possible in LC ES2 to coerce oracle blob value to some livecycle variable ?
    When mapping sql query result (column of type BLOB) to a LC variable (of type Document), we receive:
    com.adobe.workflow.datatype.InvalidCoercionException: Cannot coerce object: oracle.sql.BLOB@27e7d6 of type: oracle.sql.BLOB to type: com.adobe.idp.Document
    We have tried mapping to string, binary, Document (, we even desperately hardcoded sql.oracle.BLOB to process XML), but none of this works.
    Is it possible to solve this other way, then following ?
    http://groups.google.com/group/livecycle/browse_thread/thread/6c4b9156b52b71a7
    Thanks.

    My idea is to fetch the BLOB column data as UTF8 (base64) encoded string and then use getDocumentFromBase64 available in ES2.
    I am not sure what syntax is to fetch from ORACLE.
    I have used MySql database and the query is:
    SELECT CONVERT(Blob_Column USING UTF8) as MyBlobDataAsBase64Str FROM myTableName;
    Now using SetValue activity to look like:   myXMLvariable = getDocumentFromBase64(strVariableHoldingBase64Data)
    This case works perfectly without any issues.
    The problems is you should find out the appropriate syntax for ORACLE.
    I was searching about CONVERT() & UNISTR() functions. But i'm unable to evaluate.
    Try by yourself..
    Nith

  • Store pdf in oracle  BLOB  hibernate

    I need to store PDF files in the oracle BLOB using hibernate. I am using the below code and getting a null pointer. Any thoughts?
    Blob blob=null;
    byte [] bFile = (byte[])objVal;
    blob.setBytes(0,bFile); //null pointer here...
    logger.info("EventsDAO- insertDetails- else:--"+((byte[])objVal)+"---blob----"+blob);
    hmForm.put(objKey,blob); Thanks in advance.

    Samples? Are you asking how to make a blob? I have my doubts about the wisdom of using Hibernate if you can't diagnose a NPE unless that was just momentary code snow-blindness, but whatever, it's your problem:
    Either call Hibernate.createBlob(InputStream,long) or just map the field as a byte[] and map it to a Blob type.
    Edited by: dcminter on 09-Jun-2008 22:22

  • Implementation of Oracle Hyperion Performance Scorecard

    Hi,
    I am completely naive at Oracle EPM. As of now, we have implemented Oracle EBS with finance, SCM and HRMS & Payroll modules. Our company wants to see the legacy KPIs integrated with these modules.
    So, I want to know
    _1. which modules in Oracle EPM are required for implementing Scorecards and KPIs completely._
    _2. what are the implementation steps?_
    I dont know how to go about this implementation. Hope I would get some info from you guys.
    Thank you,
    Siva Kumar.
    Edited by: Siva Kumar HVK on May 6, 2011 1:25 AM

    Hi Oracle Gurus,
    I would like to know the skills required to implement Oracle Hyperion Performance Scorecard module independently.
    Please suggest me the same.
    Thank you
    Siva Kumar.

  • I cannot display image (read from oracle BLOB field) on browser?

    I cannot display image (read from oracle BLOB field) on browser?
    Following is my code, someone can give me an advise?
    content.htm:
    <html>
    <h1>this is a test .</h1>
    <hr>
    <img  src="showcontent.jsp">
    </html>showcontent.jsp:
    <%@ page import="com.stsc.util.*" %>
    <%@ include file="/html/base.jsp" %>
    <% 
         STDataSet data = new STDataSet();
    //get blob field from database     
         String sql = "SELECT NR FROM ZWTAB WHERE BZH='liqf004' AND ZJH='001'";
         //get the result from database
         ResultSet rs = data.getResult(sql,dbBase);
         if (rs!=null && rs.next()) {
              Blob myBlob = rs.getBlob("NR");
              response.setContentType("image/jpeg");//
              byte[] ba = myBlob.getBytes(1, (int)myBlob.length());
              response.getOutputStream().write(ba);
              response.getOutputStream().flush();
         // close your result set, statement
         data.close();     
    %>

    Don't use jsp for that, use servlet. because the jsp engine will send a blank lines to outPutStream corresponding to <%@ ...> tags and other contents included in your /html/base.jsp file before sending the image. The result will not be treated as a valid image by the browser.
    To test this, type directly showcontent.jsp on your browser, and view it source.
    regards

  • Image from Oracle BLOB is not showing

    Hi all!
    Im trying to use this code:
    <?php
    //... etc
    $sql = oci_parse($c, 'select * from pf2.documents ');
    oci_execute($sql);
    echo "<table width = 200 border = 1 cellspacing=0 cellpadding=0>";
    while ($row = oci_fetch_assoc($sql)) {
    echo "<tr>";
    echo"<td style=background-color:#DDDEEE; align=center>";
    echo $row['SHORTNAME'] ;
    echo"</td>";
    echo"<td style=background-color:#DDDEEE; align=center>";
    print $row['FILENAME'] ->load();
    echo"</td>";
    echo "</tr>";
    echo "</table>";
    //... etc
    ?>
    Here im trying to select and publish an image from Oracle BLOB,
    but in Mozilla Firefox im getting just whong text:
    яШяа�JFIF��`�`��яЫ�C� $.' ",#(7),01444'9=82<.342яЫ�C 2!!22222222222222222222222222222222222222222222222222яА�МЂ"�яД����������� яД�µ���}�!1AQa"q2Ѓ‘Ў#B±БRСр$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzѓ„…†‡€‰Љ’“”•–—�™љўЈ¤Ґ¦§Ё©ЄІіґµ¶·ё№єВГДЕЖЗИЙКТУФХЦЧШЩЪбвгдежзийкстуфхцчшщъяД�������� яД�µ��w�!1AQaq"2ЃB‘Ў±Б #3RрbrС $4б%с
    Please help!
    P.S.: Im using PHP 5.2.10 under Wintel platform,
    Oracle 9.2.0.4,
    create table DOCUMENTS
    DOCID NUMBER(10) not null,
    SHORTNAME VARCHAR2(30) not null,
    FULLNAME VARCHAR2(250) not null,
    FILENAME BLOB not null,
    AUTHOR VARCHAR2(30) not null,
    CREATIONDT DATE not null,
    VERSION VARCHAR2(10) not null
    Edited by: user502299 on 28.09.2009 5:33

    I am having a similiar problem. I have created the image.php file:
    <?
    $query = "select a.image_file FROM officer_image a, officer_info b where a.officer_id=b.officer_id and b.officer_lname like 'LEDEZ%' ";
    $stmt = @OCIParse ($db_conn, $query);
    @OCIExecute($stmt, OCI_DEFAULT);
    @OCIFetchInto($stmt, $arr, OCI_ASSOC+OCI_RETURN_LOBS);
    $result = $arr['BLOB'];
    @OCIFreeStatement($stmt);
    @OCILogoff($conn);
    $im = @imagecreatefromstring ($result);
    if (!$im) {
    $im = imagecreate(150, 30);
    $bgc = imagecolorallocate($im, 255, 255, 255);
    $tc = imagecolorallocate($im, 0, 0, 0);
    imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
    imagestring($im, 1, 5, 5, "", $tc);
    Header("Content-type: image/jpeg");
    Header("Content-Disposition: attachment; filename=filename_".uniqid(time()).".jpg");
    imagejpeg($im,'',100);
    imagedestroy($im);
    ?>
    And then in the actual search web page:
    <?php
              $tname = $_POST['lname'];
              $lname = "{$tname}%";
              $id = "1";
              //$query = "SELECT officer_id, image_file FROM officer_image WHERE ID='.$id.'";
              $query = "select a.image_file FROM officer_image a, officer_info b where a.officer_id=b.officer_id and b.officer_lname like 'LEDEZ%' ";
              //oci_bind_by_name($sql, ":bv", $lname);
              //oci_execute($sql);
              $stid = OCIParse($conn,$query);
              Header("content-type:image/jpeg");
              OCIExecute($stid, OCI_DEFAULT);
              while($succ= OCIFetchInto($stid,$row)) {
                   foreach($row as $item) {
         $blob_message = $item->load();
                   // Output the image
              //imagejpeg($blob_message);
              echo $blob_message . " " ;
              //echo "<img src="image.php?id='.$blob_message.'" border="0">. $rows['officer_id']."\">\n";
              echo "<br /><br />";
                   // Free up memory
              //imagedestroy($im);
              //while ($row = oci_fetch_assoc($sql))
    ?>
    Can anyone help?

  • Oracle database performance after server reboot

    hi masters,
    this is not some kind of question, but a discussion. some statements come from our client that after weekly reboot of system, the oracle database performance is low for some time and increase after some time(say 2 days).
    i think it is but obvious, because at reboot oracle flushes all cache, and temporary space, so it need to re parse the sql statements and perform some disc I/O's so it might need some time and hence performance will degrade.
    but at the same time some people claim that after reboot their database performance is better than their normal performance for some days. it seems controversial that's why i am posting it here.
    what might be the reason behind this?? prior can have a valid reason of hard parsing, but what with second case??
    any clarification is highly appreciated...
    thank you
    regadrs
    VD

    Vikrant,
    You should wait for some time buddy, its weekend ;-) .
    this is not some kind of question, but a discussion. some statements come from our client that after weekly reboot of system, the oracle database performance is low for some time and increase after some time(say 2 days).i think it is but obvious, because at reboot oracle flushes all cache, and temporary space, so it need to re parse the sql statements and perform some disc I/O's so it might need some time and hence performance will degrade.
    >
    I would start from saying that checking the performance when the system just started, is a wrong approach. There would be lots of IOs , parsing, calculations(related to memory allocations) happening so there would be a delay/bad performance at that time. Very simple example can be parsing, another can be memory allocation. Oracle doesn't allocate the entire memory in the instance startup that is allocated to the memory areas but allocates just the bare minimum that is needed to start the instance and than after the startup, it keeps on allocating the memory. So surely enough, with the startup and after a while of it, there would be a different performance than that after the instance hsa already been started and the workload informations have started coming up.
    Its correct that Oracle would deallocate all the caches with the reboot as the instance is on the memory(physical) and with the reboot , that would be flushed including the SGA which is allocated over it. Temporary tablespace is now not freed with the reboot. I guess its a rather illogical thing to do but that's what is there now. Oracle keeps the segment allocated even after the reboot is issued, hence the reason for larger temporary tablespaces.
    >
    but at the same time some people claim that after reboot their database performance is better than their normal performance for some days. it seems controversial that's why i am posting it here.
    what might be the reason behind this?? prior can have a valid reason of hard parsing, but what with second case??
    >
    This should not come as a surprise once we understand what might be happening with this process. Assume a situation where you have undersized caches. For example, shared pool . which is very heavily used for database , if this is going to be undersized and you are not using automatic memory management, you won't be enjoying the dynamic management of this parameter. Now, if you do lots of parsing , thanks to your wrongly written queries, you would eventually end up filling up shared pool to its max thus leaving no space for incoming new hard parsed cursors. Here , if you can't manage to add more memory to add to it, the only solution left would be to flush the shared pool( as good as rebooting the db because this would do the same) and than make space for the new cursors. The performance is going to be better becausethe cursors would not be getting flushed out immediately and will be kept in the shared pool as long as its not filled up again.Once you have reached to limit of it, again there would be performance benefit. So there are always odds added to the statements like this that I rebuilt my index , I got better, I rebooted my server, my querie are much faster now. Most of the time when these kind of statements are given, they are based on what we have seen, without understading what actually might have happened. So I would siggest to hear the statement but not take them as a rule of thumb to follow.
    Hope this all makes some sense for you and would help somewhat.
    Aman....

Maybe you are looking for