12-09-2008 9:35 PM
dear all,
I was able to figure out that there are millions of records in my table (cluster table) by writing a short program and running it in the background. But is there a way to determine the size of the table in kbs.Example: I know i have 73 million records in my table and there are 300 fields, is there a way to ascertain the size of the table in KBs. DB02 doesnt show this information for cluster tables.
Please let me know if there is a way to determine that.
thank,
Krrish
12-22-2008 1:24 PM
Hi Krrish,
If u wanted to see the size of the table, just place 'write' after the code i had given
like this:
write:/ size-kb.
Sorry, i had not seen ur reply.
If it works, pl close the thread
thanks\
Mahesh
12-09-2008 9:42 PM
12-10-2008 5:05 AM
Hi,
You can use this Native Sql statement, it gives the actual table size.
DATA: BEGIN OF SIZE OCCURS 0,
KB LIKE SEGMENTS_S-KBYTES,
END OF SIZE.
EXEC SQL.
SELECT SUM(BYTES)/1024 FROM DBA_SEGMENTS WHERE
SEGMENT_NAME = :TABNAME
INTO :SIZE
ENDEXEC.
thanks
Mahesh
12-10-2008 2:57 PM
Hello Mahesh,
I have used the program you suggested in SE38 and this is what it looks like:
DATA: BEGIN OF SIZE OCCURS 0,
KB LIKE SEGMENTS_S-KBYTES,
END OF SIZE.
EXEC SQL.
SELECT SUM(BYTES)/1024 FROM DBA_SEGMENTS WHERE
SEGMENT_NAME = :'BSEG'
INTO :SIZE
ENDEXEC.
But for some reason when i hit direct processing or execute it doesnt do a thing. Where should i see the result.
Do i need to run this in the background and if so where can i see the output, please provide me the additional codeing, if i run it in the background and need to see the output.
Thanks,
12-11-2008 9:56 PM
12-10-2008 5:27 AM
Hi
[https://forums.sdn.sap.com/click.jspa?searchID=19733724&messageID=6420846]
12-10-2008 6:28 AM
12-12-2008 5:50 AM
DATA: BEGIN OF SIZE OCCURS 0,
KB LIKE SEGMENTS_S-KBYTES,
END OF SIZE.
EXEC SQL.
SELECT SUM(BYTES)/1024 FROM DBA_SEGMENTS WHERE
SEGMENT_NAME = :'BSEG'
INTO :SIZE
ENDEXEC.
WRITE 😕 'SIZE:', SIZE. " TO display the result
Add the above line & then execute the program.
12-16-2008 3:22 PM
I get a message ' "SIZE" cannot be converted to a character-type field'
12-22-2008 1:24 PM
Hi Krrish,
If u wanted to see the size of the table, just place 'write' after the code i had given
like this:
write:/ size-kb.
Sorry, i had not seen ur reply.
If it works, pl close the thread
thanks\
Mahesh