"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes:
> Why does using CURRENT_DATE instead of a literal date make a difference?
In 7.3 it doesn't. Prior versions do not understand that CURRENT_DATE
can be treated like a constant in this context. Time to update ;-)
regar
Christopher Kings-Lynne wrote:
EXPLAIN
usa=# explain analyze UPDATE users_users SET suspended=false,
suspended_on=NULL, suspended_off=NULL WHERE suspended_off=CURRENT_DATE;
NOTICE: QUERY PLAN:
Seq Scan on users_users (cost=0.00..2927.26 rows=267 width=248) (actual
time=466.76..466.76 rows=0 loo
I'm seeing this:
I have indexed the suspended_off column.
usa=# explain analyze UPDATE users_users SET suspended=false,
suspended_on=NULL, suspended_off=NULL WHERE suspended_off='2002-02-02';
NOTICE: QUERY PLAN:
Index Scan using users_users_susp_off_idx on users_users
(cost=0.00..1005.91 rows=2