From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is Linux 2.6.5 kernel good enough for production? |
Date: | 2004-05-17 20:19:27 |
Message-ID: | 87zn86vmb4.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Richard Huxton <dev(at)archonet(dot)com> writes:
> Dirk Försterling wrote:
> > There were some dumb queries with timestamps, performing much slower
> > with Linux-2.6.5 compared to Linux-2.4.25:
> > The queries used something like this (ts is a TIMESTAMP):
> > ... AND ts LIKE '2003-04-%'
>
> I'm guessing an index isn't being used because your LANG is something-UTF-8 and
> that got picked up when you recreated your database. Try recreating the
> database with the C locale and see if that does it.
Uhm, under no locale would an index be used for "ts LIKE '2003-04-%'" unless
you have an functional index on ts::text, which would be kind of weird.
You might want to rewrite this as
ts BETWEEN '2003-04-01' AND '2003-04-01'+'1 month'
or something like that. At least this way a straight normal index on ts would
be usable work.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2004-05-17 20:22:47 | Re: any experience with multithreaded pg apps? |
Previous Message | Dennis Gearon | 2004-05-17 18:33:24 | Re: Is Linux 2.6.5 kernel good enough for production? |