X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 84611D1B374 for ; Tue, 20 Jul 2004 11:21:56 -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 23791-06 for ; Tue, 20 Jul 2004 14:21:49 +0000 (GMT) Received: from corpmail.sheetz.com (fw.sheetz.com [209.158.1.62]) by svr1.postgresql.org (Postfix) with ESMTP id 61A94D1B298 for ; Tue, 20 Jul 2004 11:21:44 -0300 (ADT) Received: from [10.1.3.38] (localhost [127.0.0.1]) by corpmail.sheetz.com (8.11.6+Sun/8.11.6) with ESMTP id i6KELaa13605; Tue, 20 Jul 2004 10:21:45 -0400 (EDT) Message-ID: <40FD2A71.2030104@ricker.us> Date: Tue, 20 Jul 2004 10:21:37 -0400 From: Vic Ricker User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 MultiZilla/ StumbleUpon/1.994 X-Accept-Language: en-us, en MIME-Version: 1.0 To: SZUCS Gabor Cc: pgsql-sql@postgresql.org Subject: Re: How do I convice postgres to use an index? References: <050001c46d6d$0fb2dea0$0403a8c0@fejleszt4> In-Reply-To: <050001c46d6d$0fb2dea0$0403a8c0@fejleszt4> Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit 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: 200407/128 X-Sequence-Number: 18380 The plan showed that Postgres did the proper cast on the timestamp. I think part of the problem is that I need to increase the memory allocated to effective_cache_size for the optimizer choose the proper method. (Thanks to Richard Huxton for help.) I've read that if it doesn't have enough ram, it will forego the index for a sequential scan.. In my case, that's a very poor decision on the optimizer's part. Disabling enable_seqscan seems to generally fix the problem but I'm afraid that it might degrade performance elsewhere. I have expermiented with the effective_cache_size and some other settings but haven't had as much luck. I think I need more physical ram. Will try that soon. -Vic SZUCS Gabor wrote: >re-checked; it's WITHOUT in both version, but it's irrelevant if you give >the full spec. Well, then maybe it was a difference between 7.2 and 7.3, but >again, it's irrelevant in your case. Have you tried the typecast? > > >