Dear friends, I have a problem with this query and it works very slow.
Verify your statistics on table4 and table3 are updated.
You can probably remove the Key lookup on table3.index5 by adding an "include (column8, column9)" on table3.index4.
Wow, I love typing in generics! : )