When I use left outer join with order by in the below query the query executes infinitely without giving a resultset. However - individually they work fine that is if I change it from left outer join to inner join. But I need all the values from interregen table below.
Not understanding what could possibly be the error :(
My mysql query:
SELECT r.name,
r.network,
r.namestring,
i.name,
i.description,
r.rid,
i.id,
d.dtime,
d.ifInOctets,
d.ifOutOctets,
FROM_UNIXTIME(d.dtime)
FROM range AS r
JOIN interregen AS i ON r.rid = i.rid
LEFT JOIN 1278993600_1_60 AS d ON i.id = d.id -- i.id is the primary key
AND dtime BETWEEN 1279026000 AND 1279040400
WHERE r.net = 'ITPN'
AND i.status = 'active'
ORDER BY i.id, d.dtime
Please help!! Thanks