Re: [sqlite] Preserve optimzation after a table change

2008-06-25 Thread Igor Tandetnik
Raphaël KINDT <[EMAIL PROTECTED]>
wrote:
> How can I change the schema of this table to keep the optimzation and
> allow to have two same 'time'?
>
> CREATE TABLE events(
>time   REAL NOT NULL PRIMARY KEY,
>detections BLOB);
>
> CREATE INDEX idxTime ON events (time ASC);

Just drop PRIMARY KEY. As it stands, you have two indexes on 
events(time) - one explicit and one implicit in PRIMARY KEY. You only 
need one.

Igor Tandetnik 



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


[sqlite] Preserve optimzation after a table change

2008-06-25 Thread Raphaël KINDT
Hello,

How can I change the schema of this table to keep the optimzation and allow
to have two same 'time'?

CREATE TABLE events(
   time   REAL NOT NULL PRIMARY KEY,
   detections BLOB);

CREATE INDEX idxTime ON events (time ASC);

Thanks in advance.

KINDT Raphaël

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