Обсуждение: [PATCH] Partial indicies done

Поиск
Список
Период
Сортировка

[PATCH] Partial indicies done

От
Martijn van Oosterhout
Дата:
Well, there you go. As far as I can tell, with this patch they should work
fine. These are the changes since the last one:

* Fixed the partial index code in all the other index types too.
* Modified the planner to check whether a straight index scan over a partial
  index will help.

Actually, I'm not really sure if that second change was necessary. I'll have
to check the formulas, but the partial index will have to be *very*
selective before it comes out ahead of a plain sequential scan.

Now, what it needs is testing but I'm not sure how you test something like
this. And since it shares 90% of the code with the plain index code there's
really very little that can go wrong.

There's one outstanding issue, the "INDEX TUPLES NOT SAME AS HEAP" message.
It's really just a warning but it looks bad. It should be supressed, or even
better, properly checked, but I can't see an easy way to do that since that
function only has the oid.

So, what do I do now? Send it to pgsql-patches?
--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> It would be nice if someone came up with a certification system that
> actually separated those who can barely regurgitate what they crammed over
> the last few weeks from those who command secret ninja networking powers.

Вложения

Re: [PATCH] Partial indicies done

От
Tom Lane
Дата:
Martijn van Oosterhout <kleptog@svana.org> writes:
> So, what do I do now? Send it to pgsql-patches?

A few things to look at first:

1. EXTEND INDEX.

2. Documentation (so far you've not even fixed the comment on the
CREATE INDEX production :-().  Keeping the code comments and the
SGML documentation up-to-date is as critical a part of the project
as the code itself.

3. pg_dump.  You don't have a usable feature if pg_dump doesn't dump it.

            regards, tom lane