How to find the size of a table with CLOB
Hello
I have a table with CLOB as follows:
SQL > desc INFO_MESSAGES
Name Null? Type
----------------------------------------- -------- ----------------------------
CLNT_OID NOT NULL VARCHAR2 (16)
USR_OID NOT NULL VARCHAR2 (16)
LAST_client_msg_ID VARCHAR2 (36)
LAST_client_msg_DATE DATE
LAST_client_msg CLOB
LAST_USR_MSG_BOD_ID VARCHAR2 (36)
DATE OF LAST_USR_MSG_DATE
CLOB LAST_USR_MSG
Now I just want to find out what is the size/area total absorbed by the table (including the CLOB columns), so how can I find? I think that the usual command does not - the
Select format from dba_segments where nom_segment = "INFO_MESSAGES" is only showing 7 MB, while I think that the table has several GB of space due to the CLOB.
Also to add one more detail: when dba_segments seeking, I see a result like this:
Select * of dba_segments order by bytes DESC;
MIGRTN SYS_LOB0000111131C00008$ $ LOBSEGMENT SAMS DATA1 20690 6 1963 14528000 119013376000 <-the top row
MIGRTN this is the schema where this INFO_MESSAGES table is present.
Thanks,
OrauserN
you will need to add the segment_size of the LOB segments to the segment_size of the table. The connection between the two pieces of information you find in USER_LOBS (or the corresponding ALL_, DBA_ objects).
Tags: Database
Similar Questions
-
GetLength errors on CLOB. Retrieves the size of a table with CLOB columns
Hello
I try to find the size of a CLOB to a table column and get the error
PLS-00306: wrong number or types of arguments in the call to "GETLENGTH.
When you try to use dbms_lob.getlength. Here is the code
declare
number num.
Start
for rec in (select xmlupload from FILE_TABLE where file_table_id = 33635) loop
NUM: = dbms_lob.getLength (rec.xmlupload);
end loop;
dbms_output.put_line (num);
end;
Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
I'm actually trying to find the size of a table with CLOB columns, is there an easy way to do this Besides using getlength and without having to contact the Administrators (they are outsourced)?It works fine on my computer, the version is also 10g.
SQL> declare 2 num number; 3 begin 4 for rec in (select cntnt from ims_toms_msge where rownum<3) loop 5 num := dbms_lob.getLength(rec.cntnt); 6 dbms_output.put_line(num); 7 end loop; 8 9 end; 10 / 3837 3837 PL/SQL procedure successfully completed.
You should check if xmlupload is the CLOB data type.
In addition, if you just want to get the CLOB size, you can use LENGTH() as well, you will get the same result;SQL> select length(cntnt), dbms_lob.getLength(cntnt) from ims_toms_msge where rownum<2; LENGTH(CNTNT) DBMS_LOB.GETLENGTH(CNTNT) ------------- ------------------------- 3837 3837
Published by: PhoenixBai on September 24, 2009 13:40
-
Find the size of a table with partitions; Two questions
DB version: 11.2.0.4
Platform: Oracle Linux 6.4
The slot table MH_PKT_HEADR in UTMSBL schema has more than 5000 partitions.
Because there partitions, you cannot use just view DBA_SEGMENTS to determine the size of the table.
So, I tried to use 2 SQLs mentioned below. Query1 returned 5 GB. But Query2 has returned a value zero. Query2 is actually a note metalink mentioned below, so he cannot deceive you, I guess.
That is the reliable accurate query: Query1 or Query2?
No idea why Query2 returns a Null value?
- Query1
fixed lines 200
Col TABLE_NAME format a18
with
BaseData as)
Select the owner
nom_segment
segment_type
, round (sum (bytes) / 1024/1024/1024) GB
sum (bytes) bytes
count (*) segment_count
of s dba_segments
Group by owner, nom_segment, segment_type
)
,
LOB type as data)
Select the owner
table_name
nom_segment
of dba_lobs
)
,
all_segs like)
Select coalesce (lobs.table_name, basedata.segment_name) table_name
basedata.*
of basedata
left outer join
type LOB data
on (basedata.segment_name = lobs.segment_name
and basedata.owner = lobs.owner)
)
Select table_name
sum (bytes) bytes
sum (gb) GB
of all_segs
where table_name = 'MH_PKT_HEADR'.
and owner = 'UTMSBL. '
Table_name group;
TABLE_NAME BYTES GB
------------------ ---------- ----------
5869469696 5 MH_PKT_HEADR
- Request 2
-Source: how to calculate the size of a Table that contains outline CLOB and BLOB (Doc ID 118531.1()
SELECT
(SELECT SUM (S.BYTES) - the Segment of Table size
FROM DBA_SEGMENTS S
WHERE S.OWNER = UPPER ('UTMSBL') AND
(S.SEGMENT_NAME = UPPER ('MH_PKT_HEADR'))) +
(SELECT SUM (S.BYTES) - the size of the Lob Segment
FROM DBA_SEGMENTS S, DBA_LOBS L
WHERE S.OWNER = UPPER ('UTMSBL') AND
(L.SEGMENT_NAME = S.SEGMENT_NAME AND L.TABLE_NAME = UPPER('MH_PKT_HEADR') AND L.OWNER = UPPER('UTMSBL'))) +
(SELECT SUM (S.BYTES) - the size of the Lob Index
FROM DBA_SEGMENTS S, DBA_INDEXES I
WHERE S.OWNER = UPPER ('UTMSBL') AND
(I.INDEX_NAME = S.SEGMENT_NAME AND I.TABLE_NAME = UPPER('MH_PKT_HEADR') AND INDEX_TYPE = 'LOB' AND I.OWNER = UPPER('UTMSBL')))
"TOTAL TABLE SIZE.
FROM DUAL;
TOTAL TABLE SIZE
----------------
SELECT
(SELECT nvl (SUM (S.BYTES), 0)-dimensions of the Segment Table)
FROM DBA_SEGMENTS S
WHERE S.OWNER = UPPER ('UTMSBL') AND
(S.SEGMENT_NAME = UPPER ('MH_PKT_HEADR'))) +
(SELECT nvl (SUM (S.BYTES), 0)-Segment Lob size)
FROM DBA_SEGMENTS S, DBA_LOBS L
WHERE S.OWNER = UPPER ('UTMSBL') AND
(L.SEGMENT_NAME = S.SEGMENT_NAME AND L.TABLE_NAME = UPPER('MH_PKT_HEADR') AND L.OWNER = UPPER('UTMSBL'))) +
(SELECT nvl (SUM (S.BYTES), 0)-size of the Lob Index)
FROM DBA_SEGMENTS S, DBA_INDEXES I
WHERE S.OWNER = UPPER ('UTMSBL') AND
(I.INDEX_NAME = S.SEGMENT_NAME AND I.TABLE_NAME = UPPER('MH_PKT_HEADR') AND INDEX_TYPE = 'LOB' AND I.OWNER = UPPER('UTMSBL')))
"TOTAL TABLE SIZE.
FROM DUAL;
David Fitzjarrell
-
How to find the size of the table?
Hi all
Can anyone suggest how to find the size of the table? I had a few (15272 selected lines) on the name of "CMPT_" How can I check only 'CMPT_' size tables?
Please someone help give the SQL query to run.
Thanks in advance.
Vincent
madala03 wrote:
Hi thanks for the reply
I'm out like below
SUM(BYTES/1024/1024)
--------------------
25383.25
But how to check all the name of tables CMPT and their sizes?
Select nom_segment, dba_Segments sum(bytes/1024/1024) where nom_segment like ' % CMPT GROUP BY nom_segment;
-
How to find the size of the partitioned tables?
How to find the size of the partitioned tables?Select nom_segment, sum (bytes) /(1024*1024) 'Size in MB' from dba_segments
where owner = 'owner name' and segment_type like '% PARTITION % '.
Group by nom_segment; -
How to find the size of the downloaded image on a column of type blob in a table?
How to find the size of the downloaded image on a column of type blob in a table?Vidya,
You can use the built in function dbms_lob.getlength to get the length (size) of a LOB column or a bfile type.
Check out this link.http://download.Oracle.com/docs/CD/B10501_01/AppDev.920/a96612/d_lob2.htm#1008995
-
How to find the size of the semantic model
Hi all
Please can you tell me how to find the size of the semantic model.
Thank you
INDUHi Indu,
A couple of several things:
1 we still need an application, in order to account for the storage of the Table in the Application
This query gives you the name of application table
Select the table table_name from mdsys.sem_model$
where model_name = ''; This will give you the size in MB
Select semmodel.table_name, dbaseg.bytes/1024/1024 MB
of mdsys.sem_model$ semmodel, dba_segments dbaseg
where semmodel.table_name = dbaseg.segment_name
and semmodel.model_name = ''; 2. If the model is the only one of the semantic network, you can get the space used by the table of $ RDF_VALUE using this query
Select bytes/1024/1024 MB dba_segments where nom_segment = '$RDF_VALUE ';
If there are several models, this space is shared between all of them.
Kind regards!
Jorge -
How to find the size of the virtual server?
Hello
We intend to pass our applications 4 virtual servers has 2 physical servers. In this process, we need to identify the size of the current virtual servers to use as a starting point to configure or add the size in physical server. can anyone provide information on whats stats to be noticed and how to find the size of the current virtual servers?
Thank you
Hi Sekhar, there.
in general, it is a fairly complex task if you want to size the new platform correctly, i.e. not to oversize it and have very low use below, i.e. spend too much on equipment.
In fact, it's the first thing to consider the level of use of the new platform. Most likely your organization (HW and infrastructure) has targets to a minimum. optimal and maximum usage levels.
In the case where you do not have this as a starting point, and then you continue with load average and the current peak (CPU, RAM, NW). To these basic lines, you can use the statistics of WLS Admin Console, where the use of CPU and memory statistics are presented since the server was last started. For more detailed statistics, you can use WLDF to capture measures key at regular intervals, and then base your analysis of these data.
Finally and above all, the size of FS, but I've seen some comments above related to the size of the FS.
HTH,
A.
-
How to find the size of the text string...
Hi friends,
How to find the size of the text, in KB or in bytes or MB, I have a text box control, when I type a text in do I find the size of the text that is entered control.please of entry help very urgent...
Thnaks
Balu-
Hi David,
Nice Solution, but I think that it will not give the exact size of the string for a particular case where the string contains UTF string as a single letter format can exceed more than 1 byte.
So I think it should be modified as:
private function getTextSize(value:String): String
{
var div_by:int = 100;
var sze_is:String = 'KB ';
var len_is:int = getUTFLength (value); now the length is actually measured, regardless of the format of the text
If (len_is > 1000000)
{
div_by = 100000;
sze_is = 'mb ';
}
Return(string(math.round(len_is/div_by)/10)+sze_is);
}
private void getUTFLength(value:String):int
{
var byteArray:ByteArray = new ByteArray();
byteArray.writeUTFBytes (value);
Return CharArray.Length;
}Concerning
-Vikash
-
How to find the size of the scheme with or without fragmentation
Hello Sir,
How to find the size of the scheme with or without fragmentation?to find all of the bytes used by a schema, you can add the bytes for the owner of the dba_segments views.
for fragmentation, I guess you want to know about the space left between the segments.
finding depends on the design and standards of your database.
Each scheme has its own storage space? If Yes, then you can take the total space used in storage and then subtract the number of the dba_segments.
-
How to get the title of a table with FDK?
How to get the title of a table with ad FDK C++?
I did people. I get objects table paragraph and later the textual elements for each of them.
-
How to find the size of the plsql packages
Oracle: 10.2.0.4
Operating system: Solaris
Question: DB has about 2000 packages that are in development mode. In the case where if we want to find the size of the package what is the mechanism of the dictionary tables. ?
Is there a way, that the size is stored in the tables of the dictionary?
PL. Let me know.Hello
Have you checked PARSED_SIZE column in the USER_OBJECT_SIZE data dictionary view, in my response above?concerning
-
How to find the size of the list box
Hello
I have a list with 4itmes in that box. I want the list box size, just to busy data in the listbox. Is it possible that we can find the size of the list box? Help, please.
Here you go
-
How to find the size of the Document
Is it possible to find the size of the document after cropping.
I discovered that saving the file for the web will show the size of the file.
Are there other alternatives
Firefox,
Window > Document Info > Document tells you the size of the artboard (it is the importance of the harvest in new versions); in older versions, you can object > crop area/guides > release to see the W and H of the importance of the harvest and oppose > crop area/guides > Make or just Ctrl / Cmd + Z to restore.
No relevant information you know: transform it and info palettes/panels show the objects selected as W and H (Bounding Box) size.
-
How to find page sizes in one document with different page sizes
Hi Ive been given a document that has multiple page sizes in it, how can I find the size of each page. I tried the preparation of the document, but the size of the first page appears
Doent matter now, I thought about it. for those who want you to select the page tool click on each page and the dimensions are at the top
Maybe you are looking for
-
VPN using hotspot with ios 10 does not
I often work off site and use my iPhone AT & T s 6 to attach my work Windows 10 Pro (processor ASUS T300CHI) Tablet. Although many places I work have Wifi, most only allow VPN I need to connect to my work server. After updating ios 10 (I'm on 10.0.
-
Need help to migrate from 2007 to 2015 macbook pro macbook
I'm helping a friend move their files and information of their old macbook 2007 system to a 2015 new macbook pro. They had been saving their macbook with time machine, but the new computer will not recognize the time machine backup, because the opera
-
Now I can easily connect USRPs to my PC. But I wonder if I move the USRPs into another room and assign a static Ip address in the pool of the Ministry of the IPs, I can still communicate with them via Ethernet?It depends on the device's default subne
-
What type of disc is model 7kc-00003, it is this oem or retail?
Original title: os disk What type of disc is model 7kc-00003, it is this oem or retail? Tom
-
Elgato HD game does not capture installing drivers on Windows 8.
I recently bought and HD Elgato and setting everything up, my device does not appear in the Elgato HD software. All cords and gear themselves seem to work fine, because my game flow always appears on the screen and television only for this, when it i