How to save large json data to db

hello guys need some help, actually the thing is right now i am making an http method to our server for getting user data this data is coming in json format and its very large.
right now i am able to save it in db using multiple foreach but its very slow and it is taking too much time for storing so is there any other convenient method for storing large json response directly to db like automapper or anything?
FYI i am using sqlite-net-pcl for storing this data.


  • batmacibatmaci DEMember ✭✭✭✭✭

    Akavache package is your best option. I had similar issue. Sqlite is not very good solution for multi level data. If you have like data structure like objects
    - School- Class- Teacher- Student- Marks and you have multiple tables in your sqlite for each object, as you did you need to save with foreach or using GetAllWithChildren, SaveAllWithChildren etc methods but those all are very slow if you have many rows with children to save.
    Akavache takes care of it as a key value saving. It is also based on sqlite.
    Just dont use the latest version, it has a bug and slow. there is an open issue about it. Use the version mentioned in that issue

  • ketanravatketanravat Member ✭✭
    edited January 26

    Ok thanks @batmaci for reply i will try this method and if you have any guidance or demo project for reference then suggest me actually i need to do this urgent ASAP thanks in advance.

  • batmacibatmaci DEMember ✭✭✭✭✭

    all information and everything you need is on the link. it is very simple usage. just read the info there

Sign In or Register to comment.