Questions tagged [eager]

eager database fetching: efficiently load related objects along with the objects being queried.

(contrast with lazy fetching or lazy loading)

Related tags

134 questions
5
votes
1 answer

Eager versus Lazy Haskell. Infinite lists possible in Eager languages?

Apparently it is possible to implement Haskell such that it evaluates eagerly without changing the semantics of the language at all. If that is true, how are infinite data structures handled? http://csg.csail.mit.edu/pubs/haskell.html Therefore, a…
TheIronKnuckle
  • 7,224
  • 4
  • 33
  • 56
5
votes
1 answer

Why Haskell need Data.Sequence when we already have list?

List is a default data type of Haskell, why we still need Data.Sequence? Does Data.Seq mean something like a C style array that could be accessed randomly? If yes, I would suppose this means Data.Sequence is stored with fixed memory buffer and…
vik santata
  • 2,989
  • 8
  • 30
  • 52
5
votes
7 answers

When is lazy evaluation not useful?

Delay execution is almost always a boon. But then there are cases when it’s a problem and you resort to “fetch” (in Nhibernate) to eager fetch it. Do you know practical situations when lazy evaluation can bite you back…?
Cherian
  • 19,107
  • 12
  • 55
  • 69
5
votes
2 answers

Eager fetching collections in Hibernate with ScrollableResults

I'm trying to use Hibernate to retrieve approximately 100 million rows from a table. I have a persisted entity Item that contains a collection of Fees inside (another persisted entity). Given that I will iterate over the result and access the fees…
4
votes
0 answers

How to get intermediate output for eager mode

I established a transfer learning model and tried to get the intermediate output. I followed one of the suggestion here in order to get the intermediate output of a model, as follows: import tensorflow as tf from tensorflow.keras import backend as…
4
votes
0 answers

Tensorflow eager execution - nested gradient tape

I have been testing my WGAN-GP algorithm on TensorFlow using the traditional graph implementation. Recently, I happened to get to know TensorFlow Eager Execution and tried to convert my code to run on the eager execution mode. Let me first show you…
dalbom
  • 65
  • 5
4
votes
1 answer

tf.enable_eager_execution must be called at program startup ONLY in SPYDER IDE

I have tried to perform an eager execution of a simple code. I've tried it on both Jupyter Notebook and Spyder IDE. With Jupyter I have no problem but when I execute the code in Spyder it returns an error: File…
Blunt
  • 529
  • 1
  • 8
  • 14
4
votes
2 answers

Dynamic Eager & Lazy Loading in Hibernate

I'm new to Hibernate, but have plenty of experience with the Entity Framework in C#. One feature I love is the ability to dynamically decide what to load immediately in a query. For example, consider a One-to-Many relationship of Class and Student…
AirmanAJK
  • 91
  • 1
  • 6
4
votes
2 answers

Rails 4 eager loading with multiple tables

I'm trying to eager load results with 5 tables: class Meeting < ActiveRecord::Base has_many :bookings end class Booking < ActiveRecord::Base belongs_to :user belongs_to :meeting belongs_to :role belongs_to :group end class Group <…
karlingen
  • 13,800
  • 5
  • 43
  • 74
4
votes
1 answer

Hibernate Default Lob Lazy/Eager

When hibernate loads an object containing a field annotated with @Lob will this field be loaded eagerly or lazily?
DD.
  • 21,498
  • 52
  • 157
  • 246
4
votes
1 answer

Lazy vs Eager loading with JPA

I am trying to get some JPA stuff to work. I have a table that has foreign keys to another tables. When I generate the JPA entities I get one to many anotations over those variables... what else would I need to do get all the tables back in the…
SoftwareSavant
  • 9,467
  • 27
  • 121
  • 195
3
votes
1 answer

Is there a Grails plugin for detecting N+1 fetching (similar to the Rails bullet gem)?

I recently learned about the Rails "bullet" gem that addresses the N+1 problem and determines when your app should or should not use eager fetching. Apparently it checks at runtime on the occurrence of N+1 loads that are not needed or the need for…
SD Code
  • 46
  • 2
3
votes
4 answers

Use fetch join or EAGER to solve hibernate multiple-bag-fetch-issue?

I have a Class A which has one-to-many relationship with class B & C. I had set the fetchType to EAGER which causes the multiple bag fetch problem in JPA. Now there are two ways to solve the problem which I know of. Either I keep the fetch type…
Rakesh
  • 133
  • 1
  • 10
3
votes
1 answer

HQL / Nested Eager Loading

I am wondering what the best way is to load nested values for lazy loaded objects. I'm providing an example to help explain this better. public class A{ private B b; //Lazy loaded private C c; //Lazy loaded private D d; //Lazy…
user973479
  • 1,629
  • 5
  • 26
  • 48
3
votes
1 answer

Entity Framework 4 POCO - Lazy + Eager Loading

I have the following DB structure (simplified version): Comments - CommentId, UserId Users - UserId UserDetails - UserId, Address, Phone, etc. I am using EF 4 with POCOs. The User property of the Comment class is marked as virtual (to enable lazy…
Boyan Mihaylovv
  • 338
  • 2
  • 10
1
2
3
8 9