Friday, April 20, 2007

ORM and when query plans go bad.

I've been listening to quite a few discussions on the debates between the use or ORMs and two topics that never seem to get discussed is:

  1. How can dynamic SQL ORMs deal with the fact that your database server (a.k.a SQL Server) can decide at any point that it is going to use an alternate query plan. A simple index HINT on the join syntax can fix this problem but how is my ORM going to handle this?

  2. How come there is no talk about scaling these ORMs. No, I'm not talking about scaling the database. A layer between the ORM and the database execution.
Point #1 can be explained away in a theoretical world where all the correct load testing scenarios are covered during your quality assurance phase. BUT THAT NEVER HAPPENS.

Point #2 I've also een starting to pay more attention to the Microsoft Entities Framework. .NET Rocks did a show with one of the product managers for ADO.vNext (Dan someone) and he talked about the Entities framework in depth. He talked about how they are getting pressure from the community that they are not supporting all the functionality that the ORMs (such as NHibernate) are providing. His response was that MS has a longer term strategy with the EF to support replication and reporting (essentially a unified model) against the EF. He continued to say we would have to put up with the limited capabilities to reach this higher level.

The interesting part was that he continued on to talk about how he worked on the WinFS team before it was killed. He talked about the reason it was killed was because they were unable to deliver all the functionality on one release and how no one (especially mgmt) could not decide on the base feature set. It was rather ironic that he was mentioning this on the heals of talking about how the EF was a stepping stone.

In my opinion the EF will certainly be a wait and see technology. CSLA .NET is still my choice.

No comments: