Re: [sqlite] Do I still need an index if I have a composite Primary Key(or UNIQUE)

2011-09-24 Thread Igor Tandetnik
Florian Kusche wrote: > in my application, an Icon is made up of one or more layers of images: > > CREATE TABLE IconLayer > ( > IconID INTEGER NOT NULL, > Order INTEGER NOT NULL, > ImageID INTEGER NOT NULL REFERENCES Image( _id ), > > PRIMARY KEY ( IconID, Order ) > ); > > During runtime

[sqlite] Do I still need an index if I have a composite Primary Key (or UNIQUE)

2011-09-24 Thread Florian Kusche
Hi, in my application, an Icon is made up of one or more layers of images: CREATE TABLE IconLayer ( IconID INTEGER NOT NULL, Order INTEGER NOT NULL, ImageID INTEGER NOT NULL REFERENCES Image( _id ), PRIMARY KEY ( IconID, Order ) ); During runtime, I want to get the layers of my Icons