Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Easy question on LONG fields

Re: Easy question on LONG fields

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 3 Apr 2000 00:27:32 +0200
Message-ID: <954714501.18232.3.pluto.d4ee154e@news.demon.nl>

Sean <dolans_at_my-deja.com> wrote in message news:8c8egh$2ho$1_at_nnrp1.deja.com...
> I am trying to optimize our design and hopefully have a simple
> question. What are the performance "drains" on doing a query on a LONG
> field? The design of the record can either be:
> A VARCHAR2(2000)
> B VARCHAR2(2000)
> C VARCHAR2(2000)
> ... etc...
>
> Or I can make it:
> A LONG
>
>
> I do understand the restrictions I put on myself when I design the
> first way and see the benefits of having it in a LONG.
>
> I hear on the newsgroups occasionally about the overhead incurred on a
> LONG. Can anyone speak to that?
>
> Thanks for the help. (and apologies for the simplicity of the question)
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Which version of the database are you using. If Oracle 8 and upwards you should use a CLOB.
If Oracle 7, there are many, many limitations - only one long per table
- functions on a long are NOT allowed, hence you can't use substr, instr, etc.

So, if the info in the LONG can be split up in three distinct columns, I wouldn't use a LONG.
My experience tells me it is always more easy to concatenate than to extract.
I would use a LONG only for truly binary data, and data that doesn't need to manipulated and searched on.

Hth,

Sybrand Bakker, Oracle DBA Received on Sun Apr 02 2000 - 17:27:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US