From: Pavan D. <pav...@gm...> - 2013-08-12 09:17:23
|
On Mon, Aug 12, 2013 at 9:54 AM, Ashutosh Bapat < ash...@en...> wrote: > > Welcome to the mess ;) and enjoy junk food. > > Sometime back, I have changed ExecRemoteQuery to be called in the same > fashion as other Scan nodes. So, you will see ExecRemoteQuery calling > ExecScan with RemoteQueryNext as the iterator. So, I assume your comment > pertains to RemoteQueryNext and its minions and not ExecRemoteQuery per say! > > This code needs a lot of rework, removing duplications, using proper way > of materialisation, central response handler and error handler etc. If we > clean up this code, some improvements in planner (like using MergeAppend > plan) for Sort, will be possible. Regarding materialisation, the code uses > a linked list for materialising the rows from datanodes (in case the same > connection needs to be given to other remote query node), which must be > eating a lot of performance. Instead we should be using some kind of > tuplestore there. We actually use tuplestore (as well) in the RemoteQuery > node; the same method can be used. > > If we at all want to rework that, IMHO we should just use ForeignScan with appropriate enhancements to the node and/or addition of a new node to effectively combine results from multiple ForeignScan nodes. Thanks, Pavan -- Pavan Deolasee http://www.linkedin.com/in/pavandeolasee |