Re: SQL/MED estimated time of arrival? - Mailing list pgsql-hackers

From Shigeru HANADA
Subject Re: SQL/MED estimated time of arrival?
Date
Msg-id 20101108093619.50B5.6989961C@metrosystems.co.jp
Whole thread Raw
In response to Re: SQL/MED estimated time of arrival?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, 05 Nov 2010 10:43:45 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Shigeru HANADA <hanada@metrosystems.co.jp> writes:
> > Thanks, now I see your point.  Current FdwRoutine has no appropriate
> > function because Open is called from ExecutorStart which is used by
> > EXPLAIN too.
> 
> > But then we have mismatch between executor node interface and FDW
> > interface about BeginScan.  Should we add new function such as
> > ExecBeginNode and call ExecBeginXXX for each plan node?
> 
> That seems like a massive amount of new code, and wasted cycles during
> every query startup, to fix a very small problem.

Agreed.

> There's a flag EXEC_FLAG_EXPLAIN_ONLY that tells node Init functions
> whether the query is going to be run "for real" or only EXPLAINed.
> Use that to decide whether to do any real work.

I missed that flag.  That flag would make ExecInitForeignScan be able
to skip calling FdwRoutine.BeginScan when the query was an EXPLAIN
without ANALYZE.  Thanks for the suggestion.

Regards,
--
Shigeru Hanada




pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: sorted writes for checkpoints
Next
From: Hitoshi Harada
Date:
Subject: Re: How to share the result data of separated plan