MySQL Forums :: MySQL Workbench :: Depurar query


Advanced Search

Depurar query
Posted by: Pedro Gonzalez ()
Date: April 20, 2017 12:44AM

Buenas! estoy trabajando con base de datos y tengo una query que devuelve muchisimos resultados, entonces tengo que rehacerla para que devuelva menos, pero no doy con la tecla, ¿me podríais ayudar?

Muchas gracias!! esta es la query:

select distinct (select count(*)
from testprojects a,testplans b,builds c,tcsteps d,nodes_hierarchy n,executions e
where a.id= b.testproject_id
and b.id = c.testplan_id
and c.testplan_id = e.testplan_id
and c.testplan_id = e.testplan_id
and n.parent_id = e.tcversion_id
and n.id = d.id
and c.name = 'Manuales'
and e.status = 'f'
)as fallidos ,
(select count(*)
from testprojects a,testplans b,builds c,tcsteps d,nodes_hierarchy n,executions e
where a.id= b.testproject_id
and b.id = c.testplan_id
and c.testplan_id = e.testplan_id
and c.testplan_id = e.testplan_id
and n.parent_id = e.tcversion_id
and n.id = d.id
and c.name = 'Manuales'
and e.status = 'p')as pasados,
(select count(*)
from testprojects a,testplans b,builds c,tcsteps d,nodes_hierarchy n,executions e
where a.id= b.testproject_id
and b.id = c.testplan_id
and c.testplan_id = e.testplan_id
and c.testplan_id = e.testplan_id
and n.parent_id = e.tcversion_id
and n.id = d.id
and c.name = 'Manuales'
and e.status = 'b') as bloqueados from testprojects a,testplans b,builds c,tcsteps d,nodes_hierarchy n,executions e ;

Options: ReplyQuote


Subject Views Written By Posted
Depurar query 43 Pedro Gonzalez 04/20/2017 12:44AM
Re: Depurar query 15 Pedro Gonzalez 04/20/2017 02:47AM


Sorry, only registered users may post in this forum.

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.