任何人都可以帮助我提高以下sql的性能。使用数据库是Informix的在informix中提高sql的性能
SELECT
informix.set_reason_codes.description as reason_code,
count(*) as number_of_calls
FROM
informix.contact_history,
informix.set_reason_codes,
informix.customers
WHERE
(informix.contact_history.reason_code = informix.set_reason_codes.reason_code)
and ((informix.set_reason_codes.code_type = 'CONTACT_HISTORY'))
and (informix.contact_history.customerkey = informix.customers.customerkey)
and (informix.contact_history.call_type = 0)
group
by informix.set_reason_codes.description
order by
informix.set_reason_codes.description
什么指标都存在这些表? – 2009-09-25 07:42:45
对于contact_history一个指数customerkey,DATE_AND_TIME和REASON_CODE 对于集REASON_CODES一个指数code_type,REASON_CODE 对于客户一个指数customerkey – Shalma 2009-09-25 07:54:33