none
Easy Table Too Large, Doesn't Load Into Android App RRS feed

  • Question

  • I have an Azure Mobile App with 6 Easy Tables that I pull into my Android Studio app. One of the 6 tables is very large, and when I try to pull it into my Android app with 

    return GlobalMethods.mTickmast.where().field("OutsideSalesman").eq("36").and().field("TickStatus").eq("3").select("Name","Addr1Number","Addr1Direction", "Addr1Street","Addr2","Zip").execute().get();

    it takes a very long time (I stopped waiting after 7 1/2 hours so I don't know how long it would take if I waited it out).

    I don't actually need it to check all the rows in the table - it could just do the most recent 1000 or so. How can I do this?

    Thursday, March 15, 2018 6:30 PM

Answers

All replies

  • Do not pull the entire table down.  You should implement some sort of paging or selection scheme.

    Jeff Sanders (MSFT)

    @jsandersrocks My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Friday, March 16, 2018 12:13 PM
  • Thank you for responding!

    That's my question. How do I only pull down part of the table, not the whole thing? I haven't been able to find a way to do this. Or rather, I know how to only pull down part of the table, but I think I'm already doing that with my "where" clause. My problem is that it takes the program a very very very long time (I don't think it ever actually finished) to search through all the rows in the Easy Table to see which rows to pull.

    How do I handle that?

    Sunday, March 18, 2018 8:30 AM
  • Hi Lane,

    You can use Skip and Take: https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-dotnet-how-to-use-client-library#paging

    This is for Mobile Services but the same logic applies:  https://blogs.msdn.microsoft.com/wsdevsol/2013/04/04/incremental-loading-of-data-using-windows-azure-mobile-services/


    Jeff Sanders (MSFT)

    @jsandersrocks My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Monday, March 19, 2018 12:19 PM
  • Thank you so much for taking the time to deal with this!

    I looked at your blog and it is very interesting but it looks like it's useful for a scenario where you want to load a lot of data, so it does it incrementally (or as the user "requests" it as they scroll) as opposed to all at once. My situation is different - I only want to load a few rows a data, but my app is stalling when it comes to searching the Easy Table through thousands of lines of code for those few rows to send to the android app. How do I speed up the search?

    Monday, March 19, 2018 6:44 PM
  • So that I am sure I understand...

    You are debugging this on the backend and you see that backend takes a long time to return the filtered data?  That should not be!  I would suggest you look at the database performance logs to see that is taking such a long time.


    Jeff Sanders (MSFT)

    @jsandersrocks My Blog: Http Client Protocol Issues (and other fun stuff I support)

    • Marked as answer by Lane95 Wednesday, April 25, 2018 6:11 PM
    Monday, March 19, 2018 6:48 PM
  • Sorry it took so long to get back to you on this, I had to work on some other things before getting back to this. You were right, it was a different issue, not the table size. I hadn't matched up the fields perfectly from the Easy Table to my local class in my Android app. I fixed that and it works now. Thanks so much!
    Wednesday, April 25, 2018 6:12 PM
  • Not a problem and glad I could help!

    Jeff Sanders (MSFT)

    @jsandersrocks My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Wednesday, April 25, 2018 6:28 PM