Re: Create index on the year of a date column - Mailing list pgsql-general

From Vincent Hikida
Subject Re: Create index on the year of a date column
Date
Msg-id 00e201c32c7b$559a9720$6601a8c0@HOMEOFFICE
Whole thread Raw
In response to Create index on the year of a date column  ("Nick Barr" <nick.barr@webbased.co.uk>)
List pgsql-general
> regression=# explain SELECT * FROM sm_item WHERE
> regression-# item_created_date_start BETWEEN '1685-01-01' AND
'1685-12-31';
>                                                      QUERY PLAN

Hmm, if date includes the time, shouldn't the query be:

SELECT *
     FROM sm_item
  WHERE item_created_date_start >= '1685-01-01'
         AND item_created_date_start < '1686-01-01'



Vincent Hikida,
Member of Technical Staff - Urbana Software, Inc.
"A Personalized Learning Experience"

www.UrbanaSoft.com



pgsql-general by date:

Previous
From: DeJuan Jackson
Date:
Subject: Re: Nulls get converted to 0 problem
Next
From: terry@greatgulfhomes.com
Date:
Subject: Re: Nulls get converted to 0 problem