August 14, 2017 at 2:14 pm
When a user creates a view from multiple tables, the data from it gets stored somewhere. Is it in memory or on Disk? Just curious.
August 14, 2017 at 2:19 pm
newdba2017 - Monday, August 14, 2017 2:14 PMWhen a user creates a view from multiple tables, the data from it gets stored somewhere. Is it in memory or on Disk? Just curious.
The data is already stored in the underlying tables and is not stored again.
A (non-persisted) view is really just a SELECT query.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
August 14, 2017 at 2:51 pm
newdba2017 - Monday, August 14, 2017 2:14 PMWhen a user creates a view from multiple tables, the data from it gets stored somewhere.
Nope, the data does not get stored anywhere. The view is stored solely as the statement that defines it. When you run a query against a view, during the parsing process the view's name is replaced by its definition and the resulting query is what's run.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply