SQL查询性能比较Oracle

时间:2014-07-14 14:02:38

标签: sql oracle

我希望比较两个SQL查询的性能,即统计数据,运行时等。

我正在使用Oracle SQL Developer平台和Oracle 11g数据库。

SQL查询:

select 
* 
from 
(select 
  countries.country_name, sum( profits.amount_sold) 
from 
  PROFITS 
full outer join 
CUSTOMERS on PROFITS.CUST_ID = CUSTOMERS.CUST_ID 
full outer join 
  COUNTRIES on CUSTOMERS.COUNTRY_ID = COUNTRIES.COUNTRY_ID 
WHERE 
  COUNTRY_NAME = 'Japan'   
group by 
  countries.country_name )

替代查询:

select countries.country_name, sum(profits.amount_sold)
from profits, customers, countries
where profits.cust_id = customers.cust_id
and customers.country_id = countries.country_id
and countries.country_name = 'Japan'
group by countries.country_name;

请您指导我可以使用哪些工具/功能来确定上述内容。

提前致谢。

0 个答案:

没有答案