Re: [sqlite] composite PK vs. single PK

2010-06-25 Thread Cory Nelson
On Fri, Jun 25, 2010 at 7:39 AM, P Kishor wrote: > Thanks Cory. > > On Fri, Jun 25, 2010 at 9:07 AM, Cory Nelson wrote: >> On Fri, Jun 25, 2010 at 6:49 AM, P Kishor wrote: >>> Is there any gotcha, any disadvantage (query complexity, db size, >>> query speed) to using a composite PK (two columns)

Re: [sqlite] composite PK vs. single PK

2010-06-25 Thread P Kishor
Thanks Cory. On Fri, Jun 25, 2010 at 9:07 AM, Cory Nelson wrote: > On Fri, Jun 25, 2010 at 6:49 AM, P Kishor wrote: >> Is there any gotcha, any disadvantage (query complexity, db size, >> query speed) to using a composite PK (two columns) vs. a single >> AUTOINCREMENT INT? >> >> Background: I ha

Re: [sqlite] composite PK vs. single PK

2010-06-25 Thread Cory Nelson
On Fri, Jun 25, 2010 at 6:49 AM, P Kishor wrote: > Is there any gotcha, any disadvantage (query complexity, db size, > query speed) to using a composite PK (two columns) vs. a single > AUTOINCREMENT INT? > > Background: I happen to have the two columns in question in my table > anyway. Adding an I

[sqlite] composite PK vs. single PK

2010-06-25 Thread P Kishor
Is there any gotcha, any disadvantage (query complexity, db size, query speed) to using a composite PK (two columns) vs. a single AUTOINCREMENT INT? Background: I happen to have the two columns in question in my table anyway. Adding an INTEGER PRIMARY KEY would use up space I don't want to use. My