Re: [PATCHES] [Fwd: Index Advisor]

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] [Fwd: Index Advisor]
Date: 2007-01-07 13:42:51
Message-ID: 65937bea0701070542k3f7f20e2k26c185d8073eefec@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On 1/7/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
>
> I have looked over this patch,

Thanks

I think we have to decide if we want this, and whether it should be in
> /contrib or fully integrated into the backend.

Well, as already said, the plugin architecture gives others a way to develop
and deploy their own index advisers, or even something else that does nifty
things with the generated plan!

I am thinking the API
> needs to be simpified, perhaps by removing the system table and having
> the recommendations just logged to the server logs.
>
>
The advise_index table not required to be a system table anymore, as
required by the original patch. It can be any table/view on which the
executing user has INSERT permissions. The Adviser internally builds an
'INSERT INTO advise_index ...' statement and executes it through SPI. So, it
actually behaves as if the user is doing and INSERT. As a side effect, if
the EXPLAIN is done in a transaction, which is later rolled back, the
recommendations inserted in the advise_index will also be lost!

contrib/pg_advise_index/sample_error_messages.txt also shows an interesting
usage, where advise_index is actually a VIEW with a RULE that redirects
INSERTs into another advise_index_data table.

Best regards,

--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | yahoo }.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2007-01-07 14:17:15 Re: [PATCHES] [Fwd: Index Advisor]
Previous Message Simon Riggs 2007-01-07 13:07:00 Re: [HACKERS] COPY with no WAL, in certain circumstances

Browse pgsql-patches by date

  From Date Subject
Next Message Gurjeet Singh 2007-01-07 14:17:15 Re: [PATCHES] [Fwd: Index Advisor]
Previous Message Simon Riggs 2007-01-07 13:07:00 Re: [HACKERS] COPY with no WAL, in certain circumstances