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 mostqualified 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 problemwith the sheer number of write commands being issued to this database, and itaffecting the speed of the whole website. The code shown below is at the top ofevery webpage. (the carriage returns are mine, for this email, and are not onthe 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 impressionthat searching records isn't very time consuming. This code works just fineuntil there are about 25-30 connections simultaneously on the server, at whichpoint this code almost locks the poor server up. Please remember, this is at thetop of each and every page viewed. I can only assume that one page can not loaduntil the last finishes, because this code causes a database write thus lockingread access to the database until the write is complete. Also, with about 7000records 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 Ididn't have this on the pages, but unfortunately, the only other option is towrite it into cart headers, causing the creation of a file (5000 a day) forevery cart issued.So, Grant, here is my question: Is there anything that can be optimized thatwill 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:
This question is mostly for Grant H. as I think he probably would be the mostqualified 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 problemwith the sheer number of write commands being issued to this database, and itaffecting the speed of the whole website. The code shown below is at the top ofevery webpage. (the carriage returns are mine, for this email, and are not onthe 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 impressionthat searching records isn't very time consuming. This code works just fineuntil there are about 25-30 connections simultaneously on the server, at whichpoint this code almost locks the poor server up. Please remember, this is at thetop of each and every page viewed. I can only assume that one page can not loaduntil the last finishes, because this code causes a database write thus lockingread access to the database until the write is complete. Also, with about 7000records 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 Ididn't have this on the pages, but unfortunately, the only other option is towrite it into cart headers, causing the creation of a file (5000 a day) forevery cart issued.So, Grant, here is my question: Is there anything that can be optimized thatwill 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)