Feb 13 2022 10:49 PM
Hi,
I'm working on an application where I have the following doubt:
1. Does a view improve the performance of DB ?(Was unable to understand even after reading the below reference)
2. In case I create 2 views and run a join query between them, will it affect the performance of the DB ?
3. I'm using Azure SQL DB for this project
Reference :
https://docs.microsoft.com/en-us/sql/relational-databases/views/views?view=sql-server-ver15
https://docs.microsoft.com/en-us/sql/relational-databases/views/create-views?view=sql-server-ver15
Any help on this is greatly appreciated!!
Regads,
black baron
PS: If this post has helped you, please vote for it.
Feb 14 2022 01:51 AM
@blackbaron , a view is just a predefined query (like a macro) and has no effect on performance.
You can create an index on a view, but there are several limitations.
Better create index on the base table instead on a view; so that ad-hoc queries can also benefit of the index.
Feb 14 2022 08:35 AM
Mar 21 2022 06:44 PM