Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Getting rid of SELECT COUNT (*) Query for ListGrid fetches

    Hi Isomorphic,

    I have a ListGrid displaying only a few rows (always <<75). The generated SELECT queries a quite expensive view.
    The normal ListGrid-behavior is to send two queries (one SELECT COUNT (*) FROM and one SELECT data, ... FROM) in order to determine what to fetch next when a user draws the ListGrid's scrollbar and to assign the correct size for the scrollbar.

    From http://www.smartclient.com/smartgwte...veLoading.html I got that in my case of the short list and expansive SQL, setting DSRequest.setProgressiveLoading(true) is the way to get rid of the SELECT COUNT (*) with no penalty, correct? If so it would be great if you could include this in the docs as I think that this question might come up often.

    Another question:
    I think I saw this behaviour: The normal data-query is not fired if count(*) returns zero rows, which of course is good.
    If count(*) takes longer than some threshold to complete, the data query is fired before the count(*) returns. Most likely to have a good user experience with no delay. If so: Impressive, once again!

    Best regards,
    Blama

    #2
    Hi Isomorphic,

    a note, as I stumbeld upon my own thread searching the forums :)

    The ListGrid javadocs regarding ProgressiveLoading-methods (getProgressiveLoading and setProgressiveLoading) contain no information or link to DSRequest.setProgressiveLoading or com.smartgwt.client.docs.ProgressiveLoading.

    Best regards,
    Blama

    Comment

    Working...
    X