Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CLOB or VARCHAR

721178Apr 19 2010 — edited May 11 2010
Hi,

I have a requirement where we need to store more than 16K characters in a Table. As far as I understand we have two approaches for the same.

1. Declare a column as CLOB and keep the string as it is.
2. Declare a column of VARCHAR(4000). Split the character string into 4K strings and store it in multiple rows as illustrated below. While retrieving we need to combine all the stings based on a column defined (e.g. STRING_ID here).
ID	STRING_ID	STRING
------	--------------	-------------------------------
1	1		A ......... F (4000 Chars)
1	2		G ......... M (4000 Chars)
1	3		N ......... T (4000 Chars)
1	4		U ......... Z (4000 Chars)
------	--------------	-------------------------------
My question is which method out of these would perform better, as the underlying table is going to be accessed quite frequently. There would be updates as well on the STRING column.

Thanks for your time
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2010
Added on Apr 19 2010
7 comments
3,257 views