Re: WIP: Transportable Optimizer Mode

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: chris <cbbrowne(at)ca(dot)afilias(dot)info>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: WIP: Transportable Optimizer Mode
Date: 2008-08-02 19:12:50
Message-ID: 1217704370.3934.132.camel@ebony.t-mobile.de.
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Chris,

Thanks for all of those changes... added as suggested (in next version)

On Wed, 2008-07-30 at 14:58 -0400, chris wrote:

> It's not clear to me that the plugin is actually working.
>
> When I run EXPLAIN against tables in "tomtestdb", I get results
> consistent with an unanalyzed table. So possibly the "hook" isn't
> being used. Perhaps I'm using it wrongly; perhaps what I have
> documented above may suggest to you what's broken.

The plugin works, but it currently extracts 0 for number of tuples. So
you need to override that to give a different answer.

I was going to add an SQL function to estimate the number of tuples in
the same way as the optimizer does. That way we get the same answer from
the EXPLAIN as we would have got on the main server and we don't need to
run select count(*) against each table (unless we want to).

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tatsuo Ishii 2008-08-03 02:47:11 WITH RECURSIVE patches 0803
Previous Message Michael Meskes 2008-08-02 18:40:54 Re: WITH RECUSIVE patches 0723