pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: CN <cnliou9@fastmail.fm>
Cc: pgsql-sql@postgresql.org
Subject: Re: Creating Index
Date: Wed, 1 Oct 2003 11:15:27 -0700 (PDT)
Message-ID: <20031001110830.O40704@megazone.bigpanda.com> (raw)
In-Reply-To: <20031001152542.8C9C76F692@smtp.us2.messagingengine.com>
References: <Pine.LNX.4.44.0310011419060.2932-100000@peter.localdomain>
	<20031001152542.8C9C76F692@smtp.us2.messagingengine.com>


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 .




view thread (17+ messages)  latest in thread

Message-ID: <20031001110830.O40704@megazone.bigpanda.com>
Permalink:  ../20031001110830.O40704@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20031001110830.O40704@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, cnliou9@fastmail.fm
  Subject: Re: Creating Index
  In-Reply-To: <20031001110830.O40704@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox