A streaming result set is a few days away yet. The SQL extension handles
them
but we uncovered a bug in Xalan that was defeating our cause. Once
it does work,
A) the default behavior will be streaming mode so there is nothing
to do and B) it
can be controlled with the enableStreamingMode() and disableStreamingMode()
function calls.
Although I am not sure this will help you, if you produce a query that
has 3 columns
where Col A is the top level group, which contains elements of ColB
containing
elements of Col C.
Since XSLT does not allows for mutating variables, you would have to
traverse down
to the branches of Col C. The roll-up or calculation of the group would
happen during
the successive return of all the apply-templates. During the return
sequence, the previous
data from the query would have to be revisited but the nature of the
streaming result set
will not allow that. So to accomplish the task, you will have to define
a variable in each
instance of the template to hold the value, but now you are back to
your memory problem.
Unless I am not understanding how you are doing the grouping process.
I am also interested in how much memory Xalan uses in non streaming
mode compared
to Oracle's. There is very little overhead with the Xalan implementation
besides actually
storing just the column values. The problem you may run into
for non streaming mode
is the node limitation of DTM. Each row takes 2 x # of Col's
+ 1 nodes. DTM mode is
limited to 20 bits of node identifier of just better that 1Mil nodes.
So you will be over
the limit.
You could probably use streaming mode, cheat a little using Java variables
so you can
roll-up the data as you traverse into the tree.
Monitor the list to see when streaming mode is finished. Since I am
traveling back east
tomorrow, I probably own get to it until Mon unless I test and it is
working tonight.
The is no Xalan-J specific list just a Xalan list. sign up here http://xml.apache.org/mail.html
Regards
John G
"Snively, Paul" wrote:
Hi John,
Please forgive me for e-mailing you directly; I can't seem to find the mailing list address for Xalan-Java anywhere on the site.
I was wondering if you happen to have any examples using your SQL library extensions to Xalan to do grouping in the presence of a streaming result set. I have a query that returns an enormous number of rows (> 120,000), and the results need to be grouped by three columns. Using something like Oracle's own XDK to do the query and using the standard Muenchian Method for grouping requires an ENORMOUS amount of memory, well in excess of half a gigabyte, so I was hoping to use Xalan and its streaming SQL extension but can't quite puzzle out how.
Any help you may be able to offer is vastly appreciated.
Thanks and best regards,
Paul Snively
<mailto:[EMAIL PROTECTED]>
