Android-ORM-benchmark icon indicating copy to clipboard operation
Android-ORM-benchmark copied to clipboard

Room results are incorrect case of using foreach instead of Room relationships

Open axrkozlov opened this issue 6 years ago • 0 comments

In Room there are approaches that could be used to define the relations between the entities:

  1. @Embedded (nested objects)
  2. @ForeignKey
  3. @Relation In test should have been using relationship instead of two sequential request and foreach to bind a library to a book. My simple read results with foreach are about 400ms comparing to using @Embedded relationship they are 30ms.

axrkozlov avatar Jun 07 '19 11:06 axrkozlov