X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 754473A3CB9 for ; Tue, 9 Nov 2004 14:56:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46038-01 for ; Tue, 9 Nov 2004 14:56:29 +0000 (GMT) Received: from web52710.mail.yahoo.com (web52710.mail.yahoo.com [206.190.39.161]) by svr1.postgresql.org (Postfix) with SMTP id 04A0F3A3C99 for ; Tue, 9 Nov 2004 14:56:32 +0000 (GMT) Received: (qmail 86007 invoked by uid 60001); 9 Nov 2004 14:56:31 -0000 Message-ID: <20041109145631.86002.qmail@web52710.mail.yahoo.com> Received: from [216.184.101.242] by web52710.mail.yahoo.com via HTTP; Tue, 09 Nov 2004 06:56:31 PST Date: Tue, 9 Nov 2004 06:56:31 -0800 (PST) From: Carlos Lopez Subject: Re: [PERFORM] poor performance in migrated database To: Tom Lane Cc: pgsql-performance@postgresql.org, pgsql-admin@postgresql.org In-Reply-To: <12047.1099958278@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/76 X-Sequence-Number: 15461 Dear Tom, thanks for your information. Where can I learn more about the explain and analyze?? One view that is giving a lot of problems is vkardex_3 which is used most of the time... The explain analyze I sent is one of the views that conform this one. Thanks in advance. Carlos Lopez Linares --- Tom Lane wrote: > Carlos Lopez writes: > > This is one of the queries that work,and is the > first > > in a 4 level nested query.... > > Do you really need UNION (as opposed to UNION ALL) > in this query? > The EXPLAIN shows that almost half the runtime is > going into the > sort/uniq to eliminate duplicates ... and according > to the row > counts, there are no duplicates, so it's wasted > effort. > > I looked at your schema and saw an awful lot of > SELECT DISTINCTs > that looked like they might not be necessary, too. > But I'm not > willing to crawl through 144 views with no > information about > which ones are causing you problems. What's a > typical query > that you are unsatisfied with the performance of? > > regards, tom lane > ===== ___ Ing. Carlos López Linares IT Consultant Quieres aprender linux? visita http://www.aprende-linux.com.sv __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com