468,257 Members | 1,509 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

Obese Table

I need to create a table which will have about 17 columns, most of
them text. No column will be large enough to require a CLOB, but
together the potential row size will be more than 32K.

Windows Server 2003, DB2 V8.1.5.449, WSE.

Is there any way to do this in a single table?

SS
Nov 12 '05 #1
2 1435
Can you classify the columns into logical groups that are used together?
One way would be to split the table vertically and place a view on top.
An instead of trigger can handle update/delete/insert.
If you only access one side of the table at a time DB2 figure out that
one it can safe the join, given e.g. some RI.

Cheers
Serge
Nov 12 '05 #2
Thanks, Serge.

When you say "split the table vertically ," I'm assuming what my mind
says is horizontally. Ie, change
CREATE TABLE MYTABLE (
User_ID ...
Time_started ...
Time_Ended ....
Time_Signed ....
TextField1 ...
Textfield2 ...
. . .
TextFieldn ...

change it into
CREATE TABLE MYTABLE1 (
User_ID ...
Time_started ...
Time_Ended ....
Time_Signed ....
TextField1 ...
Textfield2 ...

and

CREATE TABLE MYTABLE2 (
User_ID ....
TextField3 ....
. . . .
TextFieldn

Then create a view that joins the two tables and expose only that view
to the user. As it happens, this view (tables) will very rarely have
deletes and never have updates (deletes will be done in batches and
run overnight). It will have inserts often.

Is an "instead of" trigger still desirable, would it allow inserts
more efficiently if only MYTABLE1 were needed? Would it avoid a null
entry into MYTABLE2 if that were not used?

When you say, "DB2 [can] figure out that ... it can save the join,
given e.g. some RI." -- Like what or how much RI? Every field?
Which fields?

SS

Serge Rielau <sr*****@ca.eye-bee-em.com> wrote in message news:<7d*********************@news01.bloor.is.net. cable.rogers.com>...
Can you classify the columns into logical groups that are used together?
One way would be to split the table vertically and place a view on top.
An instead of trigger can handle update/delete/insert.
If you only access one side of the table at a time DB2 figure out that
one it can safe the join, given e.g. some RI.

Cheers
Serge

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Xah Lee | last post: by
7 posts views Thread by Kamal | last post: by
5 posts views Thread by jrod11 | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.