Re: unique ascending numbers
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50203
interpreted = N
texte = However, in this case, using the autonumber feature is much better thenusing external code to generate the 'next highest' number. This is becausethe code to generate the new value is embedded within the Append and Replace(with append=T) engine code where the database has already been lockedexclusively for modification. If you use external WebDNA to do apreliminary search, you must also 'wrap' that code with an exclusive lock toensure that two threads do not enter your number generating code at the sametime. So, in addition to the extra overhead of the search, you also havethe overhead of the exclusive lock context. The 'autonumber' feature is asafer more efficient approach.> -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of> Kenneth Grome> Sent: Friday, May 09, 2003 10:14 PM> To: WebDNA Talk> Subject: Re: unique ascending numbers>>> >At 7:26 PM 5/9/03, Nitai @ ComputerOil wrote:> >>On 9.5.2003 19:06 Uhr, Marc Kaiwi
wrote:> >>> >>> Humm, I was hoping to avoid throwing in an extra search just to> >>> retrieve the last SKU number in the db. (I have a thing> about extra> >>> processing simply because it's easy)> >>> >>Do you have 5.x? If so then use &autonumber=field and you> are done, no extra> >>processing!> >> >You don't know that. You can say that it's easier to code for use> >mere mortals, but do we know that the processing behind> >&autonumber=field is less CPU intensive then a search to find the> >maximum value in a field and then adding one to it?>>> Your question is also relevant to the engine's shopping cart code vs.> external code that does the same thing. I learned a very long time> ago that when I use my own external shopping cart code, it runs a lot> faster than webdna's internal code.> -->> Sincerely,> Kenneth Grome> -------------------------------------------------------------> My programmers will write WebDNA code for you at $27 an hour!> ------------------------------------------------------------->> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
However, in this case, using the autonumber feature is much better thenusing external code to generate the 'next highest' number. This is becausethe code to generate the new value is embedded within the Append and Replace(with append=T) engine code where the database has already been lockedexclusively for modification. If you use external WebDNA to do apreliminary search, you must also 'wrap' that code with an exclusive lock toensure that two threads do not enter your number generating code at the sametime. So, in addition to the extra overhead of the search, you also havethe overhead of the exclusive lock context. The 'autonumber' feature is asafer more efficient approach.> -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of> Kenneth Grome> Sent: Friday, May 09, 2003 10:14 PM> To: WebDNA Talk> Subject: Re: unique ascending numbers>>> >At 7:26 PM 5/9/03, Nitai @ ComputerOil wrote:> >>On 9.5.2003 19:06 Uhr, Marc Kaiwi wrote:> >>> >>> Humm, I was hoping to avoid throwing in an extra search just to> >>> retrieve the last SKU number in the db. (I have a thing> about extra> >>> processing simply because it's easy)> >>> >>Do you have 5.x? If so then use &autonumber=field and you> are done, no extra> >>processing!> >> >You don't know that. You can say that it's easier to code for use> >mere mortals, but do we know that the processing behind> >&autonumber=field is less CPU intensive then a search to find the> >maximum value in a field and then adding one to it?>>> Your question is also relevant to the engine's shopping cart code vs.> external code that does the same thing. I learned a very long time> ago that when I use my own external shopping cart code, it runs a lot> faster than webdna's internal code.> -->> Sincerely,> Kenneth Grome> -------------------------------------------------------------> My programmers will write WebDNA code for you at $27 an hour!> ------------------------------------------------------------->> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Scott Anderson
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Need help with emailer- 2 issues (1997)
Follow-up to listfiles bug report ... (2003)
WebCat2b15MacPlugin - [protect] (1997)
Copyright that puppy (1998)
Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997)
WebCat virtual postcard is done! Thanks for the help! (1998)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Multiple fields on 1 input (1997)
Keep away (1997)
RequiredFields notes ... (1997)
For those of you not on the WebCatalog Beta... (1997)
Missing from Docs [folderName] (1997)
WebCommerce: Folder organization ? (1997)
Platform Switch (1997)
Caching pages...again (2001)
Multiple catalog databases and showcart (1997)
[WebDNA] [OT] - One Man. One Road. (2010)
Reloading Shopping Carts (1998)
Reversed words (1997)
authenticating a second user (1997)