Performance of LOB Segments for Blob Columns

Hi,
I am migrating 11,000 rows of tiff images from Informix to Oracle.In Informix the datatype for the image storage is Byte and Oracle we chose it to Blob.
The Blob column is creating lob segment and lob index.
When I do the migration I observe that the size of the lob segment object is increasing rather than the table object.
So due to creation of this lob segment for the Blob column,will there be any performance issues while retrieval of images from the database and Inserting images into into the database.
Can I get all the issues that can be encountered by storing data in blob column in terms of lob segment.
This is very important information for us as the application has lot of SQL queries for retrieving and injecting images in the database.
It will be really apprecialbe if you can provide Information about this.
Thanks & Regards
Ramanathan KrishnaMurthy

I agree with D.Morgan that object type with 250 attributes is doubtful.
I don't like object tables (tables with "row objects") too.
But, your table is a relational table with object column ("column object").
C.J.Date in An introduction to Database Systems (2004, page 885) says:
"... object/relational systems ... are, or should be, basically just relational systems
that support the relational domain concept (i.e., types) properly - in other words, true relational systems,
meaning in particular systems that allow users to define their own types."
1. How will Oracle store the data in the ADT column?...
For some answers see:
“OR(DBMS) or R(DBMS), That is the Question”
http://www.quest-pipelines.com/pipelines/plsql/tips.htm#OCTOBER
and (of course):
"Oracle® Database Application Developer's Guide - Object-Relational Features" 10g Release 2 (10.2)
http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14260/adobjadv.htm#i1006903
Regards,
Zlatko

