任何人都可以幫助我提高以下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