[Postgres-xl-general] Getting execution plans from datanode plans

Mason Sharp msharp at translattice.com
Mon Jul 21 06:39:24 PDT 2014


On Sun, Jul 20, 2014 at 10:53 AM, Mason Sharp <msharp at translattice.com>
wrote:

>
>
>
> On Fri, Jul 18, 2014 at 1:17 PM, Aaron Jackson <ajackson at revionics.com>
> wrote:
>
>>  Is there any way to get the execution plans from each of the data nodes
>> without connecting to each individually… for example:
>>
>>
>>
>> EXPLAIN ANALYZE SELECT COUNT(*) FROM Table;
>>
>>
>>
>> Yields, something like this:
>>
>>
>>
>> Aggregate  (cost=932595.50..932595.51 rows=1 width=0) (actual
>> time=1667.296..1667.296 rows=1 loops=1)
>>
>>    ->  Remote Subquery Scan on all (datanode1,datanode2,datanode3)
>> (cost=0.00..884479.20 rows=19246520 width=0) (actual
>> time=1654.331..1667.266 rows=3 loops=1)
>>
>> Total runtime: 1674.774 ms
>>
>> (3 rows)
>>
>>
>>
>> It would be very helpful to know how each of the nodes intends to
>> approach this plan.  Currently, if I want to do that, I have to open a
>> connection directly with each datanode to get that plan – EXECUTE DIRECT
>> doesn’t like explain plans apparently.
>>
>>
>>
>
> There is one global plan created on the coordinator. The data nodes are
> informed what they need to do via serializing a message and sending it down.
>
> That said, this plan looks unexpected.  It should be pushing down count to
> the nodes, then have an aggregate, SUM on top, to get a sum of the counts
> at the end for a final result.  Let us look into this.
>
>
 Things do execute as desired, the issue here is with ANALYZE. We currently
do not display the subtree below.

In actuality, things are executing how they should (look at the plan
without ANALYZE), it is just an issue with passing back stats remotely when
ANALYZE is present.

I opened up a ticket for this and describe more details here:

https://sourceforge.net/p/postgres-xl/tickets/23/

There is an interim solution we may do to make things clearer.

Regards,

-- 
Mason Sharp

TransLattice - http://www.translattice.com
Distributed and Clustered Database Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.postgres-xl.org/pipermail/postgres-xl-general-postgres-xl.org/attachments/20140721/cb49e71e/attachment.htm>


More information about the postgres-xl-general mailing list