Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6A2182E159F for ; Sun, 18 Nov 2007 21:28:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 57391-05 for ; Sun, 18 Nov 2007 21:28:38 -0400 (AST) Received: from wdscexfe02.sc.wdc.com (wdscexfe02.sc.wdc.com [129.253.170.52]) by postgresql.org (Postfix) with ESMTP id 4FC512E1275 for ; Sun, 18 Nov 2007 21:28:38 -0400 (AST) Received: from wdmyexbe03.my.asia.wdc.com ([129.253.105.55]) by wdscexfe02.sc.wdc.com with Microsoft SMTPSVC(6.0.3790.1830); Sun, 18 Nov 2007 17:28:18 -0800 Received: from 129.253.107.229 ([129.253.107.229]) by wdmyexbe03.my.asia.wdc.com ([129.253.105.55]) with Microsoft Exchange Server HTTP-DAV ; Mon, 19 Nov 2007 01:28:14 +0000 Received: from neuromancer by 129.253.105.55; 19 Nov 2007 09:27:47 +0800 Subject: Re: PostgreSQL vs MySQL, and FreeBSD From: Ow Mun Heng To: "Jonah H. Harris" Cc: Dave Dutcher , pgsql-performance@postgresql.org In-Reply-To: <36e682920711160806k359a8825ia0d962d7ac6f6d7b@mail.gmail.com> References: <47344D43.5090506@geri.cc.fer.hr> <47347F9F.1070309@laliluna.de> <1195206185.29253.56.camel@neuromancer.home.net> <01c601c82869$3ffb2580$8e00a8c0@tridecap.com> <36e682920711160806k359a8825ia0d962d7ac6f6d7b@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 19 Nov 2007 09:27:47 +0800 Message-Id: <1195435667.11620.5.camel@neuromancer.home.net> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 X-OriginalArrivalTime: 19 Nov 2007 01:28:18.0671 (UTC) FILETIME=[76F487F0:01C82A4B] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.959 tagged_above=0 required=5 tests=AWL=-0.368, BAYES_20=-0.74, RCVD_NUMERIC_HELO=2.067 X-Spam-Level: X-Archive-Number: 200711/261 X-Sequence-Number: 27676 On Fri, 2007-11-16 at 11:06 -0500, Jonah H. Harris wrote: > On Nov 16, 2007 10:56 AM, Dave Dutcher wrote: > > I don't know about that. There are times when it is the right plan: > > Agreed. IMHO, there's nothing wrong with nested-loop join as long as > it's being used properly. I do agree also, but in some other cases, the usage of nested loops (esp when the number of rows estimated to be returned vs the actual number of rows being returned differs by up to 100x (or more) then it becomes a major issue. The example pointed out by Dave D shows the est rows = 1 and actual rows=1, then good performance of course.