Entity Framework + MySQL - Why is the performance so terrible?

后端 未结 4 401
梦如初夏
梦如初夏 2021-01-19 02:58

When I decided to use an OR/M (Entity Framework for MySQL this time) for my new project I was hoping it would save me time, but I seem to have failed it (for the second time

相关标签:
4条回答
  • 2021-01-19 03:32

    I think the first step would be figuring out what SQL is being sent to MySQL. This article explains how to turn on logging in MySQL. If possible you might want to see if .NET 4.0 beta 1 improves the generated SQL.

    0 讨论(0)
  • 2021-01-19 03:35

    All my research finally culminated into the conclusion that while EF in general is bad for performance, MySql+EF is downright shoddy. SO's choice of L2S over EF is a good move and if I had access to a MS Sql database instead of MySQL I would have moved in that direction too.

    Unfortunately I am stuck with MySql cause it's free and that has forced me to give up EF. I am now back to hard-coding my SQL queries the old, tested, efficient way and the results are good.

    I gave MYSql + EF a pass, but I would love to hear from people who have successfully used it in a non-trivial project.

    0 讨论(0)
  • 2021-01-19 03:39

    You can also get the SQL from the EF provider via ToTraceString.

    0 讨论(0)
  • 2021-01-19 03:40

    i have successfully used MySql with Linq to SQL, using the open source project DBLinq. I know its not Entity Framework but the probramming models are familiar. Hope this helps anyone!

    0 讨论(0)
提交回复
热议问题