Hi,

Perhaps this is a question only drh can anwser, but here it is anyway.

Let's create a table with a multi-column UNIQUE constraint, e.g.:

   create table myTable (
     key integer primary key,
     col1 float not null,
     col2 ....
     ...
     colN type,
     UNIQUE (col1, col2, ... ColK)
   );

When there is a **multi-column** UNIQUE constraint, no **combination** of said column values can occur as duplicate-record (yes this works - I tried it).

In the online docs <http://www.sqlite.org/lang.html#createtable>, it states:
"The UNIQUE constraint causes an index to be created on the specified columns".


It's obvious what that means for *individual* column constraints, but what exactly occurs for the multi-column UNIQUE constraint?

What are the time-complexity implications of this, specifically for record insertions? For instance, what if I have 10-20 columns in such a constraint?

Thanks!




Frank J. Iannarilli, [EMAIL PROTECTED] Aerodyne Research, Inc., 45 Manning Rd., Billerica, MA 01821 USA www.aerodyne.com/cosr/cosr.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to