"Denver Braughler" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Richard Jebb wrote:
> > Has anyone successfully handwritten a query that returns a stream?
> It sounds doable.
>
> > In order to improve the efficiency of the transfer of complex data
between
> > Cache and the client, we are trying to "bundle up" loads of property
values
> > into a character stream. This would then be parsed by the client, which
> > requests the data by getting a resultset from the query.
> >
> > The problem I am having is that a queryFetch() method appears to
assemble
> > the row data into a $list.
> Are you using a stored procedure or what?
>
> > In fact, if I try and include the data, the OREF of the stream simply
gets
> > converted to a string and is therefore useless anyway.
> Probably because it was a $list.
>
> > reference in one code snippet (in the section "Using streams with SQL")
to a
> > %qstrhandle
>
> That is for a column that is a stream.
> Are any of your properties streams?

I have about 60 different classes which all inherit from a common
superclass, and which have a fairly wide variety of properties. At present
some of these are array collections - these can get quite large, and apart
from performance issues we have also hit the <MAXSTRING> limit when trying
to save data into them. After some initial experiments it would seem that
converting these properties to streams would solve both types of problem.

As some of the classes have maybe 20-30 properties, with perhaps 5 of them
being array data (to be stored as streams) we are looking at a further
optimisation that dynamically serialises all the properties into a single
character stream which can then be retrieved in a single call.

I have created a proxy class with a single stream property named "data" and
have implemented a dataGet() method which does this serialisation, given the
ID of any instance of one of these classes. This all works fine, but still
relies on method calls rather than SQL, which should be quicker still.

As described in the original post, I can't see how I can mimic the built in
system behaviour for stream columns in a hand written query wrapped around
my serialisation code...





Reply via email to