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?
>
>
>