Quote:
|
Originally Posted by onthemovefit
I've got my query working using subselects, but would really like to get away from them as I know there can be performance issues.
|
As general rule this is definitely not true.
It entirely depends on your DBMS and the data in your tables.
I have had situations where subselect have even been faster, but most of the time I observe that the optimizer generates the same exection plan anyway.
Once you have a correct solution without a subselect you should analyze the execution plan to make sure that your assumption is correct (for that query).
Ideally you even trace the real IO that happens when running the query (if your DBMS supports that)