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

Similar Messages

  • Deducted time more than the real duration

    Hi,
    I recently subscribed to 60 min/month for calls to landlines of my country. The first call I made had a duration of 1min:56sec. Afterwards I checked online and the time that was deducted from my account was 3min! 
    Can you please let me know why I have been deducted more time than the real duration of my call?
    Looking forward to hearing from soon.
    Thanks,
    Panos

    PanMi wrote:
    The first call I made had a duration of 1min:56sec. Afterwards I checked online and the time that was deducted from my account was 3min!
    Hello,
    Was it exactly 1:56?  Was that your timing?
    The official timing mechanism which Skype uses is very accurate.
    If, for example, the actual time was a few seconds longer at - say - 2:02 you would be charged for 3:00 (Skype charges by the minute).
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • I record a video of my screen in Quicktime.  I then open the video in iMovie and do the most basic of edits: cutting portions of the .mov I don't need.  The edited file is ~2-3 times bigger than the original Quicktime file.  What gives?

    So my question is, how do I get iMovie to edit the file without changing the size of it?  It can't improve the quality of the Quicktime movie by making the file size bigger, so why does it do this?  The Optimization options do not help the situation.  Any insight into this is greatly appreciated!

    Start '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Firefox in Safe Mode]''' {web Link} by holding down the '''<Shift ''(Mac Options)'' >''' key, and then starting Firefox. Is the problem still there?

  • IPhoto library takes more space than the actual data that is in it.

    Why is iPhoto Library taking almost 10 GB more than the real data i have in it ?

    I have the original photos in a folder and it takes 10.7 GB of space in my hard drive, but when I get info from the iPhoto library its taking 17.9 GB of space
    Do you have two copies of the photos on the HD? Why?
    I have read that every single move I do in iPhoto it makes a copy of the file for backup no matter how big the photo is, even if you just rotate the picture,
    When you edit a pic - including Rotation - iPhoto makes a copy of the Original and carries out the edit on that copy and saves it. However, if you then make another edit it does not make a second copy, it simply destroys the first copy and applies the total edits to a new copy. So there is never more than your Original and a single Modified version of your pics.
    that’s just taking so much space I need is there any way to make iPhoto stop doing that?
    No. If you don't want that, simply don't use iPhoto. IPhoto is a Digital Asset Manager and it coheres to the best practices of DAM by treating your original file like a film photographer protects his negative.
    Also when look in the finder and search for every file I have used during the day, if I had just open iPhoto once it will apper a lot of this files called like Album.999001.ipmeta that are from iphot. If I haven used it just opened it why is it showing that ?
    This is just the way that iPhoto works. These ipmeta files are tiny 4kb files. They take up the smallest amount of disk space possible.
    Regards
    TD

  • I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. What is the best way to do this

    I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. Even when I save it, the image quality at minimum the file size is 10.9 MB. What is the best way to do this

    @Barbara – What purpose is that PDF for? Print? Web?
    If web purpose, you could convert CMYK images to sRGB. That would reduce the file size as well.
    A final resort to bring down file size is:
    1. Print to PostScript
    2. Distill to PDF
    That would bring file size down even more. About 20%, depending on the images and other contents you are using, compared with the Acrobat Pro method. If you like you could send me a personal message, so we could exchange mail addresses. I could test for you. Just provide the highres PDF without any downsampling and transparency intact. Best provide a PDF/X-4.
    I will place the PDF in InDesign, print to PostScript, distill to PDF.
    Uwe

  • Index size (row_nums) is bigger than the tables row

    Hi everyone,
    I'm encountering some strange problems with the CBO in Oracle 10.2.0.3 - it's telling me that I have more rows in the indexes than there are rows in the tables.
    I've tried all combinations of dbms_stats and analyse and cannot understand how the CBO comes up with such numbers. I've even done a "delete statistics" and
    Re-analysed the table and indexes but it doesn't help.
    The command I used is variations of the following:
    exec
    DBMS_STATS.GATHER_TABLE_STATS(ownname=>'MBS',tabname=>'READINGTOU', -
    estimate_percent=>dbms_stats.auto_sample_size,method_opt=>'FOR COLUMNS PROCESSSTATUS',degree=>2);
    EVEN TRIED
    exec sys.dbms_utility.analyze_schema('MBS','ESTIMATE', estimate_percent => 15);
    I've even used estimate_percent of 50 and still getting lower numbers for the table.
    Initially I was afraid that since the index is larger than the table, the index would never be used. So the question is, does it really matter that the indexes' num_rows is bigger than the tables' num_rows? What is the consequence of this? And how do I get the optimizer to correct the differences in the stats. The table is 30G in size and growing, so a COMPUTE is out of the question.
    but have the same problem in dev..and i did the COMPUTE in dev...get the same thing... I have more rows in the indexes than there are rows in the tables
    Edited by: user630084 on Mar 11, 2009 10:45 AM

    Is your issue that you are having problems with the execution plans of queries referencing these objects? Or is your problem that you are observing more num_rows in the index than in the table when you query the data dictionary?
    If it's the latter then there's really no concern (unless the estimates are insanely inconsistent). The statistics are estimates and as such, will not be 100% accurate, though they should do a reasonable job of representing the data in your system (when they don't, then you have an issue, but we've seen nothing to indicate that as of yet).

  • What happens when an iPod is synchronized with an iTunes library that is bigger than the available space on the iPod?

    What happens when an iPod is synchronized with an iTunes library that is bigger than the available space on the iPod? I did this some time ago. On screen was shown available space somewhat less than 120 GB, but maybe somewhere between 10 and 20 GB more in the library. I had to get the iPod updated anyway, so I did proceed. However, afterwards the total content of the library was only about 110 GB. Now I wonder what did actually happen. Was the first sign only corrected for double copies of the same files or lost files or where files deleted from iTunes? And if files where deleted from iTunes, were they also deleted from my computer?

    Same as you would if you bought a pc; copy everything from your old computer to your new one.  Then you can just sync everything from the new computer, as you did with the old one.

  • How to add a graphic watermark that is bigger than the photo?

    How to add a graphic watermark that is bigger than the photo?
         Basically I want to add a watermark that is a border, like "outside stroke" so that it doesn't clip the photo.
         Upper, left and right side are 10px and on the bottom is my signature that is 40px high. I know how to do this in Photoshop, but can't figgure it out in Lightroom.
         The inset function with negative numbers doesn't work, because it only export to the size of the exported image, instead it should resize the image with those 10px up, left and right and 40px on      the bottom.
    My bordes look like this either one of the two can be used, and if you scroll down you will se how the end result should look like.
    And below is what it should look like, so that Lightroom doesn't clip the photo.

    Are you sure the focus of your piano roll is on the right track? Are you zoomed in/out enough?

  • How do I insert a section with another time signature than the one im inser

    How do I insert a section with another time signature than the one im inser

    Yeah I've been trying to figure this out as well, for example... my song might be 90 bpm and I want to program another track using midi but have it play at 180 bpm. The only way I've found to work around this is to write my 180 bpm part make a sample of this and then loop this into the 90 bpm song.

  • Saving as a PDF -How do you make the PDF not bigger than the original file?

    I am running Mac OS X Panther.
    I understand that Mac OS X creates a "Digital Master" PDF file, which is larger than a typical PDF file because the resolution of images in the file is not scaled down. The PDF file includes each font character used in the document.
    Problem is this.
    I actually want the PDF NOT to be bigger than the original document file.
    Can anyone please help?
    Thanks
    J Slater

    jslat,
    It's probably most important to know exactly what you intend to do with the saved pdf file? Are you going to need to print the pdf etc.?
    This Apple Knowledge Base article may help if you haven't already read it:
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh1035.html
    littleshoulders [:-)
    edit: You have posted in the 10.3 Panther OS and earlier forum and you appear to be using 10.4 (Tiger) by your computer specs below your topic which may handle pdf's somewhat differently. In your post you mention Panther so I just wanted to clarify if need be.
    Message was edited by: littleshoulders

  • Image bigger than the screen

    i have a 4rd generation ipod touch and suddenly the image of desktop is bigger than the screen. i dont know how to solve this.

    Double tap the screen with 3 fingers.
    Stedman

  • How do i make the whole veiw of the computer smaller? it seems bigger than the whole screen

    how do i make the whole veiw of the computer smaller? it seems bigger than the whole screen

    often, this happens when you blunder into Accessibility/ Universal Access features, such as screen Zooming.
    System Preferences > Accessibility/ Universal Access > Seeing

  • What if i have a large question, bigger than the input box

    what if i have a large worded question on this forum, bigger than the input box?
    i know it scrolls, but i quite often have something more than a line of text as a question ,and would like to see all of what i have to say?

    The title/subject of a topic shouldn't be more than a few words that summarize the nature of your question.  Long topics, and other useless ones such as HELP ME!, don't do much to attact the correct amount of attention, and can actually drive away potential help.  What your topic question should do is give others an idea about whether they should open your topic rather than one of the hundreds of others, i.e. if it is something they now about or are interested in - use the message body to go into details.

  • How do i get siri to set a reminder for a time other than the appt time. For example:  I want Siri to remind me at 10:00 pm on Monday that I have a dentist appt. at 9:00 am on Tuesday. She screws up the dates and times no matter what I say

    What I can't figure out is how to set a reminder for a time other than the appt time. For example:  I want Siri to remind me at 10:00 pm on Monday that I have a dentist appt. at 9:00 am on Tuesday. She screws up the dates and times no matter what I say

    "Remind me at 10:00 pm on Monday".  Siri: "Ok, just tell me what you want to be reminded about".  "I have a dentist appointment on 9:00 am on Tuesday".  Siri should set it up correctly.

  • App (game) is bigger than the display - but zoom is deactivated

    i have purchased an app (a game, ice age village) for mit ipad2 - but i cannot play it because the picture resolution is too big.....it means the picture ist bigger than the display. It seems like the display ist too small - the picture too big for the ipad.
    Reinstall again didn't work - i also tried to reset the ipad.
    Nothing works.
    I was also comparing all settings with my friends ipad2..... the app is running without problems on his ipad.
    I'm afraid, that there is an error on my ipad
    Does anyone know the solution for this problem?
    (i have tried everythin on the support-site form apple ipad - nothing works)
    thanx....

    I checked the monitor's settings. There are different zooming levels but nothing works properly. I think this is a specific radeon/linux problem because i tried the monitor with a Macbook Air via HDMI/mini DisplayPort adapter and the display is set correctly.

Maybe you are looking for