You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "angelo.rlcosta" <an...@gmail.com> on 2015/03/16 12:01:12 UTC

Sql component lazy loading?

Hi guys, does anyone know if sql component has an option to disable lazy
loading?



--
View this message in context: http://camel.465427.n5.nabble.com/Sql-component-lazy-loading-tp5764211.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Sql component lazy loading?

Posted by "angelo.rlcosta" <an...@gmail.com>.
Hi Antoine,

Yes i understood that. But my problem is that using an index to access the
array in the body takes a bit of time.
Trying to figure out why.

Thanks,


Ângelo Costa

On Tue, Mar 17, 2015 at 10:36 AM, Antoine DESSAIGNE [via Camel] <
ml-node+s465427n5764267h14@n5.nabble.com> wrote:

> Hi Angelo,
>
> The SQL component returns a List when you set the outputType as SelectList
> (which is the default value), thus all the values are fetched at once.
>
> See the documentation here: http://camel.apache.org/sql-component.html
>
> Antoine.
>
> 2015-03-16 12:31 GMT+01:00 angelo.rlcosta <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5764267&i=0>>:
>
> > Hi Claus,
> >
> > Every time i try access ${body[0]} to get the first item returned from
> the
> > list from the DB seems a bit slow. Seems like lazy loading is enabled.
> >
> > Therefore wanted to try use lazy loading = false somehow to check if its
> > faster.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Sql-component-lazy-loading-tp5764211p5764216.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Sql-component-lazy-loading-tp5764211p5764267.html
>  To unsubscribe from Sql component lazy loading?, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5764211&code=YW5nZWxvLnJsY29zdGFAZ21haWwuY29tfDU3NjQyMTF8OTY0MzQzODU=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Sql-component-lazy-loading-tp5764211p5764270.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Sql component lazy loading?

Posted by Antoine DESSAIGNE <an...@gmail.com>.
Hi Angelo,

The SQL component returns a List when you set the outputType as SelectList
(which is the default value), thus all the values are fetched at once.

See the documentation here: http://camel.apache.org/sql-component.html

Antoine.

2015-03-16 12:31 GMT+01:00 angelo.rlcosta <an...@gmail.com>:

> Hi Claus,
>
> Every time i try access ${body[0]} to get the first item returned from the
> list from the DB seems a bit slow. Seems like lazy loading is enabled.
>
> Therefore wanted to try use lazy loading = false somehow to check if its
> faster.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Sql-component-lazy-loading-tp5764211p5764216.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Sql component lazy loading?

Posted by "angelo.rlcosta" <an...@gmail.com>.
Hi Claus,

Every time i try access ${body[0]} to get the first item returned from the
list from the DB seems a bit slow. Seems like lazy loading is enabled. 

Therefore wanted to try use lazy loading = false somehow to check if its
faster.



--
View this message in context: http://camel.465427.n5.nabble.com/Sql-component-lazy-loading-tp5764211p5764216.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Sql component lazy loading?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

What do you mean by lazy loading?

On Mon, Mar 16, 2015 at 12:01 PM, angelo.rlcosta
<an...@gmail.com> wrote:
> Hi guys, does anyone know if sql component has an option to disable lazy
> loading?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Sql-component-lazy-loading-tp5764211.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/