Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.8.8/8.8.8) with ESMTP id UAA21102 for ; Tue, 13 Oct 1998 20:47:13 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id UAA13304; Tue, 13 Oct 1998 20:47:01 -0400 (EDT) From: Bruce Momjian Message-Id: <199810140047.UAA13304@candle.pha.pa.us> Subject: Re: [HACKERS] What about LIMIT in SELECT ? In-Reply-To: from Eric Lee Green at "Oct 13, 1998 6:39: 1 pm" To: eric@linux-hw.com (Eric Lee Green) Date: Tue, 13 Oct 1998 20:47:01 -0400 (EDT) Cc: scrappy@hub.org, jeff@remapcorp.com, hackers@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL47 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Whereas with the SELECT...LIMIT paradigm, the database engine does NOT > process the entire huge query, it quits processing once it reaches the > limit. (Well, at least MySQL does so, if you happen to be using an > "ORDER BY" supported by an index). Obviously doing 1/4th the work four times > is better than doing the whole tamale four times :-}. And no join, I assume. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026