I find the Advanced Databases Course from CMU an excellent resource.
https://15721.courses.cs.cmu.edu/spring2023/schedule.html
You might want to look into academic papers, e.g., T. Neumann, Efficiently Compiling Efficient Query Plans for Modern Hardware, in VLDB, 2011 https://www.vldb.org/pvldb/vol4/p539-neumann.pdf