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

Home -> Community -> Usenet -> c.d.o.server -> Re: Composite Primary key or 1 primary key column with all values

Re: Composite Primary key or 1 primary key column with all values

From: kopek <matezuka_at_yahoo.com>
Date: 10 Aug 2002 10:49:55 -0700
Message-ID: <f7cb1d69.0208100949.73f9ba1f@posting.google.com>


I can not understand why in the world you want to create 6 columns in a table when one would suffice. A simple select.. from.. where col1=? will turn into select..from.. where col1=?, col2=? etc., etc... The SQL will take longer to parse. How much better speed-wise a single column design is over the 6-columns one, I can not say. The 6-column one will not out-perform the single-column one, that I can say.

"Marc" <Marc-Weinstock_at_si.rr.com> wrote in message news:<fe_49.195542$QD2.43806028_at_twister.nyc.rr.com>...
> Which is faster? 6 columns or 1 column with all keys. Speed is the only
> issue.
> col1 varchar(3) = aaa
> col2 varchar(3) =bbb
> col3 date =12/31/01
> col4 number(1) =1
> col5 number(1) = 0
> col6 number(1) =1
>
> OR
>
> one_column varchar2(20) = "aaabbb12312001101"
>
> I have a few tables with the same primary key. For perfomce only. does
> anyone know? MultiMillion row table.
Received on Sat Aug 10 2002 - 12:49:55 CDT

Original text of this message

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