Page 1 of 1
URGENT : removing unnecessary CAST in generated queries
Posted: Wed 16 Nov 2011 18:25
by yhersh
Hi,
I would like to know how can I ensure that SQL statements being generated by dotConnect for mysql will be without unnecessary CAST?
Its causing major performance hit on our DB.
I am using 6230 version
e.g.
AND (((cast(Extent1.created_date as datetime)) >= '2011-11-16T00:00:00.00' /* @p__linq__0 */)
AND ((cast(Extent1.created_date as datetime)) < '2011-11-17T00:00:00.00' /* @p__linq__1 */)))
Thanks
Posted: Fri 18 Nov 2011 09:05
by Shalex
Could you please
send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment?
Posted: Fri 18 Nov 2011 13:53
by yhersh
Its a big project and to break it to small pieces will take some time.
Just create any model with Mysql DataTime datatype in the DB and DateTime in c# and compare between dates and the result is CAST from string to DateTime in the generated query.
I tried with LINQ pad mysql driver which doesnt generate sql statements with CAST
Posted: Sat 19 Nov 2011 19:31
by yhersh
Well after switching back to the native .net connector from mysql version 6.4.4.0 is seems that queries are flying.
Posted: Sun 20 Nov 2011 08:51
by yhersh
This is a major bug which must be fixed ASAP and the support is very slow....we have a live production site which is suffering performance due to this issue.
Is this your normal response time ?
Posted: Tue 22 Nov 2011 11:07
by Shalex
yhersh wrote:This is a major bug which must be fixed ASAP and the support is very slow....we have a live production site which is suffering performance due to this issue.
We are investigating the issue.
yhersh wrote:Is this your normal response time ?
Our support has a two business day response policy:
http://www.devart.com/dotconnect/mysql/ ... pport.html.
Posted: Thu 24 Nov 2011 09:25
by Shalex
The bug with adding unnecessary CASTs to SQL when working with DateTime and numeric columns and expressions is fixed. We will post here when the corresponding build of dotConnect for MySQL is available for download.
Posted: Thu 24 Nov 2011 12:41
by yhersh
Thank you !
Any estimate for the build?
Posted: Thu 24 Nov 2011 16:15
by Shalex
The new (6.50.250) build of dotConnect for MySQL is available for download! Please try it.
Posted: Thu 24 Nov 2011 18:04
by yhersh
Works like charm
Thanks