On Feb 3, 12:28 pm, Haron Media <i...@haronmedia.com> wrote:
> But if you have the constraints, you're doing the checks twice. First > from your application, and then the db engine does it anyways since > there are constraints. Perhaps you don't have a performance hit, but I > can assure you, if you had a (highly) concurrent system and lots of rows > to check and lock through (because you need SELECT ... FOR UPDATE; > alternatively just lock the entire table) the performance hit would > become significant and visible. Absolutely -- one would have a significant performance hit on a highly concurrent system. However I've only worked on a handful of sites in my entire life where this would cause a noticeable issue. Very few folks deal with this amount of traffic, and approaches like yours are premature optimization for most folks. It's great that this is a real issue for you. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.