Re: [sqlalchemy] Using Guid as Primary Key

2012-12-06 Thread Christopher Lee
I use guid primary keys fairly heavily. There is a performance impact due to the size of the key; you just can't fit as much of the index in memory as you otherwise could. On the flip side, when you have multiple database shards, you never need to worry about keys being duplicated, so you can mov

Re: [sqlalchemy] Using Guid as Primary Key

2012-12-04 Thread Michael Bayer
On Dec 4, 2012, at 4:46 PM, Wolfgang Keller wrote: Can I use the Guid as primary key? I am newbie to sql and mysql management. >>> >>> Using such auto-generated surrogate keys is always a really bad idea >>> and the straightest and shortest way to data inconsistency hell >>> (especial

Re: [sqlalchemy] Using Guid as Primary Key

2012-12-04 Thread Wolfgang Keller
> >> Can I use the Guid as primary key? I am newbie to sql and mysql > >> management. > > > > Using such auto-generated surrogate keys is always a really bad idea > > and the straightest and shortest way to data inconsistency hell > > (especially through duplicates). > > you've seen two guids ge

Re: [sqlalchemy] Using Guid as Primary Key

2012-12-02 Thread Michael Bayer
On Dec 2, 2012, at 4:30 PM, Wolfgang Keller wrote: >> Can I use the Guid as primary key? I am newbie to sql and mysql >> management. > > Using such auto-generated surrogate keys is always a really bad idea > and the straightest and shortest way to data inconsistency hell > (especially through d

Re: [sqlalchemy] Using Guid as Primary Key

2012-12-02 Thread Wolfgang Keller
> Can I use the Guid as primary key? I am newbie to sql and mysql > management. Using such auto-generated surrogate keys is always a really bad idea and the straightest and shortest way to data inconsistency hell (especially through duplicates). Sincerely, Wolfgang -- You received this messa

[sqlalchemy] Using Guid as Primary Key

2012-12-02 Thread Gops S
Can I use the Guid as primary key? I am newbie to sql and mysql management. I am worried about auto-generation of primary when it is defined as integer when we backup and restore the database. Can anyone throw light on using auto-increment id as primary key vs using guid string id as primary