Someone recently sent me a request about a piece of SQL they could not optimise. I don’t usually respond to private requests – it’s not an effective use of my time – but their example was something that pops up relatively frequently as a “bug” – so I thought I’d mention it here.
The SQL looked like this:
insert into tab3 select -- small result set * from tab1@dblink t1 -- large data set where tab1.col1 in ( select col1 from tab2 -- small data set )
