re: The What and Why of PostgreSQL Views VIEW POST


Great video! I like how you mentioned that it "feels right". That's really a huge part of application design - The best design patterns often just feel like the right thing to do.

The other thing that you didn't mention is that when using SQL views, the database engine can do some pre-optimization of the query, as it knows the exact query that's going to be ran. This can result in a small performance boost for very common queries. With a regular query, it needs to parse, prepare, and optimize that query every single time you run it.


That's partially true. For instance SQL Server cashes parameterized queries and saves their execution plans.

At least to my knowledge 🙂

code of conduct - report abuse