[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#6696) back-sql and pagedResultsControl can be extremely heavy due to no LIMIT

Howard Chu wrote:

>> Using back-sql on large databases along with pagedResult control is not
>> advisable.  Limiting the number of entries returned by each query is not
>> viable as well, since some entries might not mathc the LDAP filter, or
>> ACLs or so, possibly leading to less than pageSize entries returned
>> within one page.  PagedResults could be removed from back-sql, and dealt
>> with by an overlay that simply pages results returned by back-sql in a
>> single internal search; probably this is the preferable approach, since
>> it would also result in a reduction of the complexity of back-sql.
>> However, I have little interest in improving back-sql, so patches are
>> welcome, as usual...
> The sssvlv overlay already intercepts pagedResults requests if they 
> occur in combination with the Sort control. It would be trivial to 
> extend it to always intercept pagedResults, and then we can rip the 
> paging support out of each of the backends. (Of course, there's a 
> marginal efficiency advantage to letting back-bdb/hdb do its own paging. 
> A configurable option might be best.)

That's more or less what I had in mind.  I assume you merged the two 
functionalities in one overlay because pagedResult needs special care 
when combined with SSSVLV, and this might be true for other 
functionalities, though (e.g. having efficient pagedResult; life would 
be much better without it, since clients do not need it while it makes 
servers' life harder).  With respect to conditionally exploiting native 
pagedResult capabilities of back-bdb/hdb I only fear some issues related 
to glued databases.  Those could be possibly solved by disabling native 
back-bdb/hdb pagedResult handling when used in glued databases, or even 
more granularly, when a search spans more than one database in a glued 
configuration, delegating the handling to the overlay in those cases.