Optimizer bug??

From: "Ismail Kizir" <ikizir(at)tumgazeteler(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Optimizer bug??
Date: 2004-05-24 16:38:58
Message-ID: 002901c441ad$9ca01120$0100000a@bilmednot
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi everybody,

1 .... EXPLAIN SELECT COUNT(*) AS c FROM articletbl WHERE
((mydate BETWEEN '2004-04-24' AND '2004-05-24' )
)

2 .... EXPLAIN SELECT COUNT(*) AS c FROM articletbl WHERE
((mydate = '2004-04-24')
)

(I ran VACUUM ANALYZE before running those)

mydate is an indexed date column.
The optimizer optimizes the second query but, it doesn't optimize the first
one and decides to make a "sequential scan".
Is this a bug?
Or may someone explain me the reason?

Thanks in advance.

Ismail Kizir

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hans-Jürgen Schönig 2004-05-24 17:17:34 Re: Optimizer bug??
Previous Message Manfred Koizar 2004-05-24 16:02:44 Re: New horology failure