> -----Original Message----- > From: Greg Obleshchuk [mailto:[EMAIL PROTECTED] > Sent: Monday, February 09, 2004 2:38 PM > To: Michael Hunley; [EMAIL PROTECTED] > Subject: [sqlite] Re: [inbox] Re: [sqlite] Primary key and index > > > Hi, > Doing some testing , creating a primary key with the INTEGER > defined will not create an index but creating a PRIMARY KEY > by it self does create an index
I'm not sure why you needed to run a test for that, it's just what the docs say. > So Yes I would be creating an index on the a column if it is > an autonumber(identity ) column if I was using this column in > joins or where clauses. No. Every sqlite table has an (hidden) index for its OID. When you create a column as INTEGER PRIMARY KEY, the index for that column will simply be the OID index. So creating another one is unnecessary. -Ken --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]