Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D19A41337B49 for ; Mon, 8 Nov 2010 14:42:05 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 09253-07 for ; Mon, 8 Nov 2010 18:41:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from 30.mail-out.ovh.net (30.mail-out.ovh.net [213.186.62.213]) by mail.postgresql.org (Postfix) with SMTP id 210401337B98 for ; Mon, 8 Nov 2010 14:41:57 -0400 (AST) Received: (qmail 26905 invoked by uid 503); 8 Nov 2010 18:19:58 -0000 Received: from b6.ovh.net (HELO mail639.ha.ovh.net) (213.186.33.56) by 30.mail-out.ovh.net with SMTP; 8 Nov 2010 18:19:58 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 8 Nov 2010 20:42:06 +0200 Received: from par69-8-88-161-102-87.fbx.proxad.net (HELO apollo13) (lists%peufeu.com@88.161.102.87) by ns0.ovh.net with SMTP; 8 Nov 2010 20:42:05 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: pgsql-performance@postgresql.org, "shaiju.ck" Subject: Re: Select * is very slow References: <1289197016462-3254568.post@n5.nabble.com> Date: Mon, 08 Nov 2010 19:41:53 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pierre C" Message-ID: In-Reply-To: <1289197016462-3254568.post@n5.nabble.com> User-Agent: Opera Mail/10.62 (Linux) X-Ovh-Tracer-Id: 4935100767537333809 X-Ovh-Remote: 88.161.102.87 (par69-8-88-161-102-87.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/109 X-Sequence-Number: 41133 > The table have 200 records now. > Select * from employee takes 15 seconds to fetch the data!!! > Which seems to be very slow. > But when I say select id,name from empoyee it executes in 30ms. 30 ms is also amazingly slow for so few records and so little data. - please provide results of "EXPLAIN ANALYZE SELECT id FROM table" - huge bloat (table never vacuumed ?) => VACUUM VERBOSE - bad network cable, network interface reverting to 10 Mbps, badly configured network, etc ? (test it and test ping to server, throughput, etc) - server overloaded (swapping, etc) ? (vmstat, iostat, top, etc)