My question is pretty straightforward and I would like to extend my knowledge about the matter of improving SQL queries perfomance-wise.
I am very often faced lately with bequithed scripts from my collegues who are a bit "messy" when writing scripts.
They write join clauses the old way by writing tables one after another delimited with commas.
I know that output wise those scripts are the same, but can there be a perfomance improvement by rewriting those scricts into the classic join clauses?
EDIT: So I have rewritten the poorly written code and I have together 3 examples, however only as pictures the formatting was really crazy, maybe I can later reformat it again - here is the album https://i.stack.imgur.com/Fkje9.jpg
So on the first picture is kind of a mixed approach between joins and cartezian products, it took 35 minutes to run the result.
The second picture is my rewritten code - it took a little over a minute to gain the same result.
The last one I have specifically rewritten the code to only cartezian products - it runs for an hour now and I dont know when it will stop.
So can anyone help me get some usefull information from the stats in the pictures? Which indicators are good to look at for performance? Because the approximated time of the last approach was the least, however it turns out it is the slowest one.
Thank you.