title: How to show data from database into a RecyclerView with high performance?
body: <p>I wrote my own CursorAdapter for RecyclerView like following link: <a href="https://gist.github.com/skyfishjy/443b7448f59be978bc59" rel="noreferrer">https://gist.github.com/skyfishjy/443b7448f59be978bc59</a></p>
  
  <p>Then I found whenever I change something in database and want to show it in RecyclerView, I need to create a new Cursor by db.query() and use CursorAdpater's changeCursor(). Since query() will scan all rows in database, the RecyclerView will refresh slowly when data amount is big even I insert only one row into database.</p>
  
  <p>Besides, as we all know, RecyclerView provides notifyItemInserted/Removed(position) for developers so that the RecyclerView can refresh partly, which is useful and beneficial to memory/time. However, when I use CursorAdapter, I don't know when and how I can use these methods because changing cursor isn't adding something directly to dataset binding with RecyclerView but refreshing all items in fact. </p>
  
  <p>So are there any better ways to show data from database in RecyclerView and use RecyclerView's improving method to show variety of database?</p>