I have a solid understanding of the basics of relational DB performance (Indexing, explain analyze, different types of scans etc...) but I always seem to run into situations where I have complex and slow SQL queries and I'm not sure how to optimize them. I've often heard the rule of thumb that any user-facing query that takes longer than 100ms is too slow but I've never seen that play out in my experience with many complex application queries taking a handful of seconds. Does anyone have any suggestions for required reading related to performant data architecture?