Re: Index not being used

From: Matthew Price <pricem(at)juno(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Index not being used
Date: 2002-02-14 22:04:24
Message-ID: 20020214.170439.16294.16467@wm8.jersey.juno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


>Please post your PostgreSQL version, and the actual explain output of
>both queries.

EXPLAIN SELECT cdate FROM sometable WHERE cdate = current_date;

NOTICE: QUERY PLAN:

Seq Scan on sometable (cost=0.00..332.70 rows=71 width=186)

EXPLAIN SELECT cdate FROM sometable WHERE cdate = '02/14/2002';

NOTICE: QUERY PLAN:

Index Scan using sometable_cdate on sometable (cost=0.00..66.64 rows=71 width=186)

My postgres version is 7.1.3

Again, thanks for any help
Matthew Price

________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/web/.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-02-14 22:38:00 Re: Index not being used
Previous Message Josh Berkus 2002-02-14 21:38:10 Re: Index not being used