Neuer Versuch...
SQL-Code:
SELECT timestamp AS time,
new_owner AS new_owner_id
FROM de12_conquer
WHERE (timestamp > 0 && timestamp < 1213647029734)
AND ( new_owner IN (SELECT id
FROM de12_tribe
WHERE ally = 37038)
OR old_owner IN (SELECT id
FROM de12_tribe
WHERE ally = 37038))
ORDER BY timestamp DESC LIMIT 50
oder so...
SQL-Code:
SELECT timestamp AS time,
new_owner AS new_owner_id
FROM de12_conquer c
WHERE (timestamp > 0 && timestamp < 1213647029734)
AND EXISTS (SELECT *
FROM de12_tribe
WHERE ally = 37038
AND ( id = c.new_owner
OR id = c.old_owner))
ORDER BY timestamp DESC LIMIT 50
Wieviel Zeilen ergibt das Folgende überhaupt?
SQL-Code:
SELECT id
FROM de12_tribe
WHERE ally = 37038
Geht es schneller ohne den
timestamp und die Sortierung?