How can we retrieve Orphan Parts or Parts with no relation from Database?

I mean how can we get all the parts in the system that are not related to any Assembly, they are just components bearing no relation to any other part what so ever.

We can fetch such parts by making a query to all Parts but my concern is would it really be feasible to go with such approach if we have huge number of Parts in the system. Please advise.

Thanks in advance.