From: Vic Ricker <vic@ricker.us>
To: SZUCS Gabor <surrano@mailbox.hu>
Cc: pgsql-sql@postgresql.org
Subject: Re: How do I convice postgres to use an index?
Date: Tue, 20 Jul 2004 10:21:37 -0400
Message-ID: <40FD2A71.2030104@ricker.us> (raw)
In-Reply-To: <050001c46d6d$0fb2dea0$0403a8c0@fejleszt4>
References: <Pine.LNX.4.44.0407151659420.12214-100000@matrix.gatewaynet.com>
<050001c46d6d$0fb2dea0$0403a8c0@fejleszt4>
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?
>
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: vic@ricker.us, surrano@mailbox.hu
Subject: Re: How do I convice postgres to use an index?
In-Reply-To: <40FD2A71.2030104@ricker.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox