我使用 Ireport 4.5 创建了一个报告,但我认为报告运行速度非常慢,我认为这只是因为多个 UNION 和 JOINS。
我正在复制一个简单的查询以进行测试:-
SELECT b.Project_Id,
b.Project_Manager,
b.project_title,
b.Project_location,
b.Project_Level,
SUM(COALESCE(b.Project_Budget, 0)) Projected,
SUM(COALESCE(c.Accounting, 0)) Actual
FROM t_authorized_budget a, t_project_c b,t_project_allocation c
WHERE a.Project_Id = b.Project_Id and b.project_id=c.`Key`
and a.Project_Id = c.`Key`
and $X{IN,b.project_location,p_project_location}
and $X{IN,b.project_manager,p_project_manager}
and $X{IN,b.project_id,p_project_id};
所以我使用这个查询创建了一个过程 CALL GetAllcompo() 但没有
$X{IN,b.project_location,p_project_location}
and $X{IN,b.project_manager,p_project_manager}
and $X{IN,b.project_id,p_project_id};
现在我试图在从 Ireport 调用时在程序中添加这些条件。我怎样才能做到这一点?