tomcmok

Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • in reply to: Inline Add #87521
    tomcmok
    Participant

    Thanks Tony – I've thought of similar way, but wanted to consult that to avoid reinventing the wheel

    Chhers,

    Tom

    in reply to: additional row data – how? #87520
    tomcmok
    Participant

    oh, I see that's in 3.5 – we've used 3.4.4 so far – thanks – will have a look at this

    Tom

    in reply to: Row Counts / Paging #87516
    tomcmok
    Participant

    Tony,

    If there's a request for 10 rows I'm trying to fetch 11 (one more) by iterating throught the resultset (I have to do that anyway to build the XML/JSON). If there is at least one more row – it means there are more data and at this point it doesnt matter how many – this information is just required to let the paging display the “Next” icon

    I'm not sure how that solution would work in PHP, but I have my backend app server done in Delphi and there is a component that let's me iterate through the resultset and it informs me if there are no more rows to fetch.

    I suppose that in PHP if you ask for 11 rows and load the resultset into an array, you can heck the real array length afterwards.

    Smart and simple – isn't it 😉

    The whole point is to keep in mind that the less SQL statements and the less fetches the better. Especially if you work on the databases with hundreds of tables containing hundred thousands of records or even more.

    Cheers,

    Tom

    in reply to: Row Counts / Paging #87469
    tomcmok
    Participant

    Well, instead returning the big total number of pages (what is the relativr big number? that depends on the databese you deal with). My solution is to check if there are more records and if so just return the information that there is ONE more page. this way the paging and page input work well

    in reply to: Row Counts / Paging #87404
    tomcmok
    Participant

    What if you have complex SQL statement that joins several tables which itself takes time and a result gives you 100 thousands records. You will have to fetch them all just to count them and it will take quite some time and you will end up with displaying just ten. The difference in time may be couple of seconds wasted just to load into an array (not speaking about the unnecessary memory consumption).

    T.

    in reply to: Row Counts / Paging #87399
    tomcmok
    Participant

    hi, see my similar topic here I was hoping to get some hints from the author. Obviously counting records just to get the paging to work is not efficient – I've suggested a sort of workaround that could solve the problem, without changing the js grid code

    cheers, Tom

    in reply to: Can I avoid counting records? #87398
    tomcmok
    Participant

    Well, passing the total number of records in initializationmay not be a solution either, as it may change with other users activity. The only thing that grid should know to let the paging work is if there are more records left. I think this can be done by passing a proper (i.e current page number * records per page + 1) information in the node – not the real record count.

    But I'd like to know from the author if he has implemented or plans to implement such solution in the incoming releases.

    Tom

Viewing 7 replies - 1 through 7 (of 7 total)

Stay connected with us in your favorite flavor!