directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Sand <>
Subject Re: RFC 2696 and total entries in the search result
Date Thu, 22 Sep 2016 11:44:50 GMT
I think it's to have the web page say "showing 20 results" and  links for "page 2, page 3"

> On Sep 22, 2016, at 5:46 AM, Emmanuel Lécharny <> wrote:
>> Le 22/09/16 à 10:42, Doan Tin Nghia a écrit :
>> Thanks. I need it for paging (same issue like
> Ok, but let me ask you aain : why do you technically need to know how
> many entries you will get ?
> This information is totally spurious, unless you want to tell your
> client "you are going to get 1 238 654 entries".
> Most of the time, and I saw that many, many times by people trying to
> implemented an web page with back and forth buttons, the answer is "But,
> but, but, I *NEED* to know how many elements I wil get in order to
> correctly design my web page, otehrwise I will not be able to know if I
> will have a next page !!!". This is typically wrong. If you decide to
> show N elements in one page, and have a Next button, then just poll 2xN
> elements from the backend, and if you get more than N elements, you know
> that you will have a Next button.
> FTR, those using a RDBMS are frequently doing a selectcount(*) before
> doing the real select for the exact same reason, and this is STUPID :
> they are doing the exact same request *TWICE*, overloading teh server.
> Be smart.

View raw message