Hi,.

baxy77bax schrieb:
> hi my question is : if i create table that contains primary key like;
>
> create table TEST (field1 varchar not null primary key);
>
> do i need to create index on it or not?
>   
Yes, the primary key is indexed
> and is it better to create table with a primary key and then import data in
> it or create table without a key , import data and then just create index on
> the table. (which is faster- or should i ask which is the fastest way to
> import data in the table?)
>
> then if i create proper table , is it advisable to order data by column with
> primary key on it or data with index on it
>   
My experience says that this does not matter much. However, you could 
try and see for yourself.
If you have a Primary Key which is a single integer, you should declare 
the column as "integer primary key"  (see 
http://www.sqlite.org/lang_createtable.html#rowid).
> thank you
>   

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to