Similar Messages

  • Performance of update query for single column vs multiple column

    Hi All,
    I could not find any answer for this, does it ever matter in terms of performance updating single column versus multiple column in a single update query.
    For eg. table consisting of 15 columns, what would be the difference in performance when one column is update in the single query against another update query where 15 columns are updated.
    Please do keep in mind my table columns in actually could be around 150+.
    Thanks for any information provided.

    If updated columns aren´t on where clause , then the only impact of 15 columns will be a increase on redo generation, and a possible chainning row.
    So since the redo is one of the things that have a large impact, the answer is yes.
    The performance will be slower.
    Regards
    Helio Dias.
    http://heliodias.com
    OCE SQL, OCP 9i

  • Download Formatting Mask for BLOB column

    Hi All,
    IR Query : select "ROWID","FILE_NAME",dbms_lob.getlength("DATA_FILE") "DATA_FILE",
    "DOC_SIZE",PROPOSAL_OWNER
    from "#OWNER#"."APXTER_IMP_HDR"
    I am using BLOB Download Format Mask on FILE_NAME column
    using the following FORMATTING
    DOWNLOAD:APXTER_IMP_HDR:DATA_FILE:ROWID::::::attachment:Download
    After applying the changes, I counter the error
    The number of display columns in the report reached the limit. Please click Select Columns under Actions menu to minimize the report display column list.
    Thanks,
    Sombit

    Hello,
    Here you can find a tutorial about blob:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
    I have a demo here - it shows how to display an image in case the file is image. Otherwise, it displays download link:
    http://apex.oracle.com/pls/apex/f?p=63066:1
    workspace: somefeto
    user: test
    pwd: test
    Application 63066
    Also, there is a packaged application : Sample File Upload and Download that shows you, how to do it.....
    you can find it on your workspace.. or here if you wish:
    http://apex.oracle.com/pls/apex/f?p=10540:3:15582111009947::NO
    workspace: somefeto
    user: test
    pwd: test
    Regards,
    Fateh
    If you believe that my answer was helpful to you or correct, then please mark the answer as helpful or correct ...

  • Link for BLOB column in report?

    Hi all,
    I wonder if it is possible to declare a blob colum (displayed image) as a link.
    What I try to do is to display images in a report and give the user the option to just click on the image an get a popup window where he/she can change or delete the image. As far as I have seen this is not possible with the standard link declaration. You can fill in the link parameters but this has no effect on the generated page.
    Thanks
    Andy

    I eventually found another post: APEX_UTIL.GET_BLOB was not found on this server
    In this post there is the suggestion of putting "dbms_lob.getlength("var")" after the date field in your select. So I changed my query to have it at the end, and now my format mask (DOWNLOAD:table_name:ATTACHED_FILE:FILE_ID::FILE_MIME_TYPE:FILE_NAME:::attachment:Download) works like a charm, in a classic report.

  • Blob Column in Data Template

    Below is simple Example I tried and output doesnot look right.
    Note: My Blob Database Column is "LOGO".
    Sample Data Template:
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <dataTemplate name="Employee_Listing" description="List of
    Employees">
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT EMPNO,ENAME,JOB,LOGO from
    EMP]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_EMP" source="Q1">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="LOGO" value="LOGO" />
    </group>
    </dataStructure>
    </dataTemplate>
    Sample Ouput Created
    <?xml version="1.0" encoding="UTF-8"?>
    <EMPLOYEE_LISTING>
    <LIST_G_EMP>
    <G_EMP>
    <EMPLOYEE_NUMBER>999</EMPLOYEE_NUMBER>
    <NAME>PILLAI</NAME>
    <JOB>MGR</JOB>
    <LOGO/>
    </G_EMP>
    </LIST_G_EMP>
    </EMPLOYEE_LISTING>
    My Question is :
    Does output should have only a TAG for Blob Column or it should have image data
    which can be rendered through Template using fo:instream tags.
    Am I hitting any bug which is preventing retrieving Blob data through XML data template

    I need to get data out of a BLOB column from a table in an Oracle 8i database and into a file that I can put into a MS Word template. The data in the BLOB column came from a MS Word document. What is the best way to proceed? We have a LOB datatype sample which shows how to save a blob from the DB to a local file at http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
    I'd save it to a temp file and then using word add it. You could also spawn wscript.exe to run a Windows VB Script to automate word from the java application.
    Rob

  • LOB segment size is 2 times bigger than the real data

    here's an interesting test:
    1. I created a tablespace called "smallblock" with 2K blocksize
    2. I created a table with a CLOB type field and specified the smallblock tablespace as a storage for the LOB segment:
    SCOTT@andrkydb> create table t1 (i int, b clob) lob (b) store as
    t1_lob (chunk 2K disable storage in row tablespace smallblock);
    3. I insert data into the table, using a bit less than 2K of data for the clob type column:
    SCOTT@andrkydb> begin
    2 for i in 1..1000 loop
    3 insert into t1 values (mod(i,5), rpad('*',2000,'*'));
    4 end loop;
    5 end;
    6 /
    4. Now I can see that I have an average of 2000 bytes for each lob item:
    SCOTT@andrkydb> select avg(dbms_lob.getlength(b)) from t1;
    AVG(DBMS_LOB.GETLENGTH(B))
    2000
    and that all together they take up:
    SCOTT@andrkydb> select sum(dbms_lob.getlength(b)) from t1;
    SUM(DBMS_LOB.GETLENGTH(B))
    2000000
    But when I take a look at how much is the LOB segment actually taking, I get a result, which is being a total mystery to me:
    SCOTT@andrkydb> select bytes from dba_segments where segment_name = 'T1_LOB';
    BYTES
    5242880
    What am I missing? Why is LOB segment is being ~2 times bigger than it is required by the data?
    I am on 10.2.0.3 EE, Solaris 5.10 sparc 64bit.
    Message was edited by:
    Andrei Kübar

    thanks for the link, it is good to know such thing is possible. Although I don't really see how can it help me..
    But you know, you were right regarding the smaller data amounts. I have tested with 1800 bytes of data and in this case it does fit just right.
    But this means that there is 248 bytes wasted (from my, as developer, point of view) per block! But if there is such an overhead, then I must be able to estimate it when designing the data structures. And I don't see anywhere in the docs a single word about such thing.
    Moreover, if you use NCLOB type, then only 990 bytes fits into a single 2K chunk. So the overhead might become really huge when you go over to gigabyte amounts...
    I have a LOB segment for a nclob type field in a production database, which is 5GB large and it contains only 2,2GB of real data. There is no "deleted" rows in it, I know because I have rebuilt it. So this looks like a total waste of disk space... I must say, I'm quite disappointed with this.
    - Andrei

  • Blob column slow after upgrade from 9i to 11g

    Hello, I recently upgraded 9i to 11g and the insert for blob column in one of the table is now really slow. can anyone help me please? thanks

    Welcome to the forums !
    It would be best to trace the insert statement. Pl see these threads on how to post a tuning request -
    HOW TO: Post a SQL statement tuning request - template posting
    When your query takes too long ...
    HTH
    Srini

  • Associative array type for each blob column in the table

    i am using the code in given link
    http://www.oracle.com/technology/oramag/oracle/07-jan/o17odp.html
    i chnages that code like this
    CREATE TABLE JOBS
    JOB_ID VARCHAR2(10 BYTE),
    JOB_TITLE VARCHAR2(35 BYTE),
    MIN_SALARY NUMBER(6),
    MAX_SALARY NUMBER(6),
    JOBPIC BLOB
    CREATE OR REPLACE PACKAGE associative_array
    AS
    -- define an associative array type for each column in the jobs table
    TYPE t_job_id IS TABLE OF jobs.job_id%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_job_title IS TABLE OF jobs.job_title%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_min_salary IS TABLE OF jobs.min_salary%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_max_salary IS TABLE OF jobs.max_salary%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_jobpic IS TABLE OF jobs.jobpic%TYPE
    INDEX BY PLS_INTEGER;
    -- define the procedure that will perform the array insert
    PROCEDURE array_insert (
    p_job_id IN t_job_id,
    p_job_title IN t_job_title,
    p_min_salary IN t_min_salary,
    p_max_salary IN t_max_salary,
    p_jobpic IN t_jobpic
    END associative_array;
    CREATE OR REPLACE package body SHC_OLD.associative_array as
    -- implement the procedure that will perform the array insert
    procedure array_insert (p_job_id in t_job_id,
    p_job_title in t_job_title,
    p_min_salary in t_min_salary,
    p_max_salary in t_max_salary,
    P_JOBPIC IN T_JOBPIC
    ) is
    begin
    forall i in p_job_id.first..p_job_id.last
    insert into jobs (job_id,
    job_title,
    min_salary,
    max_salary,
    JOBPIC
    values (p_job_id(i),
    p_job_title(i),
    p_min_salary(i),
    p_max_salary(i),
    P_JOBPIC(i)
    end array_insert;
    end associative_array;
    this procedure is called from .net. from .net sending blob is posiible or not.if yes how

    Ok, that won't work...you need to generate an image tag and provide the contents of the blob column as the src for the image tag.
    If you look at my blog entry -
    http://jes.blogs.shellprompt.net/2007/05/18/apex-delivering-pages-in-3-seconds-or-less/
    and download that Whitepaper that I talk about you will find an example of how to do what you want to do. Note the majority of that whitepaper is discussing other (quite advanced) topics, but there is a small part of it that shows how to display an image stored as a blob in a table.

  • Should we use LOGGING or NOLOGGING for table, lob segment, and indexes?

    We have some DML performance issue on cf contention over the tables that also include LOB segments. In this case, should we define LOGGING on tables, lob segments, and/or INDEXES?
    Based on the metalink note < Performance Degradation as a Result of 'enq: CF - contention' [ID 1072417.1]> It looks we need to turn on logging for at least table and lob segment. What about the indexes?
    Thanks!

    >
    These tables that have nologging are likely from the application team. Yes, we need to turn on the logging from nologging for tables and lob segments. What about the indexes?
    >
    Indexes only get modified when the underlying table is modified. When you need recovery you don't want to do things that can interfere with Oracle's ability to perform its normal recovery. For indexes there will never be loss of data that can't be recovered by rebuilding the index.
    But use of NOLOGGING means that NO RECOVERY is possible. For production objects you should ALWAYS use LOGGING. And even for those use cases where use of NOLOGGING is appropriate for a table (loading a large amount of data into a staging table) the indexes are typically dropped (or at least disabled) before the load and then rebuilt afterward. When they are rebuilt NOLOGGING is used during the rebuild. Normal index operations will be logged anyway so for these 'offline' staging tables the setting for the indexes doesn't really matter. Still, as a rule of thumb you only use NOLOGGING during the specific load (for a table) or rebuild (for an index) and then you would ALTER the setting to LOGGING again.
    This is from Tom Kyte in his AskTom blog from over 10 years ago and it still applies today.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5280714813869
    >
    NO NO NO -- it does not make sense to leave objects in NOLOGGING mode in a production
    instance!!!! it should be used CAREFULLY, and only in close coordination with the guys
    responsible for doing backups -- every non-logged operation performed makes media
    recovery for that segment IMPOSSIBLE until you back it up.
    >
    Use of NOLOGGING is a special-case operation. It is mainly used in Datawarehouse (OLAP systems) data processing during truncate-and-load operations on staging tables. Those are background or even offline operations and the tables are NOT accessible by end users; they are work tables used to prepare the data that will be merged to the production tables.
    1. TRUNCATE a table
    2. load the table with data
    3. process the data in the table
    In those operations the table load is seldom backed up and rarely needs recovery. So use of NOLOGGING enhances the performance of the data load and the data can be recovered, if necessary, from the source it was loaded from to begin with.
    Use of NOLOGGING is rarely, if ever, used for OLTP systems since that data needs to be recovered.

  • How to show pdf or word icons for a BLOB column in a report?

    Hi,
    I am getting interested for the blob columns, I have created some columns for storing some pdf drawings and pictures for specific items in a table, it is ok to show a text like 'download' or any other text in the report by setting the following blob attribute:
    DOWNLOAD:TICKET_DETAILS:ATTACHMENT:TICKET_DETAILS_ID::MIME_TYPE:FILE_NAME:::inline:Download
    but instead of texts, I would like to show a small pdf image for my Blob file, or a word image or Excel image, according to the different file type.
    how to do that?
    and instead of inline or attachment this two options, I would like when the user click the image of the file, the browser will show the image in a new window, or a new browser tab.
    I tried the inline option for my file at Google Chrome, but when it showed the pdf file within the browser, I cannot get back to my app by clicking the 'backward' icon at the browser menu, it will stuck there and I have to close the broswer and then login to the app again, instead of simply returning back to the previous page within the app.
    Please help me out.
    Thanks
    Peter Yawei . Zhang

    Please try using a query like below for your report.
    SELECT ticket_details_id,
    CASE
       WHEN NVL(dbms_lob.getlength(attachment),0) = 0 THEN NULL
       ELSE
          CASE
             WHEN mime_type LIKE 'image%'
                THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/image_icon.gif" /></a>'
             WHEN mime_type = 'application/pdf'
                THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="#IMAGE_PREFIX#menu/pdf_32.gif" /></a>'
             WHEN mime_type like '%ms-excel%'
                THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/excel_icon.gif" /></a>'
             WHEN mime_type like '%msword%'
                THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/word_icon.gif" /></a>'
             WHEN mime_type like '%ms-powerpoint%'
                THEN '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/powerpoint_icon.gif" /></a>'
             ELSE '<a href="'||apex_util.get_blob_file_src('P101_ATTACHMENT',ticket_details_id)||'" target="_blank"><img src="/i/office_icon.gif" /></a>'
          END
    END attachment
    FROM ticket_details
    WHERE ticket_details_id = :P102_TICKET_DETAILS_IDPlease note that I am using APEX_UTIL.GET_BLOB_FILE_SRC function to download the BLOB files. The first parameter of this function in my example query is P101_ATTACHMENT, which refers to page item of type "File Browse" on page 101, which is a DML form on table TICKET_DETAILS. Replace it with the appropriate page number. Please refer to "Working With BLOBs Procedurally" section of this APEX 3.2 documentation for more: [url http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/advnc.htm#sthref2199]http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/advnc.htm#sthref2199
    Also I have the gif images representing various MIME types on my file server. For e.g., /i/excel_icon.gif. You can use #WORKSPACE_IMAGES# if you want to.

  • Problem with download link for a BLOB Column in a "Classic report"

    I am having a problem where I cannot make a download link for a blob column function in a "classic" (non-interactive) report. I went through the tutorial on this topic and it was great help it working out the minor bugs, but I get a 404 error (apex_util.get_BLOB not found). For testing purposes I went ahead and created a an identical report on the same page that is an "Interactive report" and it works like a charm. Same query, same BLOB formatting Mask, pulling data from the same table. So, it really doesn't seem like an issue with the grants, since both reports should be executing as the same user.
    I know it sounds like the obvious answer is to just go with the interactive report and my problem is solved, but the rest of this site uses classic reports, and I don't need the sort features of an interactive report, and the slightly different style of the the report really stands out even if I turn off all the bells and whistles. I don't want to change the css to make them look identical, I just want a regular report to work.

    I eventually found another post: APEX_UTIL.GET_BLOB was not found on this server
    In this post there is the suggestion of putting "dbms_lob.getlength("var")" after the date field in your select. So I changed my query to have it at the end, and now my format mask (DOWNLOAD:table_name:ATTACHED_FILE:FILE_ID::FILE_MIME_TYPE:FILE_NAME:::attachment:Download) works like a charm, in a classic report.

  • BLOB column -- no preview for jpg file

    Hi,
    I'm trying to create something close to the sample application with some other products. I have a table with BLOB column for the products jpg files. However, I have encountered the following challenge: the preview is not working.
    http://i39.tinypic.com/2vtbn90.png
    Can someone please advise?

    Well that explains the problem. The url NEEDS to be a viable url to an image -- a procedure needs to be called to (in essence) spit out the blob to a mime-type of jpeg so the browser can display it. Although there are several ways to achieve this -- since you basically see it "working in one place but not another", take a look at how the working image's URL is generated on the page where it's working.. APEX offers an item type that can display an image, but you can also use PLSQL code to insert such in the rendered output anywhere. If none of this helps, there are many hits via google that discuss all of this in the detail you'll need.

  • I have a question for you: Inserting Word document in BLOB column

    Hey Experts,
    I have found a good info and a sample on how to achieve this on
    http://www.sys-con.com/java/source/5-6/code.cfm?Page=76.
    declare
    f_lob bfile;
    b_lob blob;
    begin
    insert into sam_emp(empno,ename,resume)
    values ( 9001, 'Samir',empty_blob() )
    return risumi into b_lob;
    f_lob := bfilename( 'MY_FILES', 'MyResume.doc' );
    dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
    dbms_lob.loadfromfile
    ( b_lob, f_lob, dbms_lob.getlength(f_lob) );
    dbms_lob.fileclose(f_lob);
    commit;
    end;
    I have a jsp project and the users ( on the client side)must be
    able to create a word document and send it to the server with an
    uplaod servlet. With another servlet or jsp i want to process
    this word document in BLOB column using JAVA. The sample above
    uses PL/SQL to achieve this. Is there a way i can do this in my
    servlet/jsp to do the same thing?
    Any hints are welcome!

    The option should be visible here: http://support.mozilla.com/en-US/kb/Printing%20a%20web%20page#w_print-window-settings
    Print range section - Lets you specify which pages of the current web page are printed:
    * Select '''All''' to print everything.
    * Select '''Pages''' and enter the range of pages you want to print. For example, selecting "from 1 to 1" prints the first page only.
    * Select '''Selection''' to print only the part the page you've highlighted.
    Does it work for you?

  • DOES 9i OAS perform CMP for BLOB types?

    DOES 9i OAS perform CMP for BLOB types? Perhaps more on an OAS question, but anyone have experience using CMP to persist anythin other than simple types? Any one try BLOBs intermedia types?
    Thanks

    I assume you mean 9iAS...
    At least BC4J (in J2EE) does...
    http://otn.oracle.com/products/bc4j/htdocs/cmpwp.html
    I am not sure about our straight J2EE implemetation. You might want to ask in the J2EE forum
    Re: fonts on gentoo linux & cursor size

  • How to generate a .pdf output for a BLOB column?

    Hi friends,
    (Forms 6i)
    I have a .pdf into a blob column and I want to show that .pdf as my report output...
    Example-> The report only have this query:
    select myblob_ column
    from mytable
    the column in database has the .pdf ... but when I execute the report, it only appears some information when I put the item to show as Text... But obviously it's not the ofriginal pdf...
    If I try to put as OLE2 doesn't appear either anything and if I try to put it as an Image, it appears a message error.
    Any ideas?
    Thanks.
    Jose.

    Hello,
    How has been "uploaded" the PDF file in the BLOB ?
    Regards

Maybe you are looking for

  • 3.3 MB of 3.3 MB .... 3.5 MB of 3.5 MB .... etc.

    Hi folks. Last night I noticed my regular Time Machine scheduled backup (to a 500 GB Time Capsule, connected via Ethernet) was taking longer than usual. When I peeked in the Time Machine menu, I noticed that the number for 'total amount to be backed

  • Can i see the macro code in labview?

    i want to know how to make the macro in labview in order to be able to modify them in labview, so i don't want to write the named of macro made in excel or word and saved there, executing it with Run Macro where i call the macro with name.xls!macro,

  • Using Lightroom for Event Photography

    I use Lightroom for my entire workflow at events that I cover where I will import from multiple memory cards throughout the day. One of my basic Import Settings will achieve 90% of what I need but I will still spend time with every customer, helping

  • Apple TV 2, DVD's, and external hard drives

    Hello All...Here is what I am trying to accomplish: 1 Burn DVD's to external hard drive 2 Use Apple TV to play DVD's on brand new Panasonic Plasma via the external storage device. I've got a 3 month old macbook pro running mountain lion, a Buffalo Mi

  • SMQ1 status CPICERR - Error when opening an RFC connection

    Hie we have all our out bound queus failing with status CPICERR - Error when opening an RFC connection.. I checked RFC connections from CRM - R3 and everything looked ok.. Can anyone guess what is the problem? Regards, Lata.