@steevej
I am using free tire cluster(M0) where by databases are located , My average size of collection is around 350 documents(records) and I have nested collections inside which I have mapped from java class(Book) when i fetch the single document using api by using findByProfielId(“1234”) which i have configured using spring data JPA its taking too long depending upon size of books(list<Books) field and had this field profileId indexed and i am trying to fetch single document
basic prolem I find is that its taking too much time to deserialize i.e blob to Java object while the viceversa saving the same object of list of 10books in books field is happening in less than a sec(763ms)
Basically I’m trying to fetch single Blob Object from db and its taking 10 sec while saving the same is taking less than a sec could anyone provide me a solution ?
@Data
public class BookAuthor implements FormAuditable {
private String id;
private String profileId;
private List<Book> books;
}
public class Book extends AbstractBaseFormAuditableModel {
private String academicYear;
private String typeOfWork;
private String name;
private String category;
private String authorReveiwer;
private String authorType;
private int references;
private String publisherName;
private String isbn;
private String published;
private String reviewed;
private String monthYear;
private String prescribedUniversity;
}
public interface BookAuthorReviewerRepository extends MongoRepository<BookAuthor, String>{
public BookAuthor findByProfileId(String profileId);
}