X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 20F49D1C994 for ; Thu, 31 Jul 2003 15:42:02 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 60090-09 for ; Thu, 31 Jul 2003 12:40:26 -0300 (ADT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by svr1.postgresql.org (Postfix) with ESMTP id 9DEA3D1C91E for ; Thu, 31 Jul 2003 12:41:29 -0300 (ADT) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19iFXQ-000796-00 for ; Thu, 31 Jul 2003 17:40:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19iF11-0003CD-00 for ; Thu, 31 Jul 2003 17:06:51 +0200 From: "Jianshuo Niu" Subject: Help on my database performance Date: Thu, 31 Jul 2003 11:06:09 -0400 Lines: 28 Message-ID: X-Complaints-To: usenet@main.gmane.org X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/498 X-Sequence-Number: 2791 Hi! There: I ran the same explain analyze on two similar tables. However, the table with less data took much more time than the one with more data. Could anyone tell me what happened? Here is the explain analyze: explain analyze select productid from tfd_catalog; NOTICE: QUERY PLAN: Seq Scan on tfd_catalog (cost=0.00..43769.82 rows=161282 width=10) (actual time =3928.64..12905.76 rows=161282 loops=1) Total runtime: 13240.21 msec explain analyze select productid from hm_catalog; NOTICE: QUERY PLAN: Seq Scan on hm_catalog (cost=0.00..22181.18 rows=277518 width=9) (actual time=2 1.32..6420.76 rows=277518 loops=1) Total runtime: 6772.95 msec Thank you for your help Josh