Re: CommitDatabase vs. CloseDatabase

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39540
interpreted = N
texte = > >> >> >>One doesn't. They both protect a DB equally well (in a simple >>case), but webcat does not have to flush a db and reload a db if >>you use commitdatabase. >> > >Is it important to anything if WC has to reopen a db after using >CloseDatabase? Does it, say, slow down the server's response time or >burden the hardware more than CommitDatabase does? >Ahh, Crash course in caching...A reading from memory is 1000 times faster than reading from a disk. Webcat will load a db from disk to memory once, so that every other db access will be at memory speeds. If a db is changed, it is changed in ram only (pretend for now). Now the db in ram does not match the db on disk. This is ok, as all db reads and writes act on the copy in ram.If computers never crashed, and power never went out, and other programs besides webcat never needed to access the data this would be perfect. But because ram is temporary storage and other programs can not access another programs ram, it is necessary to write, or commit, the copy of the db in ram to the disk so it can be reloaded or shared if needed. A good time for reloading is after a reboot, and sharing is anytime you need it.Commitdatabase will force a db to be written to disk. This is great if you have other programs looking at the db and want a current copy (the one in ram) for them to look at. Another program could be a perl driven report generator, for example. (Legacy code sucks)Closedatabase will commit the database, and remove it from memory. This is good if you have a 500MB db that you need to process with another program that will need the extra ram for itself. Webcat will closedatabases as it needs to, so you seldom need to use this command.If you close a database and then access that db again, you are forcing webcat to reload the db from disk, this takes a time hit, and is not necessary, as commitdatabase will do the job 90% of the time.Also, it is not necessary to commit a database after EVERY modification, unless you have some non-webcat program using the db at random and arbitrary times.I hope this helps in a meta problem sort of way. -Sam >Glenn > >------------------------------------------------------------- >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://search.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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: CommitDatabase vs. CloseDatabase (Christer Olsson 2001)
  2. Re: CommitDatabase vs. CloseDatabase (Samuel Renkert 2001)
  3. Re: CommitDatabase vs. CloseDatabase (Christer Olsson 2001)
  4. Re: CommitDatabase vs. CloseDatabase (Samuel Renkert 2001)
  5. Re: CommitDatabase vs. CloseDatabase (Christer Olsson 2001)
  6. Re: CommitDatabase vs. CloseDatabase (Glenn Busbin 2001)
  7. Re: CommitDatabase vs. CloseDatabase (Samuel Renkert 2001)
  8. Re: CommitDatabase vs. CloseDatabase (Grant Hulbert 2001)
  9. Re: CommitDatabase vs. CloseDatabase (Alex McCombie 2001)
  10. Re: CommitDatabase vs. CloseDatabase (Glenn Busbin 2001)
  11. Re: CommitDatabase vs. CloseDatabase (Glenn Busbin 2001)
  12. Re: CommitDatabase vs. CloseDatabase (Samuel Renkert 2001)
  13. Re: CommitDatabase vs. CloseDatabase (Nitai @ ComputerOil 2001)
  14. Re: CommitDatabase vs. CloseDatabase (Nitai @ ComputerOil 2001)
  15. Re: CommitDatabase vs. CloseDatabase (Christer Olsson 2001)
  16. CommitDatabase vs. CloseDatabase (Glenn Busbin 2001)
> >> >> >>One doesn't. They both protect a DB equally well (in a simple >>case), but webcat does not have to flush a db and reload a db if >>you use commitdatabase. >> > >Is it important to anything if WC has to reopen a db after using >CloseDatabase? Does it, say, slow down the server's response time or >burden the hardware more than CommitDatabase does? >Ahh, Crash course in caching...A reading from memory is 1000 times faster than reading from a disk. Webcat will load a db from disk to memory once, so that every other db access will be at memory speeds. If a db is changed, it is changed in ram only (pretend for now). Now the db in ram does not match the db on disk. This is ok, as all db reads and writes act on the copy in ram.If computers never crashed, and power never went out, and other programs besides webcat never needed to access the data this would be perfect. But because ram is temporary storage and other programs can not access another programs ram, it is necessary to write, or commit, the copy of the db in ram to the disk so it can be reloaded or shared if needed. A good time for reloading is after a reboot, and sharing is anytime you need it.Commitdatabase will force a db to be written to disk. This is great if you have other programs looking at the db and want a current copy (the one in ram) for them to look at. Another program could be a perl driven report generator, for example. (Legacy code sucks)Closedatabase will commit the database, and remove it from memory. This is good if you have a 500MB db that you need to process with another program that will need the extra ram for itself. Webcat will closedatabases as it needs to, so you seldom need to use this command.If you close a database and then access that db again, you are forcing webcat to reload the db from disk, this takes a time hit, and is not necessary, as commitdatabase will do the job 90% of the time.Also, it is not necessary to commit a database after EVERY modification, unless you have some non-webcat program using the db at random and arbitrary times.I hope this helps in a meta problem sort of way. -Sam >Glenn > >------------------------------------------------------------- >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://search.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://search.smithmicro.com/ Samuel Renkert

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:

format and math on the fly (1998) Setting up shop (1997) Web Catalog Book? (1998) NetCloak as Emailer substitute? (1999) Dates, Math, and Sandboxes (2003) Special delete ... (1997) [WebDNA] DB help (2011) Is there a list somewhere of what ALL [url] does? (2000) security (https) w webcat (1999) SERIAL NUMBER PROBLEM *AGAIN*!!! (1998) [OT] Mac Utility Required (2000) Errata: WCS Newbie question (1997) Stumped on ShowNext -using variables (1997) List Test (2004) [ignore this] Wierd display error.... (2004) Documentation Feedback (1997) User / Pass in TCP connect (2007) Hiding the URL(was Cart ID Duplication) (2001) WebCommerce: Folder organization ? (1997) [WebDNA] WebDNA future (2010)