Are transactions atomic?

2007-10-14 Thread Douglas Pearson
Sorry if this is a dumb question, but are SQL transactions in MySQL atomic? I'm using InnoDB tables in MySQL5. Clearly, transactions have the property that either all updates occur or none do. By atomic, I mean are other queries guaranteed to either see all changes from the transaction or none

Dynamic tables--always a bad idea?

2007-08-23 Thread Douglas Pearson
We're trying to figure out how to design a particularly critical table in our database schema. The choices are to use a single large table or a series of dynamically created small tables. This table will receive the majority of traffic (queries and updates) in the database so it's a key part of

RE: Dynamic tables--always a bad idea?

2007-08-23 Thread Douglas Pearson
-Original Message- From: Jerry Schwartz [mailto:[EMAIL PROTECTED] Sent: Thursday, August 23, 2007 2:02 PM To: 'Douglas Pearson'; mysql@lists.mysql.com Subject: RE: Dynamic tables--always a bad idea? How are you going to do queries that join or merge thousands of tables? or won't that be necessary

Is it possible to either update or insert in a single query?

2007-04-13 Thread Douglas Pearson
Apologies if this is a dumb question, but is it possible to write a single query that either updates certain columns in a row, or adds an entirely new row if there is none already? I seem to be running into this a lot, and so far I've solved it by: 1) run UPDATE table SET x,y WHERE some row 2) if

RE: Is it possible to either update or insert in a single query?

2007-04-13 Thread Douglas Pearson
Thanks Mogens. I was aware of REPLACE but it was the non-standard ON DUPLICATE KEY UPDATE that I was looking for. Thanks, Doug -Original Message- From: Mogens Melander [mailto:[EMAIL PROTECTED] Sent: Friday, April 13, 2007 2:28 AM To: Douglas Pearson Cc: [EMAIL PROTECTED] Subject: Re