On Wed, Jul 20, 2005 at 12:52:28PM +0200, Dawid Kuroczko wrote:
> On 7/20/05, Simon Riggs <[EMAIL PROTECTED]> wrote:
> > > Since it's also possible to do partitioning with UNION ALL, maybe it
> > > would be better if there was an option to explain that told it either to
> > > show or not show info about eliminated partitions. That would seem to
> > > serve the general case better than coding it according to table type.
> > Can you think up the syntax, so we can comment on that proposal?
> 
> hmm, maybe something like:
> EXPLAIN [ ANALYZE ] [ VERBOSE ] [ WITH EXCLUDED ]
> 
> Where WITH EXCLUDED would mean to show tables eliminated?

One thought I had about that... it might make sense to have different
defaults for EXCLUDED depending on the table you're hitting. For an
inherited table or a UNION ALL you would probably expect some
elimination to happen, but for queries against other tables you would
expect it not to happen (though I'm not certain you could even get
exclusion outside of inherited tables or a union...)

Also, I think it's possible that down the road people might want to just
be shown excluded tables by default depending on some setting (probably
a psql variable I imagine).

Given those two possibilities, I think it would be better to do 

EXPLAIN [ ANALYZE ] [ VERBOSE ] [ ( WITH | WITHOUT ) EXCLUDED ]
 
That way, the without syntax will be valid from the start.

> Also, it would be a good time to suggest some way for making
> EXPLAIN script-friendly.  Like return data as a computer program
> convenient table?

I would absolutely love to see this happen.
-- 
Jim C. Nasby, Database Consultant               [EMAIL PROTECTED] 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to