Re: Creating Index

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: CN <cnliou9(at)fastmail(dot)fm>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Creating Index
Date: 2003-10-01 18:15:27
Message-ID: 20031001110830.O40704@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Wed, 1 Oct 2003, CN wrote:

> Peter, Thanks a lot!
>
> > Unqualified count() cannot use an index because it has to visit all the
> > rows in the table.
>
> It is only for my test. In my real practice, queries like
> "SELECT * FROM view1 WHERE year = 2003 AND month BETWEEN 10 AND 12"
> will be performed.

You do realize that extract returns a double precision value not an
integer, and it's probably not going to be willing to push clauses down
through the union where the types are different .

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Vishal Charan (IT Fiji) 2003-10-01 20:42:10
Previous Message CN 2003-10-01 17:02:31 Re: Creating Index