Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1B72564FD9B for ; Wed, 12 Nov 2008 16:57:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 11050-09 for ; Wed, 12 Nov 2008 16:57:41 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 5E82C64FD2A for ; Wed, 12 Nov 2008 16:57:39 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mACKvcp7020745; Wed, 12 Nov 2008 15:57:38 -0500 (EST) To: - - cc: pgsql-performance@postgresql.org Subject: Re: Performance Question In-reply-to: <838490.42593.qm@web34202.mail.mud.yahoo.com> References: <838490.42593.qm@web34202.mail.mud.yahoo.com> Comments: In-reply-to - - message dated "Wed, 12 Nov 2008 08:27:46 -0800" Date: Wed, 12 Nov 2008 15:57:38 -0500 Message-ID: <20744.1226523458@sss.pgh.pa.us> From: Tom Lane 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: 200811/110 X-Sequence-Number: 31841 - - writes: > One of my tables has 660,000 records and doing a SELECT * from that table (without any joins or sorts) takes 72 seconds. Ordering the table based on 3 columns almost doubles that time to an average of 123 seconds. To me, those numbers are crazy slow and I don't understand why the queries are taking so long. The tables are UTF-8 encode and contain a mix of languages (English, Spanish, etc). I'm running the query from pgadmin3 on a remote host. The server has nothing else running on it except the database. pgadmin has got its own performance issues with large select results. Are you sure the bulk of the time isn't being spent on the client side? Watching top or vmstat on both machines would probably tell much. regards, tom lane