I have 2 models for global tags and user tags. Both Global_Tag and User_Tag have common field encapsulated in an abstract class. When a user is logged in I show user both user tags and global tags in a list sorted by name. I have defined a queryset of global_tag and user_tag and later doing union on them and order by name.
Now my question is if django is actually firing 3 query to database or just 1 query. In pycharm debugger I see it printing data as soon as global_tag queryset is defined and later for user_tag queryset as well. Later for union queryset as well. So my question is django firing 3 queries to db or 2 and doing union and order by in memory OR just firing 1 query to db. I need output of only union query. What the best way to have django only fire last query and not 2 queryset used for preparation of final query.