> On Aug 14, 2016, at 4:39 PM, Hugi Thordarson <[email protected]> wrote: > > Hi all! > Does Cayenne’s EJBQL support LIMIT expressions? I see I can set a fetch limit > on an EJBQLQuery, but it seems that this will just limit the size of the > resultset generated by the query, not the SQL generation (resulting in huge > execution times for large queries). > > Cheers, > - hugi
Yeah, the way it is implemented is not particularly efficient. The limit functionality is external to the syntax, and hence doesn't make it to the generated SQL. We can either patch EJBQL, or wait for the bright future when EJBQL and ObjectSelect and made one :) Andrus
