Hi Marco,

Generally, the BaseX SQL Module is capable of streaming results. It is
usually up to the corresponding SQL Java driver how large result sets
are handled. Maybe you can provide us with the Java stack trace; it
could help finding the culprit.

Cheers,
Christian


On Fri, Nov 11, 2016 at 10:56 AM, Marco Lettere <m.lett...@gmail.com> wrote:
> Hi all,
>
> I'm currently facing the issue of exporting a large table stored in a MySQL
> instance to a csv that has then to be zipped and served through a web
> service.
>
> I'd love to use XQuery and the Basex functionality for doing it because it
> feels perfectly natural.
>
> The problem is that the XQuery script that performs the SQL Query and
> transformation to CSV crashes with an Out of Memory exception.
>
> I know how to increase memory and so on but I'd like to find a stable
> solution that is as less as possible dependent from the system requirements.
>
> Currently the only idea is to page the operation and (maybe exploiting
> parallel execution) build an intermediate result on disk files that will be
> assembled before delivery.
>
> Isn't there any more elegant solution based somehow on the streaming
> functionality or anything like this?
>
> Thanks for any advice you can provide.
>
> Regards,
>
> Marco.
>

Reply via email to