URGENT : removing unnecessary CAST in generated queries

URGENT : removing unnecessary CAST in generated queries

Postby yhersh » Wed 16 Nov 2011 18:25

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
yhersh
 
Posts: 22
Joined: Fri 30 Apr 2010 12:13

Postby Shalex » Fri 18 Nov 2011 09:05

Could you please send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment?
Shalex
Devart Team
 
Posts: 7614
Joined: Thu 14 Aug 2008 12:44

Postby yhersh » Fri 18 Nov 2011 13:53

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
yhersh
 
Posts: 22
Joined: Fri 30 Apr 2010 12:13

Postby yhersh » Sat 19 Nov 2011 19:31

Well after switching back to the native .net connector from mysql version 6.4.4.0 is seems that queries are flying.
yhersh
 
Posts: 22
Joined: Fri 30 Apr 2010 12:13

Postby yhersh » Sun 20 Nov 2011 08:51

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 ?
yhersh
 
Posts: 22
Joined: Fri 30 Apr 2010 12:13

Postby Shalex » Tue 22 Nov 2011 11:07

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/docs/?Support.html.
Shalex
Devart Team
 
Posts: 7614
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Thu 24 Nov 2011 09:25

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.
Shalex
Devart Team
 
Posts: 7614
Joined: Thu 14 Aug 2008 12:44

Postby yhersh » Thu 24 Nov 2011 12:41

Thank you !

Any estimate for the build?
yhersh
 
Posts: 22
Joined: Fri 30 Apr 2010 12:13

Postby Shalex » Thu 24 Nov 2011 16:15

The new (6.50.250) build of dotConnect for MySQL is available for download! Please try it.
Shalex
Devart Team
 
Posts: 7614
Joined: Thu 14 Aug 2008 12:44

Postby yhersh » Thu 24 Nov 2011 18:04

Works like charm

Thanks
yhersh
 
Posts: 22
Joined: Fri 30 Apr 2010 12:13


Return to dotConnect for MySQL