Search Postgresql Archives

Re: Timestamp indexes (why ">" or "between" does not use index?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



IN the second SQL, I meant this:

>     WHERE modify_date > '2008-01-01'


On 16/02/2008, Phoenix Kiula <phoenix.kiula@xxxxxxxxx> wrote:
> I have a table with an index on a field called "modify_date".
>
> This works well if I have SQL which ends in
>
>     WHERE modify_date = '2008-01-01'
>
> But if I try this condition:
>
>     WHERE modify_date = '2008-01-01'
>
> THis index is not used. The EXPLAIN tells me it needs to do a seq
> scan. Why is this? How can I make a date/time field index which uses
> both equality criteria and the greater than/lesser than/between
> criteria?
>
> Thanks.
>

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux