Re: unique ascending numbers

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 50204
interpreted = N
texte = However, since this solution is *only* available on v5, it is not an option to those of us who continue to use v4.x whether by our own choice, or because we simply have no other choice. >However, in this case, using the autonumber feature is much better then >using external code to generate the 'next highest' number. This is because >the code to generate the new value is embedded within the Append and Replace >(with append=T) engine code where the database has already been locked >exclusively for modification. If you use external WebDNA to do a >preliminary search, you must also 'wrap' that code with an exclusive lock to >ensure that two threads do not enter your number generating code at the same >time. So, in addition to the extra overhead of the search, you also have >the overhead of the exclusive lock context. The 'autonumber' feature is a >safer 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/ -- 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/ Associated Messages, from the most recent to the oldest:

    
  1. ExclusiveLock (was: Re: unique ascending numbers) (Nitai @ ComputerOil 2003)
  2. Re: unique ascending numbers (Gary Krockover 2003)
  3. Re: unique ascending numbers (Nitai @ ComputerOil 2003)
  4. Re: unique ascending numbers (Scott Anderson 2003)
  5. Re: unique ascending numbers (Kenneth Grome 2003)
  6. Re: unique ascending numbers (Scott Anderson 2003)
  7. Re: unique ascending numbers (Kenneth Grome 2003)
  8. Re: unique ascending numbers (Kenneth Grome 2003)
  9. Re: unique ascending numbers (Kenneth Grome 2003)
  10. Re: unique ascending numbers (Laurent Bache 2003)
  11. Re: unique ascending numbers (John Peacock 2003)
  12. Re: unique ascending numbers (Laurent Bache 2003)
  13. Re: unique ascending numbers (John Peacock 2003)
  14. Re: unique ascending numbers (Chris List Recipient 2003)
  15. Re: unique ascending numbers (Joe D'Andrea 2003)
  16. Re: unique ascending numbers (Joe D'Andrea 2003)
  17. Re: unique ascending numbers (John Peacock 2003)
  18. Re: unique ascending numbers (Christer Olsson 2003)
  19. Re: unique ascending numbers (marc@kaiwi.com (Marc Kaiwi) 2003)
  20. Re: unique ascending numbers (Christer Olsson 2003)
  21. Re: unique ascending numbers (marc@kaiwi.com (Marc Kaiwi) 2003)
  22. Re: unique ascending numbers (marc@kaiwi.com (Marc Kaiwi) 2003)
  23. Re: unique ascending numbers (John Peacock 2003)
  24. Re: unique ascending numbers (Nitai @ ComputerOil 2003)
  25. Re: unique ascending numbers (marc@kaiwi.com (Marc Kaiwi) 2003)
  26. Re: unique ascending numbers (marc@kaiwi.com (Marc Kaiwi) 2003)
  27. Re: unique ascending numbers (Kenneth Grome 2003)
  28. Re: unique ascending numbers (Nitai @ ComputerOil 2003)
  29. Re: unique ascending numbers (marc@kaiwi.com (Marc Kaiwi) 2003)
  30. Re: unique ascending numbers (Nitai @ ComputerOil 2003)
  31. unique ascending numbers (marc@kaiwi.com (Marc Kaiwi) 2003)
However, since this solution is *only* available on v5, it is not an option to those of us who continue to use v4.x whether by our own choice, or because we simply have no other choice. >However, in this case, using the autonumber feature is much better then >using external code to generate the 'next highest' number. This is because >the code to generate the new value is embedded within the Append and Replace >(with append=T) engine code where the database has already been locked >exclusively for modification. If you use external WebDNA to do a >preliminary search, you must also 'wrap' that code with an exclusive lock to >ensure that two threads do not enter your number generating code at the same >time. So, in addition to the extra overhead of the search, you also have >the overhead of the exclusive lock context. The 'autonumber' feature is a >safer 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/ -- 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/ Kenneth Grome

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:

For those of you not on the WebCatalog Beta... (1997) Nested vs conditional (1997) [Applescript] (2000) Thanks and Big News!!! (1997) [isfile] ? (1997) OT: typhoon manual (2000) Dynamically Generated Pages & WC? (2000) [WebDNA] error installing 6.2 on ubuntu (2011) Problem with [Search] inside of [Loop]? (1997) Mail Server Needed. (1998) 'does not contain' operator needed ... (1997) PHP Live (2005) Writing a Protect Tag (1999) Configuring E-mail (1997) Just a thought (1998) [WebDNA] Successful, working WebDNA7/CentOS install? (2013) Site Builder & IE Mac (2004) Email...Thanks (1997) Stopping bad HTML propagation ? (1997) Quitting WebMerchant ? (1997)