Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: maximum number of columns per table
Cris Carampa wrote:
> Frank van Bortel wrote:
>
>>>> CREATE TABLE parent ( >>>> obj_id NUMBER, >>>> obj_name VARCHAR2(30)); >>>> >>>> CREATE TABLE attribute ( >>>> obj_id NUMBER, >>>> attrnum NUMBER(2), >>>> attrval VARCHAR2(10)); >>>> >>>> Is one way to approach the problem. >>> >>> >>> >>> >>> I understand your approach. But what about the overhead of reading >>> say 150 rows every time when you only wanted one 'logical' row? Sure, >>> in some cases you don't need all 150 columns - but even then, the >>> need to code the multiple reads instead of a single 'select *' adds >>> complexity to the code. >>> >>> >> >> Start reading Oracle Concepts guide, Tuning Guide, etc. >> There's no overhead and Oracle will probably read the >> 150 rows in 1 IO operation anyway: >> select * from your_1200_columns_table where id = <some unique_number>; >> >> select p.* from parent p, attribute a >> where p.obj_id = <some unique_number> >> and p.obj_id = a.obj_id; >> >> What's the problem?
But only once. What happens when a new attribute is added?
Better to invest a little effort into coding it correctly in the first place and have everything else simplified for years to come.
Daniel Morgan Received on Wed Jul 21 2004 - 08:26:17 CDT