0

i have three tables of characters, elements and characters_elemenets applying these two queries http://sqlfiddle.com/#!9/ee104a/7

what i wanna do is to bring a specific character and its powers sorted by its manifestation percentage using this relation to get the results of

character   elemental_control
Alpha       Fire,Wind,Earth
Beta        Wind,Earth
Coco        (null)
Delta       Earth,Water,Fire,Wind

but by one specific character_id as the query in link

but i do not understand what is the difference between both these queries in the long run and its performance except that one is subquery and the other is derived

  • Is the question about terminology? Or about performance? Are these the real tables, or are they fabricated for the Question? See http://mysql.rjweb.org/doc.php/index_cookbook_mysql#many_to_many_mapping_table for how to speed up `characters_elemenets`. – Rick James Nov 10 '21 at 01:58
  • @RickJames about the performance of my queries and the difference in how they function to affect that performance despite giving same results - they are real tables in a project i have – rhctomoefjklioizsx Nov 12 '21 at 01:06

0 Answers0