Skip site navigation (1) Skip section navigation (2)

Re: Optimizing a condition based on an a very unequally

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Nick Fankhauser <nickf(at)ontko(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Optimizing a condition based on an a very unequally
Date: 2002-03-13 21:21:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Wed, 13 Mar 2002, Nick Fankhauser wrote:

> Thanks for the answer! ...but now I have more questions:
> Is it true that if I use this condition in a join that further constrains
> the results, this might use the index?
If there were other conditions, it may do so.

> Does PGSQL know that few or many rows will be returned because of data
> gathered from the last vacuum?

I'd guess the last analyze (or vacuum analyze).

> What do you mean by "tuple validity?" can't this query be resolved entirely
> based on the index?

Not currently, because the index doesn't know if the row can be seen by
your transaction. There may be rows that are valid for some transactions
but not yours that also have index entries.

In response to

pgsql-admin by date

Next:From: James KeltyDate: 2002-03-13 21:41:27
Subject: Order by clause in 'select distinct'?
Previous:From: banghDate: 2002-03-13 20:40:05
Subject: Re: Update 6.5 database files to 7.0

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group