How can I make this simple query more efficient?

This is a simple query I am making to find the size and description, when I run it it takes a long time for the query to complete, the data source is very big, but I'm sure it should not take as long as it does.

is my code very inefficient or have a made a basic mistake here with my method that could easily improved?

select y.codes, description, colour, TAGS, size

 from

 (select tagged_id AS 'TAGS', codes  from stockfile 

 union 

 select ps_id, codes from stockfile ) x 

 left join x_codes y

 on x.codes = y.codes

Thank you

Edit : I need to join the (description, colour, size) to a list of products based on a list of boxes/locations that currently have those products in.

So for all the boxes/locations that have products in them find (description, colour, size)

The reason using is because the IDs are sometimes on (tagged_id) which is a box

and can sometimes be in a location without a box (ps_id)

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum