问题
I have a performance related database issue with CodeFluent Entities and MySql .NET connector.
I'm using:
CodeFluent Entities version 61214.820
MySql Connector 6.9.8
Compared to MySql .NET connector version 6.5.4, .Save() method insert performance DROPPED from 230 records per second to 10 records per second on a dev test machine, same project, same routine, same MySql DB engine version, just by switching connector versions.
Examining MySql query logs, I noticed there is a difference on the instructions issued to the database when .Save() method is called, such as:
Connector 6.5.4: SELECT * FROM mysql.proc WHERE 1=1 AND db LIKE 'entityname' AND name LIKE 'Entity_Save'
Connector 6.9.8: SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA LIKE 'entityname' AND ROUTINE_NAME LIKE 'Entity_Save'
I cannot determine if these differences have anything to do with the performance degradation, I just mentioned it so you can have more information to help my case.
Load methods also suffer from performance degradation.
All I described was reproduced simply by switching MySql .NET connectors. CodeFluent Entities was not touched. MySql connector 6.5.4 seems to give me the best performance relatively speaking, but it gives me a problem of intermittent errors making it difficult to deploy to production environments, bug report posted here.
I could observe the same issues with .NET MySql Connector 6.9.5.
Can this low performance issue be solved/investigated, to provide a way to use the latest .NET MySql connector version with CodeFluent Entities?
来源:https://stackoverflow.com/questions/34618873/how-to-solve-low-performance-issues-with-net-mysql-connector-on-latest-versions