Kay, If you are using CF5 try using the new CFLOG tag. automatically writes to a log file for you. Much faster than CFFILE as I beleive it's handled by a servlet running under the built in JRUN server. Otherwise, a db is your best choice. A simple insert query shoudn't take very long. You'll probably still want to performance test it yourself and see what works best in your situation.
HTH, Jeff Garza -----Original Message----- From: Kay Smoljak To: CF-Talk Sent: 2/21/02 8:15 PM Subject: CFFILE vs database for logging I'm working on a site where a number of protected pages will be served up using CFCONTENT from outside the web root. Obviously these pages are not going to show up in normal web site statistics programs. I'm thinking of writing my own logs for these files. I figure I can either write to the database every time a page is requested, or I could append a text file every time. Which would be better from a performance point of view? I think that the database would be faster than CFFILE, but does CFFILE wait until the file operation is finished? If not perhaps that would be quicker. Or is there any other way to do it? I've thought about storing the data in an application variable, then dumping it to the database (or a text file) at a specified interval. Any thoughts? Kay. ______________________________________________________ Kay Smoljak - ColdFusion Developer - PerthWeb Pty Ltd http://developer.perthweb.com.au - Tools for Developers cfx_pwcamtech | cfx_pwimageproc | cfx_pwcardcrypt ______________________________________________________________________ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

