sql >> Database teknologi >  >> RDS >> Mysql

MySQL tilføjer join sænker hele forespørgslen

Kan du prøve på denne måde?

SELECT  SQL_NO_CACHE journey.code, journey.departure, journey.end,
  (select group_concat(pattern_road.latitude) from  pattern_road where pattern_road.section = pattern.section) AS road,
  (select group_concat(link.stop) from link where link.section = pattern.section) AS stop
FROM journey
INNER JOIN journey_day ON journey_day.journey = journey.code
INNER JOIN pattern ON pattern.code = journey.pattern
WHERE journey_day.day = 5 AND TIME(NOW()) BETWEEN journey.departure AND journey.end
GROUP BY journey.code            


  1. Fejlen 'Ingen passende driver fundet' for at bruge en database i en webservice på Glassfish-serveren

  2. unserialize problem

  3. Hvordan kan jeg knytte en lokal unix-socket til en inet-socket?

  4. PHP MySQL indsætter data til flere tabeller