Multithreading of [replace]

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23089
interpreted = N
texte = This question is mostly for Grant H. as I think he probably would be the most qualified person to answer this.Given that I have written a database to do logging of visitors to the website, so that I can do my own analysis of who did what, I am running into a problem with the sheer number of write commands being issued to this database, and it affecting the speed of the whole website. The code shown below is at the top of every webpage. (the carriage returns are mine, for this email, and are not on the actual code; also the info appended and replaced is reduced for this email, in reality, almost 20 fields are set)[search db=carts.db&eqCARTdata=[cart]&DATEtype=date&DATEsort=1&DATEsdir=de] [showif [numfound]=0] [Append db=carts.db] cart=[cart]&date=[date]&firstpage=[thisurl]&lastpage=[thisurl] [/append] [/showif] [showif [numfound]=1] [replace db=carts.db&eqCARTdata=[cart]] lastpage=[thisurl] [/replace] [/showif] [/search] Now, I am using a search instead of two lookups, but I am under the impression that searching records isn't very time consuming. This code works just fine until there are about 25-30 connections simultaneously on the server, at which point this code almost locks the poor server up. Please remember, this is at the top of each and every page viewed. I can only assume that one page can not load until the last finishes, because this code causes a database write thus locking read access to the database until the write is complete. Also, with about 7000 records in the database (two days worth for one site) even at lower connections (10+) this runs kind of slow. I'm sure the server would be plenty snappy if I didn't have this on the pages, but unfortunately, the only other option is to write it into cart headers, causing the creation of a file (5000 a day) for every cart issued.So, Grant, here is my question: Is there anything that can be optimized that will alleviate the speed hit this code causes under load? Brian B. Burton BOFH - Department of Redundancy Department --------------------------------------------------------------- MMT Solutions - Specializing in Online Shopping Solutions 973-808-8644 http://www.safecommerce.comAre you a Web Programmer? I am today. Associated Messages, from the most recent to the oldest:

    
  1. Re: Multithreading of [replace] (Kenneth Grome 1999)
  2. Re: Multithreading of [replace] (Christer Olsson 1999)
  3. Re: Multithreading of [replace] (Kenneth Grome 1999)
  4. Re: Multithreading of [replace] (Brian B. Burton 1999)
  5. Re: Multithreading of [replace] (Grant Hulbert 1999)
  6. RE: Multithreading of [replace] (Olin Lagon 1999)
  7. Re: Multithreading of [replace] (Brian B. Burton 1999)
  8. RE: Multithreading of [replace] (Olin Lagon 1999)
  9. Multithreading of [replace] (Brian B. Burton 1999)
This question is mostly for Grant H. as I think he probably would be the most qualified person to answer this.Given that I have written a database to do logging of visitors to the website, so that I can do my own analysis of who did what, I am running into a problem with the sheer number of write commands being issued to this database, and it affecting the speed of the whole website. The code shown below is at the top of every webpage. (the carriage returns are mine, for this email, and are not on the actual code; also the info appended and replaced is reduced for this email, in reality, almost 20 fields are set)[search db=carts.db&eqCARTdata=[cart]&DATEtype=date&DATEsort=1&DATEsdir=de] [showif [numfound]=0] [Append db=carts.db] cart=[cart]&date=[date]&firstpage=[thisurl]&lastpage=[thisurl] [/append] [/showif] [showif [numfound]=1] [replace db=carts.db&eqCARTdata=[cart]] lastpage=[thisurl] [/replace] [/showif] [/search] Now, I am using a search instead of two lookups, but I am under the impression that searching records isn't very time consuming. This code works just fine until there are about 25-30 connections simultaneously on the server, at which point this code almost locks the poor server up. Please remember, this is at the top of each and every page viewed. I can only assume that one page can not load until the last finishes, because this code causes a database write thus locking read access to the database until the write is complete. Also, with about 7000 records in the database (two days worth for one site) even at lower connections (10+) this runs kind of slow. I'm sure the server would be plenty snappy if I didn't have this on the pages, but unfortunately, the only other option is to write it into cart headers, causing the creation of a file (5000 a day) for every cart issued.So, Grant, here is my question: Is there anything that can be optimized that will alleviate the speed hit this code causes under load? Brian B. Burton BOFH - Department of Redundancy Department --------------------------------------------------------------- MMT Solutions - Specializing in Online Shopping Solutions 973-808-8644 http://www.safecommerce.comAre you a Web Programmer? I am today. Brian B. Burton

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:

Nested tags count question (1997) Web Catalog 2 demo (1997) How To (2003) Setting up shop (1997) WebCommerce: Folder organization ? (1997) Duplicates (1998) Error Page? (1997) rn (range) (2003) bannerads example idiot (1997) PCS Customer submissions ? (1997) How true is this? (1999) Data Entry ... Excel Style ... How To? (2001) Country & Ship-to address & other fields ? (1997) Physical Security for WebCatalog Directories (1997) truncating email part II (1997) searching with groups (1997) SiteGuard Admin Feature ? (1997) 2.0 Info (1997) [delete] problem (1997) webcat feature request (1997)