|
From: Stephen C. <the...@wa...> - 2001-04-24 16:19:56
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, Apr 23, 2001 at 12:34:23PM -0700, Brian Aker wrote: > > 1. LOCK TABLES. This is called in a number of places, but I don't understand > > why. Because MySQL lacks row-level locking? To ensure a consistent > > read/write due to the lack of transactions? Some explanation is necessary > Poor man's transactions. For instance, in user creation it keeps > two users from creating an account with the same name at the same > time. Right. I'll take a harder look at those locks tonight and determine the best thing for Oracle to do (which might be nothing, actually). I'm betting most if not all of these spots would be better suited by a SELECT FOR UPDATE to obtain a row level lock. > > 2. 1=1. This pops up in several where clauses. It looks like a noop to me, > > but something mentioned it was some sort of optimization. MySQL specific, > > perhaps? Oracle just ignores it, from what SQL traces have told me. > Yep, that is what it is. It also tells MySQL to not reset sequences > on tables where "DELETE FROM table_name" happens. Right. I tried searching on mysql.com but their search preferred to ignore the = sign instead (even in a quoted string). > > The other thing I'm wondering is, where is Slash's "main" loop? AutoCommit is a > > pretty major loss on Oracle, so it would be desirable to turn it off and perform > Ask yourself this, is it? Why don't you want the commit to just happen? > To be honest on most pages all there is, is one INSERT that happens > to access_log. Hmmmm...good point. I'm used to my own (day job) apps, which can do 1,000+ inserts in one sitting (complex data warehousing programs, mainly). If it ain't broke, then.... > I have some patches that will change the sqlDO("LOCK") stuff > over to methods. You could override those with commit/rollback > calls. I was actually considering doing that myself, since I have to turn AutoCommit off temporarily to do any type of lock or similar voodoo; Oracle locks get released on commit, so AutoCommit doesn't work very well with them :) I'll see what comes to me in tonight's session. - -- Stephen Clouse <the...@wa...> warpcore.org Founder, Chief Megalomaniac, and Evil Overlord -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQA/AwUBOuWnqd1EXk7JbKbMEQJtpQCg9aLSxZZmvBsWT2Wd71Ro+v5tnXwAoPO3 iCVikJcKdjUjdonpjTRHiH9K =MUuR -----END PGP SIGNATURE----- |