Nav WS service and performance

yukonyukon Member Posts: 361
edited 2011-02-08 in NAV Three Tier
Hi expert,


In Nav ws we can get data follow two type ws.read and ws.readmultiple(filter,bookmarks,size). Read method is not problem. But when we use readmultiple has performance issue. When we set 0 in size, we will get all data from table. In my case, i have more than 10,000 record in my item table. So when i use readmultiple method data retrive time is so long. And then when we click paging index it reload all records again. If we use sql statement we can be do own paging. At Nav ... how can i do my own paging? ](*,)

Anybody has idea? ....

Happy CNY ....


Best Regards,
Yukon
Make Simple & Easy

Comments

  • kinekine Member Posts: 12,562
    It is why there is the size and the bookmark. Bookmark is the record, from which you want to read the data, the size is number of records. Thusif you are displaying 100 records per page, just use size 100 and keep the bookmark of the first/last entry to read the data from...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • yukonyukon Member Posts: 361
    Hi Kine,

    Thank for your suggestion.
    Thusif you are displaying 100 records per page, just use size 100 and keep the bookmark of the first/last entry to read the data from...

    I have 1000 records in my tbl. Page size is 10 record per page. so i have 100 paging. Ok! I bookmarks 1st record and 10th record. When i click 2nd paging i can be data without 1-10 record. But when i click last paging, it is load (1000-10) again.

    So .... any idea ?

    Best Regards,
    Yukon
    Make Simple & Easy
  • kinekine Member Posts: 12,562
    Than you need somehow get the bookmark of the last-10 record and use this to read the data. May be this is the problem, how to get the last-10 record bookmark... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • yukonyukon Member Posts: 361
    Hi Kine,
    how to get the last-10 record bookmark...
    If we use grid view we can be get 10th bookmarks. (eg. _gridview.DataKeys[10].Value.ToString())

    Best Regards,
    Yukon
    Make Simple & Easy
  • yukonyukon Member Posts: 361
    Hi all,

    It solved by myself.
    If we want to get data by range, we can be use (+-) in setsize. eg ws.readmultiple(ur_filters,ur_bookmarks,(+-intsetsize)).

    Best Regards,
    Yukon
    Make Simple & Easy
Sign In or Register to comment.