Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 368494767CE for ; Tue, 26 Nov 2002 10:53:16 -0500 (EST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 44F0047682F for ; Tue, 26 Nov 2002 10:53:13 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id B8FEFD606; Tue, 26 Nov 2002 07:53:17 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id AE7605C02; Tue, 26 Nov 2002 07:53:17 -0800 (PST) Date: Tue, 26 Nov 2002 07:53:17 -0800 (PST) From: Stephan Szabo To: "ernest_it@hotmail.com" Cc: Subject: Re: can i decrease the query time? In-Reply-To: <10d6eb7c.0211202303.53a7ac58@posting.google.com> Message-ID: <20021126075235.T77510-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/396 X-Sequence-Number: 10538 On 20 Nov 2002, ernest_it@hotmail.com wrote: > i created index already. how can i decrease the query time more. > > number of record is over 1 million. > the following is the query plan. > > Group (cost=34082.59..34085.62 rows=61 width=112) > -> Sort (cost=34082.59..34082.59 rows=607 width=112) > -> Nested Loop (cost=0.00..34054.51 rows=607 width=112) > -> Nested Loop (cost=0.00..125.64 rows=2 width=108) > -> Nested Loop (cost=0.00..8.84 rows=1 width=22) > -> Index Scan using tbl_member_pkey on tbl_member d (cost=0.00..5.14 > rows=1 width=18) > -> Index Scan using tbl_company_pkey on tbl_company c (cost=0.00..3.68 > rows=1 width=4) > -> Index Scan using tbl_adpage_pkey on tbl_adpage b (cost=0.00..112.65 > rows=332 width=86) > -> Index Scan using tbl_showlog_adpage_id_idx on tbl_showlog a > (cost=0.00..20370.75 rows=5466 width=4) What's the actual query and the table layout for the tables in question and if you're running 7.2, what does explain analyze show?