New Posts New Posts RSS Feed: Compiled Queries
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Compiled Queries

 Post Reply Post Reply
Author
darrelmiller View Drop Down
Newbie
Newbie


Joined: 16-Dec-2011
Posts: 3
Post Options Post Options   Quote darrelmiller Quote  Post ReplyReply Direct Link To This Post Topic: Compiled Queries
    Posted: 16-Dec-2011 at 7:18am
I know this has been asked in the past and at the time it was being considered for inclusion, but has any progress been make on making compiled queries available.

The reason I would like to use them is due to the significant overhead that EF has when compiling queries with a number of Includes().  

Even if we were limited to being able to only compile named queries that are defined in a NamedQueryProvider, that would be sufficient.
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 16-Dec-2011 at 12:13pm
We have considered it seriously. But then we noticed that the EF team is promising to compile them automatically (a reversal of their original position on the viability of automated query compilation). "Auto-compilation" is described by Srikanth Mandadi(http://msdn.microsoft.com/en-us/magazine/hh394151.aspx) as a feature of the June 11 CTP.
Rather than divert resources to building what EF promises to deliver for free, we're staying focussed elsewhere. If the initiative doesn't bear fruit in reasonable time ... we can reconsider.
 
We're open to the case for revisiting sooner.
 
Btw, have you tested the performance of the compiled query relative to the ad hoc? There is some doubt on the part of many that one can actually benefit from this feature in real-life queries. It reminds me of the theoretical benefits of canned SQL query plans ... that didn't often show up in the field.
Back to Top
darrelmiller View Drop Down
Newbie
Newbie


Joined: 16-Dec-2011
Posts: 3
Post Options Post Options   Quote darrelmiller Quote  Post ReplyReply Direct Link To This Post Posted: 16-Dec-2011 at 12:24pm
Thanks for the link.  It's good to see that it is on the horizon.

I haven't been able to test the performance of the compiled query because I can't compile the query!  However, 4 seconds to compile a query that takes 8ms for SQL Server to execute seems like it is ripe for optimization.

Darrel
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 16-Dec-2011 at 12:47pm
4 seconds to compile? What kind of query is that?
I assume you are not including the dog-slow start up time (for which you might explore Entity Framework View Generation ... which IS something you can do for a DevForce app).
 
When I suggested testing perf I meant by composing the query in raw EF rather than through DF. All DF entities are EF entities so you can use them in raw EF queries. Of course such an experiment requires the kind of familiarity with EF from which we try to protect you :).
Back to Top
hijaggu View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Sep-2010
Posts: 21
Post Options Post Options   Quote hijaggu Quote  Post ReplyReply Direct Link To This Post Posted: 20-Dec-2011 at 3:15pm
Any update on Compiled Queries.
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 20-Dec-2011 at 5:41pm
No. We are waiting for word on the release of the EF 4.x that supports automated Compiled Queries. I have no indications from MS about when that will happen at this time. Please ping the EF team yourself. Maybe we can goad them into action.
Back to Top
PascalSchmitt View Drop Down
Newbie
Newbie


Joined: 01-Oct-2009
Location: France
Posts: 3
Post Options Post Options   Quote PascalSchmitt Quote  Post ReplyReply Direct Link To This Post Posted: 31-Aug-2012 at 2:07am
Hi,

Does compiled queries in EF 4.5 improve query execution time in DevForce ?
Is there any link between Devforce Query Cache and EF compiled queries ?

Thanks,

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down