Re: LONG vs. Multiple VARCHAR2
Date: 1995/08/08
Message-ID: <408508$6vd_at_hpcc48.corp.hp.com>#1/1
Michael Contillo (contillo_at_kaiwan.com) wrote:
: My company is "upsizing" from Clipper to Oracle. We have one field
: where the user's can type in freeform text. For those familiar with
: xBase, this field is a MEMO field. In designing our Oracle tables I
: had thought that this field would be a LONG, however our consultant
: wants us to create a separate table where this freeform text would be
: "chunked" into several rows and stored in VARCHAR2 columns.
: I understand that one of the advantages of this is that a VARCHAR2 can
: be searched while a long cannot, but our users currently cannot search
: the notes, so this is not a compelling reason to go to the trouble of
: writing all of the "chunking" code that would be required to
: accomplish this.
: My question is: Given the situation, what are the advantages and
: disadvantages of using a LONG datatype to store freeform text?
Advantages of using LONG:
Disadvantages of using LONG:
- Poorer performance.
- No search ability.
- Chained rows (rows which span over multiple Oracle db blocks. avoid for perf and robustness reasons.)
Also, you may want to consider separating the long field out to a separate table to improve performance in table reads (unless your app always reads a long along with the rest of the fields, in which case it's somewhat mitigated).
Johnny Chan
Independent Oracle Specialist
Received on Tue Aug 08 1995 - 00:00:00 CEST
