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

Re: Bug? 8.0 does not use partial index

From: Palle Girgensohn <girgen(at)pingpong(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: John Hansen <john(at)geeknet(dot)com(dot)au>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Bug? 8.0 does not use partial index
Date: 2005-01-14 00:52:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

--On torsdag, januari 13, 2005 19.32.38 -0500 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 

> I wrote:
>> I thought of a fairly miserable hack, which relies on the fact that 8.0
>> does know how to accumulate statistics on functional indexes:
> Never mind, it turns out that doesn't work the way I thought.  It's
> actually falling back to a default estimate :-(.  I still think it'd
> be a good idea to use stats on partial indexes in future releases,
> but right at the moment we aren't doing any such thing.

Oh, uh, too bad :(

> Here's an even more miserable hack: use a non-partial functional index
> over a multicolumn expression as a poor man's way of creating
> cross-column stats.  For example, assuming all this_group_id values are
> positive:


> Dunno if you're desperate enough to try that ... but it does seem to work.

Interesting. Yes, I might be that desperate, actually. As desperate as 30 s 
vs 30 ms can get me... :)

And this one would actually accumulate stats alright? Looks kinda hairy to 
me. It's not really a partial index anymore, but I guess that doesn't 

How is the behaviour on 7.4 for this stuff? It seems 7.4 does use the 
partial index, but not always, as shown in a previous mail. Will this 
example work on both versions, or just for 8.0?

BTW, shall I file some kind of bug report / feature request about 
accumulating stats for partial indices etc... Perhaps you're best equipped 
to file such a report ;-) ?


In response to


pgsql-hackers by date

Next:From: John HansenDate: 2005-01-14 00:52:38
Subject: Re: Bug? 8.0 does not use partial index
Previous:From: Palle GirgensohnDate: 2005-01-14 00:52:04
Subject: Re: Bug? 8.0 does not use partial index

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