SQL Interview Topics (1)
SQL Interview Topics (1)
1. How would you construct a database for 1000 users and determine its size?
2. In which scenarios would you use clusters instead of replication?
3. What happens during database connection pooling and when are connections established?
4. Can you explain the different normal forms and when to use each?
5. How does PostgreSQL handle catalog tables and what are they used for?
Database Objects
Query Optimization
Interview topics to master:
SQL Programming
● Window functions
● Recursive CTEs
● Pivot queries
● Conditional aggregation
● String manipulation
● Date handling
● NULL handling
● Aggregate functions
● Self joins
● Cross apply operator
1. Given two dates, how would you generate sequential week numbers between them?
2. How can you find unique rows without using DISTINCT or UNIQUE?
3. What happens when you add NULL + 90?
4. How would you transform a string into comma-separated values?
5. What's the difference between RANK and DENSE_RANK?
Data Management
1. You have a weekly data load and a search application with 25 different data points taking 30 seconds
to return results. How would you improve performance without changing the existing schema?
2. Why might a TRUNCATE statement take an unusually long time to complete?
3. Given optimized indexes, what other approaches would you consider for improving query
performance?
Design Scenarios
1. How would you design a high-availability architecture for a critical business application?
2. What considerations would you make when designing a database that needs to scale globally?
3. How would you approach designing a system that needs to handle both OLTP and OLAP workloads?
Troubleshooting Scenarios
1. Describe a database-related issue you encountered and how you solved it.
2. How would you diagnose and resolve deadlock situations?
3. What steps would you take to investigate sudden performance degradation?