You are doing a natural join of 4 tables. Also, in your "WHERE" statement, there are no special conditions.
The database engine will do the following thing :
It will first do a recursive product of all the data in each table.
Consider the following rows in tables A, B and C:
A = rowA1
rowA2
rowA3;
B = rowB1
rowB2
rowB3;
C = rowC1
rowC2
rowC3;
Basically, if you do a natural join of those 3 tables, the engine will have in memory:
rowA1 - rowB1 - rowC1
rowA1 - rowB1 - rowC2
rowA1 - rowB1 - rowC3
rowA1 - rowB2 - rowC1
rowA1 - rowB2 - rowC2
rowA1 - rowB2 - rowC3
rowA1 - rowB3 - rowC1
rowA1 - rowB3 - rowC2
rowA1 - rowB3 - rowC3
...
...
...
rowA3 - rowB3 - rowC1
rowA3 - rowB3 - rowC2
rowA3 - rowB3 - rowC3
In total, 27 rows are put in memory. However, we only want 3 rows :
rowA1 - rowB1 - rowC1
rowA2 - rowB2 - rowC2
rowA3 - rowB3 - rowC3
If your database engine doesn't do optimization by itself, a natural join of 3 table is very expensive. For 4 tables, it is unconceivable, even for a limited number of rows.
Now, how can we get something better ?
First, by looking at the code, we know that we only need 5 values. Also, in database optimization, it is said that you should make the SELECT the earliest possible.
Here is some untested code that should help you. You may have to modify it, depending on what DB engine you are using :
SELECT *
FROM (SELECT * FROM equipment LIMIT 5) e, tiremap, workreference, tirework
WHERE e.tiremap = tiremap.TireID AND
tiremap.WorkMap = workreference.`aMap` AND
workreference.`bMap` = tirework.workmap
Just by doing this, it should feel like we had only 3 tables, and not 4. Still, this is not really what you want. If one row of "equipment" is not referenced in the other tables, you will get less than 5 rows at the end. However, this an example to show you that we might not really need all the rows from all the tables.
Now, what I think you want could be this :
SELECT * FROM equipment
INNER JOIN tiremap ON equipment.tiremap = tiremap.TireID
INNER JOIN workreference ON tiremap.WorkMap = workreference.aMap
INNER JOIN tirework ON workreference.bMap = tirework.workmap
LIMIT 5
You might have a problem here : if your engine is not that good (mySQL, sorry), it can take a long time.
If you really want to do the optimization yourself :
SELECT * FROM tirework,
(SELECT * FROM workreference,
(SELECT * FROM tiremap,
(SELECT * FROM equipment) e
WHERE e.tiremap = tiremap.TireID) t
WHERE t.WorkMap = workreference.aMap) w
WHERE w.bMap = tirework.workmap
LIMIT 5
And voilà ! Even if your engine optimizer is nonexistent, that query shouldn't take too long. Instead of making a big product of everything, your engine will do one product at a time and get the bad rows out before joining it with a new table.
Try it.