Re: Optimizing >= and <= for numbers and dates

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Dimitri Nagiev <dnagiev(at)gmx(dot)de>
Cc: Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Optimizing >= and <= for numbers and dates
Date: 2003-10-01 17:38:02
Message-ID: 1065029881.85344.138.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 2003-10-01 at 13:30, Dimitri Nagiev wrote:
> Hi all,
>
> I haven't found any official documentation about the postgres sql optimizer
> on the web, so please forgive me if there is such a document and point me to
> the right direction.
>
> I've got the following problem: I cannot make the postgres SQL Optimizer use
> an index on a date field to filter out a date range, e.g.
>
> select * from mytable where mydate >= '2003-10-01';
>
> Seq Scan on mytable (cost=0.00..2138.11 rows=12203 width=543)
> Filter: (mydate >= '2003-09-01'::date)

EXPLAIN ANALYZE output please.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2003-10-01 17:38:53 Re: Ideal Hardware?
Previous Message Dimitri Nagiev 2003-10-01 17:30:47 Optimizing >= and <= for numbers and dates