Hello,
I discovered a piece of code that fetched an entity collection with some prefetch paths.
The prefetch tree looked something like this:
Root
P1
SP1
SP2
P2
SP3
P3
SP4
SP5
P4
Now I can understand that this would generate some rather hedious SELECTs
But it was just the way it was done. Some numbers: the query would fetch 200 root entities selected from a total of 13.000. Root - P1 is a 1:1 relationship while the others are m:1 relationships (Pi, SPj, i > 1 all have few tuples, 500 in average).
When I ran it, it seemed to take forever to run
In fact I stopped it after a while. I modified the query to return just 5 root entities, and it took around 20 minutes to end!!! The windows task manager showed me that the actual query in the database took only a small fraction of that time, 99% of the time was the program taking 99% of CPU time.
I profiled it with the very nice JetBrains dotTrace and most of that time was prefetch path handling time.
So I'm wondering, is this some problem with the prefetch path code, or maybe I'm just not supposed to write that query
salut
álvaro.-