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 04313D1C4D5 for ; Wed, 30 Jul 2003 19:38:32 +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 81257-08 for ; Wed, 30 Jul 2003 16:37:31 -0300 (ADT) Received: from trade-india.com (ns5.trade-india.com [66.234.10.13]) by svr1.postgresql.org (Postfix) with SMTP id 0485CD1C951 for ; Wed, 30 Jul 2003 16:38:26 -0300 (ADT) Received: (qmail 12634 invoked by uid 0); 30 Jul 2003 19:37:52 -0000 Received: from mallah@trade-india.com by ns5.trade-india.com by uid 502 with qmail-scanner-1.15 (uvscan: v4.1.60/v4171. Clear:. Processed in 1.950342 secs); 30 Jul 2003 19:37:52 -0000 Received: from unknown (HELO trade-india.com) (203.145.130.142) by ns5.trade-india.com with SMTP; 30 Jul 2003 19:37:50 -0000 Message-ID: <3F281EB7.7010308@trade-india.com> Date: Thu, 31 Jul 2003 01:08:31 +0530 From: Rajesh Kumar Mallah User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-performance@postgresql.org Subject: Re: Why performance improvement on converting subselect References: <200307291114.29567.mallah@trade-india.com> <3F26A503.3050104@trade-india.com> <4578.1059514334@sss.pgh.pa.us> <200307301254.49159.mallah@trade-india.com> <9198.1059573083@sss.pgh.pa.us> In-Reply-To: <9198.1059573083@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/488 X-Sequence-Number: 2781 Tom Lane wrote: >Rajesh Kumar Mallah writes: > > >>What lead to degradation was the bumping off of >>effective_cache_size parameter from 1000 to 64K >> >> > >Check the plan then; AFAIR the only possible effect of changing >effective_cache_size is to influence which plan the planner picks. > Dear Tom, Below are the plans for two cases. I dont know how to read them accurately can u please explain them. Also can anyone point to some documentation oriented towards understanding explain analyze output? Regds Mallah. tradein_clients=# SET effective_cache_size = 1000; SET tradein_clients=# explain analyze SELECT pri_key,most_recent_edition(pri_key) from profiles where source='BRANDING' limit 100; QUERY PLAN -------------------------------------------------------------------------------------------------------------------- Limit (cost=0.00..25.67 rows=100 width=4) (actual time=141.11..154.71 rows=100 loops=1) -> Seq Scan on profiles (cost=0.00..15754.83 rows=61385 width=4) (actual time=141.11..154.51 rows=101 loops=1) Filter: (source = 'BRANDING'::character varying) Total runtime: 154.84 msec (4 rows) tradein_clients=# SET effective_cache_size = 64000; SET tradein_clients=# explain analyze SELECT pri_key,most_recent_edition(pri_key) from profiles where source='BRANDING' limit 100; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- Limit (cost=0.00..25.67 rows=100 width=4) (actual time=587.61..22884.75 rows=100 loops=1) -> Seq Scan on profiles (cost=0.00..15754.83 rows=61385 width=4) (actual time=587.60..22884.25 rows=101 loops=1) Filter: (source = 'BRANDING'::character varying) Total runtime: 22884.97 msec (4 rows) tradein_clients=# > > regards, tom lane > >---------------------------(end of broadcast)--------------------------- >TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html > >