This query execution never ends.
delete from commande where bl in (
select noBl from (
select distinct noBl,num_commande from T_VENTE) s
group by noBl
having count(*)>2
);
I don't understand because the subquery
select noBl from (
select distinct noBl,num_commande from T_VENTE) s
group by noBl
having count(*)>2
takes one second to achieve.
Column bl is indexed in table commande.
If someone has an idea...
Thanks in advance