X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 74CE552926 for ; Mon, 6 Jun 2005 11:45:27 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00188-02 for ; Mon, 6 Jun 2005 14:45:24 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id BC8F15292D for ; Mon, 6 Jun 2005 11:45:23 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 94E8C414EB6; Mon, 6 Jun 2005 15:45:15 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 7C55015ED7; Mon, 6 Jun 2005 15:45:05 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 21628-10; Mon, 6 Jun 2005 15:45:02 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id C5E4D15ED5; Mon, 6 Jun 2005 15:45:02 +0100 (BST) Message-ID: <42A4616E.8070101@archonet.com> Date: Mon, 06 Jun 2005 15:45:02 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "ON.KG" Cc: pgsql-sql Subject: Re: What is faster? References: <42A43791.7030306@archonet.com> <17434586625.20050606202531@on.kg> In-Reply-To: <17434586625.20050606202531@on.kg> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.052 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/82 X-Sequence-Number: 21683 ON.KG wrote: > Hi All! > > What is faster - SLECTion data from one large table (200 000 - 300 000 > records), or SELECTion from a few small tables (example, 2 tables 150 > 000 records each)? It depends. Are you selecting all records? One record? A few records? If one or a few, do you have a suitable index on the table(s)? Is the table clustered? Expected to be cached in RAM? Do you have a specific problem, or reason to believe you may encounter one? -- Richard Huxton Archonet Ltd