Skip to Main Content

Oracle Database Discussions

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 vs VARCHAR2 Advice

oramark14Sep 14 2007 — edited Sep 14 2007
Hi,

I have multiple VARCHAR2(4000) columns in my Oracle 10g database. Application users usually enter notes, descriptions, and other text into these fields. Very rarely does the data ever get to 4000 characters, but it has happened on rare occurrences... maybe one or two times a year. So, I am considering changing to a CLOB.

I am primarily concerned with data retrieval performance through ad hoc queries in the application. If the CLOB is going to be slower to retrieve and present data to users in the application, I would rather stick with the VARCHAR2 field. If users absolutely must insert data over 4000 characters, I still offer them the ability to associate that data with the record using file attachments stored outside the db.

Also, what about the difference in querying on the specific column... can a CLOB field even be queried on? Could I find a specific word in the field, and if so, is there a performance impact?

I basically just want to know if I should change these columns to CLOB so that users can enter however much they want to, or since it rarely happens, should I leave it at VARCHAR2 and restrict users to the maximum 4000 characters for better application performance.

Thanks for the advice!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2007
Added on Sep 14 2007
2 comments
1,217 views