I would like it to.

Sarracino: Well, what would be the alternatives?

Bick: JFlash: A primary key is unique and not null.

Gerbs: Autoincrement, I should say :

Wiegert: I expect this table and the posts table to be by far the most queried of all

Babineaux: JFlash: Yes. You can use auto_increment, but that’s not a requirement. That’s up to you to decide. List all the candidate keys and pick one or create another.

Seigfried: So I really need queries on this table to be extremely fast

Siebens: But what ould be the “candidate keys”, I have know idea

Creek: JFlash: That depends on your data / schema.

Hepperly: JFlash: Read about the concept of candidate key.

Kliem: Sure, will do that now. thanks

Vermilya: I just described the table schema for you. there are no candidate keys possible in it that I can see

Difelice: Autoincrement is the only option

Schaetzle: JFlash: Are you saying you could have two rows in that table that are identical?

Mcfarlin: Yr question is relevant

Tomas: I can tell you this much

Campion: JFlash: There’s almost always one natural candidate key. It could be a composite of several columns. But it typically exists.

Lundquist: A combination of from plus to plus rel type is unique

Grice: JFlash: Right. That would be a candidate.

Bourret: However any groups of 2 can be repeated

Guernsey: Ok, but how does one code that?

Groeneweg: I don’t know what you meant by “groups of two”.

Jargas: For instance there will be several rows with repeated from and two

Hallowich: JFlash: That’s ok. The candidate includes the type.

Laviero: Because for instance joe can have visited maries profile but also is blocked by mary

Scheibe: JFlash: PRIMARY KEY from, to, type

Phelp: But how can I code such compound key? care to educate me?

Bartholic: I dont know that idiom. should I join the strings or what?

Beatty: JFlash: Aren’t those two separate rows? joe, mary, visit and mary, joe, block

Handrick: The point was to show that groups of 2 can be repeated. only 3 can be unick

Poaipuni: JFlash: It’s common to use an auto_increment primary key instead of the composite. But you would typically add the composite unique index as well, to be sure you never inserted duplicates.

Zuehl: Any clue why this query kills my database?: http://paste.ofcode.org/Yq2pBs6YE5hP97dpCDB53P

Stuedemann: JFlash: Yes. It’s understood that less than those 3 columns would not be unuque.

Ewy: Xgc, how can I find more information on how to implement this specific design?

Hadley: Virhilo: Queries don’t kill databases unless you have a bug, hardware failure, etc.

Elzy: Virhilo: CREATE TABLE is not a query.

Dillard: Xgc: welll this happens:f http://paste.ofcode.org/3rk895HTeEC7frX4NbWkSf

Ballan: Resized all the buffers

Masingale: Virhilo: Explain what you mean by “kill”. Show the exact error / behavior.

Bretana: Virhilo: Like I said, that could happen if you hit a bug, like the log says. or hardware failure, etc.

Arking: Xgc: hardware is fine, also reimported that database on another machine

Kurelko: So there is nothing obviously wrong in this query?:f

Kandoll: Virhilo: It’s pretty simple. That should never cause the server to crash.

Subia: Mysql – auto_increment, say I have 10 records, delete 5, the next record is incremented at 11, not 6?

Imgrund: Virhilo: Are you saying you get the exact same crash on two different machines?

Gravina: I would like it to increment by the actual number of records in the db, not as some kind of count that has no link to how many records there are. what should I be looking for?