MySQL Forums
Forum List  »  MySQL for Visual Studio

Timeout with consolidate procedure
Posted by: Cicì Cocò
Date: February 04, 2015 10:06AM

Hi everybody,

I've a problem to execute a specific query using MySQL libraries for C#.

Premise my c# software executes many queries without problems (included delete, insert and select statements), I can't execute a DELETE INNER JOIN query.

The query is the following:

delete vt.*
from valore_titolo vt inner join
date(vt.datetime) as ext_date
from valore_titolo vt,
(select id_titolo, date(datetime) as data_dt
from valore_titolo
where time(datetime)='23:59:59') vt_daily
where vt.id_titolo = vt_daily.id_titolo
and date(vt.datetime)=vt_daily.data_dt
and time(vt.datetime)!='23:59:59'
group by vt.id_titolo, date(vt.datetime)) t_join
on vt.id_titolo=t_join.id_titolo and vt.datetime=CONCAT(ext_date,' 23:59:59');

If I execute it from "MySQL Workbench" it runs in less than 1 second; If I try to run it using my software, timeout occurs and it doesn't produce effects on db datas.

I tried to put the query into a procedure and execute it but nothing change: I can call it by Workbench, timeout occurs using c# libraries

string query = "call eliminaDailyInutili;";
MySqlCommand cmd = new MySqlCommand(query, connection);
cmd.CommandTimeout = 20;

Any ideas? Thanks :(

Options: ReplyQuote

Written By
Timeout with consolidate procedure
February 04, 2015 10:06AM
February 04, 2015 10:09AM
February 04, 2015 10:52AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.