dynamobi/dynamobi — Issue #188: [LDB-133] add buffering for RHS of cross products
Author: dynamobi-build
Created: 2011-12-30 02:20:06+00:00
State: open
Labels: LDB, Optimizer

[reporter="jvs", created="Fri, 1 Sep 2006 13:33:38 -0500 (GMT-05:00)"]
In the past, we used to always buffer, but at some point I deleted that. It's not always the right thing to do; e.g. if the RHS is a table, it may be cheaper to just rescan it each time through.

We can start by putting back in the always-buffer behavior. My past implementation was as part of toStreamDef (inserting an anonymous buffer stream), but the new implementation should be in terms of an explicit FennelBufferRel so that cost-based planners/rules can manipulate it.

For LucidDB, if it's easy to put in a rule with some smarts, go for it.