Whether it is to solve their own problems or others to help me solve, I have summed it up to write down the lessons learned, this will be very useful in the future.
This is a previous SQL statement each query will be used for approximately 8S clock:
Select COUNT (1) as "Count"
From T_ims_calllog l
INNER JOIN T_tms_user U
On L.deviceno = u.user_id
Left JOIN T_tms_customer_data C
On L.calleeno = C.mobile
where flag = 1
and callidnum =-1
And Recordpath is not NULL
and Calleeno = ' 18915509192 '
and L.callbegin!= L.callend
Originally I thought it was the T_ims_calllog table and the T_tms_user, t_tms_customer_data links caused by the timeout, in fact, they three chain link cost about 9s clock. Then invited a master to come over, he said should give Calleeno field index. And then you add the index, and the index adds this:
Create index t_ims_calllog_test on T_ims_calllog <CALLEENO> nologging;
Query the above statement again, the miracle appeared time consuming only use 0.015s, rub ...