Hi,
The query below is v.slow - i think this is beacuse the relationship is the "wrong way round"
can anyone confirm this or suggest an alternative
the relationship between eventstocklink and finprop is 1 - 1
i think the query would run better if it was:
The query below is v.slow - i think this is beacuse the relationship is the "wrong way round"
can anyone confirm this or suggest an alternative
Code:
SELECT event.eventid, finprop.finpropid
FROM event
INNER JOIN action
ON action.eventid = event.eventid
INNER JOIN eventstocklink
ON eventstocklink.eventstocklinkid = action.eventstocklinkid
INNER JOIN finprop
ON finprop.eventstocklinkid = eventstocklink.eventstocklinkid
the relationship between eventstocklink and finprop is 1 - 1
i think the query would run better if it was:
Code:
SELECT event.eventid, finprop.finpropid
FROM event
INNER JOIN action
ON action.eventid = event.eventid
INNER JOIN eventstocklink
ON eventstocklink.eventstocklinkid = action.eventstocklinkid
INNER JOIN finprop
ON finprop.finpropid = eventstocklink.finpropid