Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 2EB712E003F for ; Mon, 31 Mar 2008 22:23:05 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 39556-05 for ; Mon, 31 Mar 2008 22:23:02 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by developer.postgresql.org (Postfix) with ESMTP id 29F852E0035 for ; Mon, 31 Mar 2008 22:23:01 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id j3so8156ugf.49 for ; Mon, 31 Mar 2008 18:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=r61d6wHPG13l8UTbVvXdkdnfmI7yvp6QwYavD+J1E2U=; b=qqVHmbsO7Tlh47sHEcmPQlT1RJQNiH1iI4MsBDFAcxAN5Ah8erpXE5CkUKCP50/Tn+sEaQd0AqFHO2hqnjk/deiS/Sqr1xnQ0lTwPEhs2nRElZl+jqeWs6gq1fpxeOnamEm4vICGQwMODnMj4yCPaEDiDuC2h9HAI2e/LoQDRiU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=N3+z9bqtXc3sTLJt39xbIeemKrU1EnJyKYPSneVJnGpxJnpy9wZ2dxXfPTdM+c/Nv/dKrEn39ULK0GqdK0FrCf1UvhRDaTDQayv+OXmwwI193VZMUgvY9TaqmyuoafeKdJw8ZG3HIDaVGMTyZC8kigScEe+bv1zCuJFMfRKyG30= Received: by 10.66.221.5 with SMTP id t5mr2512809ugg.83.1207012980736; Mon, 31 Mar 2008 18:23:00 -0700 (PDT) Received: by 10.67.16.18 with HTTP; Mon, 31 Mar 2008 18:23:00 -0700 (PDT) Message-ID: <7a4208ef0803311823x55228b10k8f7996a4e7056229@mail.gmail.com> Date: Tue, 1 Apr 2008 14:23:00 +1300 From: "Ravi Chemudugunta" To: "Ravi Chemudugunta" , pgsql-performance@postgresql.org Subject: Re: Performance Implications of Using Exceptions In-Reply-To: <20080401005235.GM4999@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7a4208ef0803311720s1dac8362gff2477d3dc534968@mail.gmail.com> <20080401005235.GM4999@tamriel.snowman.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200803/538 X-Sequence-Number: 29492 Hi, thanks for the quick reply. > In general I would recommend that you benchmark them using > as-close-to-real load as possible again as-real-as-possible data. I am running a benchmark with around 900,000 odd records (real-load on the live machine :o ) ... should show hopefully some good benchmarking results for the two methods. > That would be in the eye of the beholder, generally. Given the lack of > complexity, I don't think 'cleanness' in this case really matters all > that much. I would like to make a comment that is that the only downside I saw of using the exception approach was that if for some reason someone forgot to add the unique constraint to the table, it would be a bit of a nightmare-ness. (I am porting some code into the server where the schema does not have these constraints setup, only in the devel database). Will reply back with my conclusions, I am expecting a large difference. Cheers, ravi