I add a IsDeleted flag to perform soft deletes and use DateChanged field to record the last date that the record was updated.
-----Original Message----- From: Kay Smoljak [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 7:47 AM To: CF-Talk Subject: all records deleted from table >| Kay Smoljak wrote: >| A tip I picked up from somewhere - it might even have been this list >| - is to not ever actually delete records using code. Instead, I have >| a dtDeleted field, which is set to the current date when I want to >| delete the record. When doing selects, I add "WHERE dtDeleted IS >| NULL" to get only non-deleted records. >| >Zac Spitzer wrote: >good idea, badly implemented..... a select using a null criteria cannot >use a index and means the database must do a full table scan which means >~ bad performance....try changing your logic round so you can use an >index... Hey, thanks for the tip. Will definitely look into that... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

