Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Dratted LONG column
if you USE of the data is also segmented by the id_type, it might be
convenient to partition. (this could also be WAY off target.)
if you're up to a version of Oracle that allows the use of indexes for NOT NULL predicates, separation by single column indexes on each id_column will be nicely terse, including only values for the rows you need for each source type. You probably don't want these indexes to exist for very long in production, although from your description, only one would be troubled per insert and they would never get updated. Hmm. Maybe you can leave them around.
mwf
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Thomas Day
Sent: Thursday, June 24, 2004 10:30 AM
To: oracle-l_at_freelists.org
Subject: Dratted LONG column
I have to do a select using the long column in the where clause.
Of course that won't work.
7 million rows. Some of the long data is over 15,000 characters (people like to write novels).
I've tried to use the ANYDATA data type but I can't COPY into ANYDATA and I can't SELECT (for insert) from a LONG. Any ideas (or being pointed in the right direction) would be greatly appreciated.
On a related note - if I'm going to build a new table (and I think that I am), the existing table has a poor design. There are 10 attributes that are IDs. One and only one of them must be non-null. I.e., one will have data and the other nine must be null. Rather than have 10 fields in my new table (with only one of them having data at any one time) I'd like to have an ID number and an ID_TYPE that records the column name in the original table where the value was non-null. Any nifty ideas on how to do this (other than using a series of selects from the original table that tests each field for non-nullity)?
Thanks