Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 202159F93A2 for ; Sat, 23 Dec 2006 16:08:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 07016-08 for ; Sat, 23 Dec 2006 16:08:48 -0400 (AST) X-Greylist: delayed 00:17:07.218893 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id CB6F09FA42F for ; Sat, 23 Dec 2006 16:08:50 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from spunkymail-a1.dreamhost.com (mailbigip.dreamhost.com [208.97.132.5]) by svr4.postgresql.org (Postfix) with ESMTP id ECEDF5AF893 for ; Sat, 23 Dec 2006 19:51:42 +0000 (GMT) Received: from [192.168.1.238] (adsl-75-31-110-76.dsl.irvnca.sbcglobal.net [75.31.110.76]) by spunkymail-a1.dreamhost.com (Postfix) with ESMTP id BADC3FF837; Sat, 23 Dec 2006 11:51:44 -0800 (PST) Message-ID: <458D88C8.8010702@benjaminarai.com> Date: Sat, 23 Dec 2006 11:51:36 -0800 From: Benjamin Arai User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Benjamin Arai Cc: "A. Kretschmer" , pgsql-general@postgresql.org Subject: Re: Problem with large table not using indexes (I think) References: <458D82D0.5050903@araisoft.com> <20061223193339.GA8688@a-kretschmer.de> <458D867C.5000207@araisoft.com> In-Reply-To: <458D867C.5000207@araisoft.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200612/1430 X-Sequence-Number: 106368 One more note about my problem, when you run a query on older data in the table then it work great but if you query newer data then is very slow. Ex. SELECT * from my_table WHERE date >=12/1/2005 and date <= 12/1/2006; <- slow SELECT * from my_table WHERE date >=12/1/2002 and date <= 12/1/2003; <- fast It just has to do with the new data for some reason. Benjamin Benjamin Arai wrote: > Function Scan on "getTimeSeries" (cost=0.00..12.50 rows=1000 > width=24) (actual time=11065.981..11067.008 rows=262 loops=1) > Total runtime: 11067.991 ms > (2 rows) > > It is a PL function. Do I need to break it down? > > A. Kretschmer wrote: >> am Sat, dem 23.12.2006, um 11:26:08 -0800 mailte Benjamin Arai >> folgendes: >> >>> because it would literally take over a week to complete. Any help >>> would be greatly appreciated. >>> >> >> What says an 'explain analyse'? >> >> >> Andreas >> > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend >