X-Original-To: pgsql-bugs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 00B8052A1D for ; Fri, 29 Jul 2005 11:05:41 -0300 (ADT) 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 47813-08 for ; Fri, 29 Jul 2005 14:05:35 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 3CCF3529F1 for ; Fri, 29 Jul 2005 11:05:34 -0300 (ADT) Received: (qmail 23844 invoked by uid 500); 29 Jul 2005 14:06:42 -0000 Date: Fri, 29 Jul 2005 09:06:42 -0500 From: Bruno Wolff III To: Magno Leite Cc: pgsql-bugs@postgresql.org, pgsql-performance@postgresql.org Subject: Re: BUG #1797: Problem using Limit in a function, seqscan Message-ID: <20050729140642.GA23650@wolff.to> Mail-Followup-To: pgsql-performance@postgresql.org, Bruno Wolff III , Magno Leite References: <20050729125245.1166CF0B14@svr2.postgresql.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050729125245.1166CF0B14@svr2.postgresql.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/250 X-Sequence-Number: 12413 On Fri, Jul 29, 2005 at 13:52:45 +0100, Magno Leite wrote: > > Description: Problem using Limit in a function, seqscan > > I looked for about this problem in BUG REPORT but I can't find. This is my > problem, when I try to use limit in a function, the Postgre doesn't use my > index, then it use sequencial scan. What is the problem ? You haven't described the problem well enough to allow us to help you and you posted it to the wrong list. This should be discussed on the performance list, not the bug list. It would help if you showed us the query you are running and run it outside of the function with EXPLAIN ANALYSE and show us that output. Depending on what that output shows, we may ask you other questions.