Hello all,
I am using this script and it takes 100 % of the process, can anyone tell me
how to optimize this,


insert into incoming
select s.Date as Datein, s.Time as Timein, e.Date as Dateend, e.Time as
Timeend, s.CallingStationId, s.CalledStationId,
SEC_TO_TIME(unix_timestamp(concat(e.Date,' ',e.Time)) -
unix_timestamp(concat(s.Date,' ',s.Time))) as time from VOIP s left join
VOIP e on
( s.CallingStationId=e.CallingStationId and
s.CalledStationId=e.CalledStationId and e.AcctStatusType='Stop' )
where s.AcctStatusType='Start' and s.Time < e.Time and s.Date = e.Date and
length(s.CallingStationId) > 8 group by
s.Time,s.CallingStationId,s.CalledStationId,e.CalledStationId,e.CallingStati
onId order by s.Date,s.Time ASC;

Thanks.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to