Results 1 to 4 of 4

Thread: Varchar or clob

  1. #1
    Join Date
    Apr 2004
    Posts
    3

    Unanswered: Varchar or clob

    I'm a newbie in Oracle and have a question: I'm going to record a variable that is about 30000 bytes long.
    Performance-wise is it best to use varchar or shall I use clob ? I'm using NetCobol in Linux environment and Oracle 9.

    How will the variables look like in cobol include members?
    And how do select and insert statments look like?

    Thanks

  2. #2
    Join Date
    Apr 2004
    Posts
    3

    Re: Varchar or clob

    bump

  3. #3
    Join Date
    Dec 2003
    Location
    Oklahoma, USA
    Posts
    354
    Since you are inserting into an Oracle table, you have a hard limit on the number of characters the VARCHAR2 type will accept. It is 4000 characters.

    If you are using PL/SQL, Oracle's procedural language, to run some procedure, the VARCHAR2 type can accpept up to 32,000 characters to manipulate in MEMORY only, but if you plan on saving this data to a table, it must be saved to a CLOB or multiple VARCHAR2 columns.

    This in mind, I think you will be using a CLOB type to record your variable.

    JoeB

  4. #4
    Join Date
    Apr 2004
    Posts
    3
    Thanks!

    I was wondering if there are alternatives to CLOB use. My big problem is "performance". I don't know if it is better to use a single CLOB, multiple instances of 4000-lenght records, multiple 4000-lenght columns on the same record or..... what else?

    any help appreciated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •